From eb98444afbc2813f6b4b51171b24322772ed30eb Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 3 Mar 2021 23:11:41 +0100 Subject: [PATCH] one more --- test/features/step_definitions/bookshop_steps.js | 5 +++++ 1 file changed, 5 insertions(+) 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)