From 82be3d5f135cb16c22add62e3bd92bdd79f0184e Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 16 Jan 2024 14:23:23 +0100 Subject: [PATCH] Fix test --- test/test.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test/test.js b/test/test.js index 97c4bc7..7efa62c 100644 --- a/test/test.js +++ b/test/test.js @@ -123,19 +123,16 @@ describe('Application life cycle test', function () { async function completeSetup() { let button; -// await browser.executeScript('localStorage.clear();'); await browser.get(`https://${app.fqdn}`); await browser.sleep(2000); - if (await browser.findElements(By.xpath('//a[contains(text(), "Configure my instance")]')).then(found => !!found.length)) { -// await waitForElement(By.xpath('//a[contains(text(), "Configure my instance")]')); - await browser.findElement(By.xpath('//a[contains(text(), "Configure my instance")]')).click(); // this opens a new window + await waitForElement(By.xpath('//a[contains(text(), "Configure my instance")]')); + await browser.findElement(By.xpath('//a[contains(text(), "Configure my instance")]')).click(); // this opens a new window - let say_cmd = await getOS() == "Darwin" ? "say" : "spd-say"; - execSync(`${say_cmd} "Close the newly opened configuration tab."`); + let say_cmd = await getOS() == "Darwin" ? "say" : "spd-say"; + execSync(`${say_cmd} "Close the newly opened configuration tab."`); - await rl.question('Is tab closed? '); - } + await rl.question('Is tab closed? '); } async function uploadVideo() {