fix: format

This commit is contained in:
Max Peintner
2025-03-31 17:25:33 +02:00
parent ffc12f0a81
commit 2b6eabe16e
5 changed files with 12 additions and 16 deletions

View File

@@ -3,9 +3,9 @@ import { test as base, expect } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { loginname } from "./loginname";
import { startOIDC } from "./oidc";
import { password } from "./password";
import { PasswordUser } from "./user";
import {startOIDC} from "./oidc";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, ".env.local") });
@@ -30,8 +30,8 @@ const test = base.extend<{ user: PasswordUser }>({
});
test("oidc username and password login", async ({ user, page }) => {
await startOIDC(page)
await startOIDC(page);
await loginname(page, user.getUsername());
await password(page, user.getPassword());
await expect(page.locator('pre')).toContainText(user.getUsername());
await expect(page.locator("pre")).toContainText(user.getUsername());
});

View File

@@ -1,4 +1,4 @@
import { expect, Page } from "@playwright/test";
import { Page } from "@playwright/test";
export async function startOIDC(page: Page) {
await page.goto("http://localhost:8000/login");

View File

@@ -1,12 +1,8 @@
import { faker } from "@faker-js/faker";
import {expect, test as base} from "@playwright/test";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { loginname } from "./loginname";
import { password } from "./password";
import { PasswordUser } from "./user";
import {startSAML} from "./saml";
import {selectNewAccount} from "./select-account";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, ".env.local") });

View File

@@ -1,4 +1,4 @@
import { expect, Page } from "@playwright/test";
import { Page } from "@playwright/test";
export async function startSAML(page: Page) {
await page.goto("http://localhost:8001/hello");

View File

@@ -1,5 +1,5 @@
import {Page} from "@playwright/test";
import { Page } from "@playwright/test";
export async function selectNewAccount(page: Page) {
await page.getByRole('link', {name: 'Add another account'}).click();
await page.getByRole("link", { name: "Add another account" }).click();
}