"CLOUDRON_OIDC_PROVIDER_NAME is not supported" comment added

checklist added
This commit is contained in:
Vladimir D
2024-12-26 16:20:18 +04:00
parent 4653d689d8
commit 94ea75bfdb
6 changed files with 667 additions and 110 deletions

View File

@@ -79,7 +79,7 @@ describe('Application life cycle test', function () {
await waitForElement(By.xpath('//span[text()="Account"]'));
}
async function loginOIDC(username, password) {
async function loginOIDC(username, password, alreadyAuthenticated = true) {
browser.manage().deleteAllCookies();
await browser.get(`https://${app.fqdn}/login`);
await browser.sleep(2000);
@@ -88,13 +88,11 @@ describe('Application life cycle test', function () {
await browser.findElement(By.xpath('//button[contains(., "Login with OpenID")]')).click();
await browser.sleep(2000);
if (!athenticated_by_oidc) {
if (!alreadyAuthenticated) {
await waitForElement(By.id('inputUsername'));
await browser.findElement(By.id('inputUsername')).sendKeys(username);
await browser.findElement(By.id('inputPassword')).sendKeys(password);
await browser.findElement(By.id('loginSubmitButton')).click();
athenticated_by_oidc = true;
}
await browser.sleep(3000);
@@ -150,7 +148,7 @@ describe('Application life cycle test', function () {
it('device exists', deviceExists);
it('can logout', logout);
it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD));
it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD, false));
it('can logout', logout);
it('can restart app', function () { execSync(`cloudron restart --app ${app.id}`); });