This commit is contained in:
Elio Bischof
2025-04-02 07:27:59 +02:00
parent b89987dd25
commit d45e169cc6
2 changed files with 24 additions and 25 deletions

View File

@@ -79,7 +79,7 @@ The application is now available at `http://localhost:3000`
### Adding applications and IDPs
```sh
# OPTIONAL Run SAML SP
# OPTIONAL Run SAML SP
pnpm run-samlsp
# OPTIONAL Run OIDC RP
@@ -92,7 +92,6 @@ pnpm run-samlidp
pnpm run-oidcop
```
### Testing
You can execute the following commands `pnpm test` for a single test run or `pnpm test:watch` in the following directories:

View File

@@ -1,34 +1,34 @@
import {faker} from "@faker-js/faker";
import {test as base} from "@playwright/test";
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import {PasswordUser} from "./user";
import { PasswordUser } from "./user";
// Read from ".env" file.
dotenv.config({path: path.resolve(__dirname, ".env.local")});
dotenv.config({ path: path.resolve(__dirname, ".env.local") });
const test = base.extend<{ user: PasswordUser }>({
user: async ({page}, use) => {
const user = new PasswordUser({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number(),
isPhoneVerified: false,
password: "Password1!",
passwordChangeRequired: false,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
user: async ({ page }, use) => {
const user = new PasswordUser({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number(),
isPhoneVerified: false,
password: "Password1!",
passwordChangeRequired: false,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test("oidc username and password login", async ({user, page}) => {
//TODO commented out because of relocating into E2E tests
/*
test("oidc username and password login", async ({ user, page }) => {
//TODO commented out because of relocating into E2E tests
/*
await startOIDC(page);
await loginname(page, user.getUsername());
await password(page, user.getPassword());