Fix tests

This commit is contained in:
Girish Ramakrishnan 2024-01-02 11:05:43 +01:00
parent d6ab9d25ba
commit d8b6645f14
1 changed files with 3 additions and 5 deletions

View File

@ -80,7 +80,7 @@ describe('Application life cycle test', function () {
await browser.findElement(By.id('folderLabel')).sendKeys(FOLDER); 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.sleep(4000); // without this sometimes only part of the folder name gets through
await browser.findElement(By.css('[ng-click*=saveFolder]')).click(); 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); await browser.sleep(4000);
} }
@ -148,8 +148,7 @@ describe('Application life cycle test', function () {
await timers.setTimeout(30000); await timers.setTimeout(30000);
}); });
it('can get app information', getAppInfo); it('can get app information', getAppInfo);
// next release it should be replaced with LDAP login it('can login', login.bind(null, username, password));
it('can admin login', login.bind(null, adminUsername, adminPassword));
it('can load page', loadPage); it('can load page', loadPage);
it('can add folder', addFolder); it('can add folder', addFolder);
it('can update', async function () { it('can update', async function () {
@ -157,8 +156,7 @@ describe('Application life cycle test', function () {
execSync('cloudron update --app ' + LOCATION, EXEC_ARGS); execSync('cloudron update --app ' + LOCATION, EXEC_ARGS);
await timers.setTimeout(30000); await timers.setTimeout(30000);
}); });
// next release it should be replaced with LDAP login it('can login', login.bind(null, username, password));
it('can admin login', login.bind(null, adminUsername, adminPassword));
it('can check folder', checkFolder); it('can check folder', checkFolder);
it('uninstall app', async function () { it('uninstall app', async function () {