From d8b6645f14dcbbfbfd0ba3c623bf439e83cbc95f Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 2 Jan 2024 11:05:43 +0100 Subject: [PATCH] Fix tests --- test/test.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/test.js b/test/test.js index 0ac5564..998161e 100644 --- a/test/test.js +++ b/test/test.js @@ -80,7 +80,7 @@ describe('Application life cycle test', function () { await browser.findElement(By.id('folderLabel')).sendKeys(FOLDER); await browser.sleep(4000); // without this sometimes only part of the folder name gets through await browser.findElement(By.css('[ng-click*=saveFolder]')).click(); - await browser.wait(until.elementLocated(By.css('#folders .panel-status span[ng-switch-when=unshared]')), TEST_TIMEOUT); + await waitForElement(By.xpath(`//span[contains(text(), '${FOLDER}')]`)); await browser.sleep(4000); } @@ -148,8 +148,7 @@ describe('Application life cycle test', function () { await timers.setTimeout(30000); }); it('can get app information', getAppInfo); - // next release it should be replaced with LDAP login - it('can admin login', login.bind(null, adminUsername, adminPassword)); + it('can login', login.bind(null, username, password)); it('can load page', loadPage); it('can add folder', addFolder); it('can update', async function () { @@ -157,8 +156,7 @@ describe('Application life cycle test', function () { execSync('cloudron update --app ' + LOCATION, EXEC_ARGS); await timers.setTimeout(30000); }); - // next release it should be replaced with LDAP login - it('can admin login', login.bind(null, adminUsername, adminPassword)); + it('can login', login.bind(null, username, password)); it('can check folder', checkFolder); it('uninstall app', async function () {