From 478f3580a6e608714e4ab1f48c4ebbd1a744bc9a Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 28 May 2024 18:18:30 +0200 Subject: [PATCH] Update tests --- test/test.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/test.js b/test/test.js index 35c7c00..180abfd 100644 --- a/test/test.js +++ b/test/test.js @@ -130,9 +130,9 @@ describe('Application life cycle test', function () { await browser.findElement(By.xpath('//a[contains(., "Continue")]')).click(); await browser.sleep(2000); - if (await browser.findElements(By.xpath('//div[@aria-label="Skip verification for now"]')).then(found => !!found.length)) { - await skipVerification(); - } + //if (await browser.findElements(By.xpath('//div[@aria-label="Skip verification for now"]')).then(found => !!found.length)) { +// await skipVerification(); + //} await browser.sleep(3000); await waitForElement(By.xpath(`//h1[contains(., "Welcome")]`)); @@ -166,18 +166,18 @@ describe('Application life cycle test', function () { async function logout() { await browser.get('https://' + app.fqdn + '/#/home'); await browser.sleep(5000); - await waitForElement(By.xpath('//div[@role="button" and @title="User menu"]')); + await waitForElement(By.xpath('//div[@role="button" and @aria-label="User menu"]')); - await browser.findElement(By.xpath('//div[@role="button" and @title="User menu"]')).click(); + await browser.findElement(By.xpath('//div[@role="button" and @aria-label="User menu"]')).click(); await browser.sleep(2000); await browser.findElement(By.xpath('//li[@role="menuitem" and @aria-label="Sign out"]')).click(); await browser.sleep(2000); - if (await browser.findElements(By.xpath('//button[contains(text(), "I don\'t want my encrypted messages")]')).then(found => !!found.length)) { +// if (await browser.findElements(By.xpath('//button[contains(text(), "I don\'t want my encrypted messages")]')).then(found => !!found.length)) { await browser.findElement(By.xpath('//button[contains(text(), "I don\'t want my encrypted messages")]')).click(); await browser.sleep(3000); - } +// } await waitForElement(By.xpath('//h1[text()="Sign in"]')); } @@ -233,7 +233,7 @@ describe('Application life cycle test', function () { it('can get app information', getAppInfo); it('check landing page', checkLandingPage); - it('can install element-web app', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); }); + it('can install element-web app (no sso)', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); }); it('update element-app config', updateSynapseConfig); it('can get Element app info', getElementAppInfo); @@ -256,10 +256,10 @@ describe('Application life cycle test', function () { it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); }); // SSO - it('install app', function () { execSync('cloudron install --location ' + LOCATION, EXEC_ARGS); }); + it('install app (sso)', function () { execSync('cloudron install --location ' + LOCATION, EXEC_ARGS); }); it('can get app info', getAppInfo); - it('can install element-web app', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); }); + it('can install element-web app (sso)', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); }); it('update element-app config', updateSynapseConfig); it('can get Element app info', getElementAppInfo);