prettier run
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
a340c086d0
commit
f98c4f65db
|
@ -1,16 +1,16 @@
|
||||||
version: 1
|
version: 1
|
||||||
entries:
|
entries:
|
||||||
- attrs:
|
- attrs:
|
||||||
email: test-admin@goauthentik.io
|
email: test-admin@goauthentik.io
|
||||||
is_active: true
|
is_active: true
|
||||||
name: authentik Default Admin
|
name: authentik Default Admin
|
||||||
password: test-runner
|
password: test-runner
|
||||||
path: users
|
path: users
|
||||||
type: internal
|
type: internal
|
||||||
groups:
|
groups:
|
||||||
- !Find [authentik_core.group, [name, "authentik Admins"]]
|
- !Find [authentik_core.group, [name, "authentik Admins"]]
|
||||||
conditions: []
|
conditions: []
|
||||||
identifiers:
|
identifiers:
|
||||||
username: akadmin
|
username: akadmin
|
||||||
model: authentik_core.user
|
model: authentik_core.user
|
||||||
state: present
|
state: present
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { browser } from "@wdio/globals";
|
|
||||||
import Page from "../pageobjects/page.js";
|
import Page from "../pageobjects/page.js";
|
||||||
|
import { browser } from "@wdio/globals";
|
||||||
|
|
||||||
const CLICK_TIME_DELAY = 250;
|
const CLICK_TIME_DELAY = 250;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ class ApplicationsListPage extends AdminPage {
|
||||||
async open() {
|
async open() {
|
||||||
return await super.open("if/admin/#/core/applications");
|
return await super.open("if/admin/#/core/applications");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new ApplicationsListPage();
|
export default new ApplicationsListPage();
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import LoginPage from "../pageobjects/login.page.js";
|
import LoginPage from "../pageobjects/login.page.js";
|
||||||
import { BAD_PASSWORD, BAD_USERNAME, GOOD_USERNAME } from "../utils/constants.js";
|
import { BAD_PASSWORD, BAD_USERNAME, GOOD_USERNAME } from "../utils/constants.js";
|
||||||
import { expect } from "@wdio/globals";
|
import { expect } from "@wdio/globals";
|
||||||
|
|
||||||
describe("Log into Authentik", () => {
|
describe("Log into authentik", () => {
|
||||||
it("should fail on a bad username", async () => {
|
it("should fail on a bad username", async () => {
|
||||||
await LoginPage.open();
|
await LoginPage.open();
|
||||||
await LoginPage.username(BAD_USERNAME);
|
await LoginPage.username(BAD_USERNAME);
|
||||||
const failure = await LoginPage.authFailure;
|
const failure = await LoginPage.authFailure;
|
||||||
expect(failure).toHaveText("Failed to authenticate.");
|
expect(failure).toHaveText("Failed to authenticate.");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should fail on a bad password", async () => {
|
it("should fail on a bad password", async () => {
|
||||||
await LoginPage.open();
|
await LoginPage.open();
|
||||||
await LoginPage.username(GOOD_USERNAME);
|
await LoginPage.username(GOOD_USERNAME);
|
||||||
|
@ -17,5 +17,5 @@ describe("Log into Authentik", () => {
|
||||||
await LoginPage.password(BAD_PASSWORD);
|
await LoginPage.password(BAD_PASSWORD);
|
||||||
const failure = await LoginPage.authFailure;
|
const failure = await LoginPage.authFailure;
|
||||||
expect(failure).toHaveText("Failed to authenticate.");
|
expect(failure).toHaveText("Failed to authenticate.");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { login } from "../utils/login.js";
|
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);
|
it("should login with valid credentials and reach the UserLibrary", login);
|
||||||
});
|
});
|
||||||
|
|
|
@ -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 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 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";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import LoginPage from "../pageobjects/login.page.js";
|
import LoginPage from "../pageobjects/login.page.js";
|
||||||
import UserLibraryPage from "../pageobjects/user-library.page.js";
|
import UserLibraryPage from "../pageobjects/user-library.page.js";
|
||||||
import { expect } from "@wdio/globals";
|
|
||||||
import { GOOD_PASSWORD, GOOD_USERNAME } from "./constants.js";
|
import { GOOD_PASSWORD, GOOD_USERNAME } from "./constants.js";
|
||||||
|
import { expect } from "@wdio/globals";
|
||||||
|
|
||||||
export const login = async () => {
|
export const login = async () => {
|
||||||
await LoginPage.open();
|
await LoginPage.open();
|
||||||
|
|
|
@ -73,7 +73,7 @@ export const config: Options.Testrunner = {
|
||||||
"--disable-dev-shm-usage",
|
"--disable-dev-shm-usage",
|
||||||
]
|
]
|
||||||
: [];
|
: [];
|
||||||
})()
|
})(),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Reference in a new issue