diff --git a/test/features/step_definitions/bookshop_steps.js b/test/features/step_definitions/bookshop_steps.js index ccbea7ef..131eb9a6 100644 --- a/test/features/step_definitions/bookshop_steps.js +++ b/test/features/step_definitions/bookshop_steps.js @@ -71,6 +71,11 @@ Then('it fails with {string}', async message => { return (await element.getText()).includes(message) }) +Then('it shows {string} in {string}', async (message,id) => { + const element = await browser.wait (browser.findElement(By.id(id))) + return (await element.getText()).includes(message) +}) + Given('we login as {string}, {string}', async (username, password) => { const alert = await browser.switchTo().alert() return alert.authenticateAs(username, password)