"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

753
test/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,10 +10,10 @@
"license": "ISC",
"devDependencies": {
"expect.js": "^0.3.1",
"mocha": "^10.7.3",
"selenium-webdriver": "^4.24.1"
"mocha": "^11.0.1",
"selenium-webdriver": "^4.27.0"
},
"dependencies": {
"chromedriver": "^128.0.3"
"chromedriver": "^131.0.4"
}
}

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}`); });