diff --git a/tests/wdio/blueprints/admin-user.yaml b/tests/wdio/blueprints/admin-user.yaml index 8c2d56309..1a0e85e17 100644 --- a/tests/wdio/blueprints/admin-user.yaml +++ b/tests/wdio/blueprints/admin-user.yaml @@ -1,16 +1,16 @@ version: 1 entries: -- attrs: - email: test-admin@goauthentik.io - is_active: true - name: authentik Default Admin - password: test-runner - path: users - type: internal - groups: - - !Find [authentik_core.group, [name, "authentik Admins"]] - conditions: [] - identifiers: - username: akadmin - model: authentik_core.user - state: present + - attrs: + email: test-admin@goauthentik.io + is_active: true + name: authentik Default Admin + password: test-runner + path: users + type: internal + groups: + - !Find [authentik_core.group, [name, "authentik Admins"]] + conditions: [] + identifiers: + username: akadmin + model: authentik_core.user + state: present diff --git a/tests/wdio/test/pageobjects/admin.page.ts b/tests/wdio/test/pageobjects/admin.page.ts index 9335cd670..62db9fbc0 100644 --- a/tests/wdio/test/pageobjects/admin.page.ts +++ b/tests/wdio/test/pageobjects/admin.page.ts @@ -1,5 +1,5 @@ -import { browser } from "@wdio/globals"; import Page from "../pageobjects/page.js"; +import { browser } from "@wdio/globals"; const CLICK_TIME_DELAY = 250; diff --git a/tests/wdio/test/pageobjects/applications-list.page.ts b/tests/wdio/test/pageobjects/applications-list.page.ts index 8324bb0b0..0f3d93e03 100644 --- a/tests/wdio/test/pageobjects/applications-list.page.ts +++ b/tests/wdio/test/pageobjects/applications-list.page.ts @@ -16,7 +16,6 @@ class ApplicationsListPage extends AdminPage { async open() { return await super.open("if/admin/#/core/applications"); } - } export default new ApplicationsListPage(); diff --git a/tests/wdio/test/specs/bad-logins.ts b/tests/wdio/test/specs/bad-logins.ts index bafd5842c..5bfce3343 100644 --- a/tests/wdio/test/specs/bad-logins.ts +++ b/tests/wdio/test/specs/bad-logins.ts @@ -1,15 +1,15 @@ import LoginPage from "../pageobjects/login.page.js"; import { BAD_PASSWORD, BAD_USERNAME, GOOD_USERNAME } from "../utils/constants.js"; import { expect } from "@wdio/globals"; - -describe("Log into Authentik", () => { + +describe("Log into authentik", () => { it("should fail on a bad username", async () => { await LoginPage.open(); await LoginPage.username(BAD_USERNAME); const failure = await LoginPage.authFailure; expect(failure).toHaveText("Failed to authenticate."); - }); - + }); + it("should fail on a bad password", async () => { await LoginPage.open(); await LoginPage.username(GOOD_USERNAME); @@ -17,5 +17,5 @@ describe("Log into Authentik", () => { await LoginPage.password(BAD_PASSWORD); const failure = await LoginPage.authFailure; expect(failure).toHaveText("Failed to authenticate."); - }); + }); }); diff --git a/tests/wdio/test/specs/good-login.ts b/tests/wdio/test/specs/good-login.ts index 6469b014b..e045c541f 100644 --- a/tests/wdio/test/specs/good-login.ts +++ b/tests/wdio/test/specs/good-login.ts @@ -1,5 +1,5 @@ import { login } from "../utils/login.js"; -describe("Log into Authentik", () => { +describe("Log into authentik", () => { it("should login with valid credentials and reach the UserLibrary", login); }); diff --git a/tests/wdio/test/utils/constants.ts b/tests/wdio/test/utils/constants.ts index 158ee251b..3ca29f1de 100644 --- a/tests/wdio/test/utils/constants.ts +++ b/tests/wdio/test/utils/constants.ts @@ -2,6 +2,4 @@ export const BAD_USERNAME = process.env.AK_BAD_USERNAME ?? "bad-username@bad-log export const GOOD_USERNAME = process.env.AK_GOOD_USERNAME ?? "test-admin@goauthentik.io"; export const BAD_PASSWORD = process.env.AK_BAD_PASSWORD ?? "-this-is-a-bad-password-"; -export const GOOD_PASSWORD = process.env.AK_GOOD_PASSWORD ?? "test-runner" - - +export const GOOD_PASSWORD = process.env.AK_GOOD_PASSWORD ?? "test-runner"; diff --git a/tests/wdio/test/utils/login.ts b/tests/wdio/test/utils/login.ts index 5922f9248..59ff800fb 100644 --- a/tests/wdio/test/utils/login.ts +++ b/tests/wdio/test/utils/login.ts @@ -1,7 +1,7 @@ import LoginPage from "../pageobjects/login.page.js"; import UserLibraryPage from "../pageobjects/user-library.page.js"; -import { expect } from "@wdio/globals"; import { GOOD_PASSWORD, GOOD_USERNAME } from "./constants.js"; +import { expect } from "@wdio/globals"; export const login = async () => { await LoginPage.open(); diff --git a/tests/wdio/wdio.conf.ts b/tests/wdio/wdio.conf.ts index 9ba17aac8..0694f2566 100644 --- a/tests/wdio/wdio.conf.ts +++ b/tests/wdio/wdio.conf.ts @@ -73,7 +73,7 @@ export const config: Options.Testrunner = { "--disable-dev-shm-usage", ] : []; - })() + })(), ), }, },