test file cleanups

This commit is contained in:
Girish Ramakrishnan
2026-04-30 10:23:38 +02:00
parent 09434e0870
commit 33a68f9aee
+4 -6
View File
@@ -5,7 +5,6 @@ import { app, click, cloudronCli, goto, loginOIDC, sendKeys, setupBrowser, takeS
/* global it, describe, before, after, afterEach */
describe('Application life cycle test', function () {
const POST_LOGIN_LOCATOR = 'xpath=//span[contains(., "Bookmarks")] | //strong[text()="Successfully authenticated from Cloudron account."]';
before(setupBrowser);
after(teardownBrowser);
@@ -15,9 +14,8 @@ describe('Application life cycle test', function () {
});
async function checkRegistrationClosed() {
const createBtn = 'xpath=//div[@class="sign-in-banner"]/descendant::button/span[contains(text(), "Create account")] | //div[@class="sign-in-banner"]/descendant::a/span[contains(text(), "Create account")]';
await goto(`https://${app.fqdn}`, createBtn);
await click(createBtn);
await goto(`https://${app.fqdn}`, 'xpath=//div[@class="sign-in-banner"]/descendant::button/span[contains(text(), "Create account")] | //div[@class="sign-in-banner"]/descendant::a/span[contains(text(), "Create account")]');
await click('xpath=//div[@class="sign-in-banner"]/descendant::button/span[contains(text(), "Create account")] | //div[@class="sign-in-banner"]/descendant::a/span[contains(text(), "Create account")]');
await waitFor('is currently not possible');
}
@@ -31,7 +29,7 @@ describe('Application life cycle test', function () {
async function loginOidc() {
await goto(`https://${app.fqdn}/auth/sign_in`, 'xpath=//a[contains(@class, "button") and text()="Cloudron"]');
await click('xpath=//a[contains(@class, "button") and text()="Cloudron"]');
await loginOIDC(POST_LOGIN_LOCATOR);
await loginOIDC('xpath=//span[contains(., "Bookmarks")] | //strong[text()="Successfully authenticated from Cloudron account."]');
}
async function logout() {
@@ -91,7 +89,7 @@ describe('Application life cycle test', function () {
it('uninstall app', cloudronCli.uninstall);
// test update
it('can install app', cloudronCli.appstoreInstall);
it('can install app for update', cloudronCli.appstoreInstall);
it('can OIDC login', loginOidc);
it('can logout', logout);