mirror of
https://github.com/goauthentik/authentik
synced 2026-04-27 18:07:15 +02:00
* web: Fix numeric values in search select inputs. * web: Fix ARIA attributes on menu items. * web: Fix issues surrounding nested modal actions, selectors, labels. * web: Prepare group forms for testing, ARIA, etc. * web: Clarify when spinner buttons are busy. * web: Fix dark theme toggle input visibility. * web: Fix issue where tests complete before optional search inputs load. * web: Add user creation tests, group creation. Flesh out fixtures.
31 lines
730 B
TypeScript
31 lines
730 B
TypeScript
import { ConsoleLogger, FixtureLogger } from "#logger/node";
|
|
|
|
import { Page } from "@playwright/test";
|
|
|
|
export interface PageFixtureInit {
|
|
page: Page;
|
|
testName: string;
|
|
}
|
|
|
|
export abstract class PageFixture {
|
|
/**
|
|
* The name of the fixture.
|
|
*
|
|
* Used for logging.
|
|
*/
|
|
static fixtureName: string;
|
|
|
|
protected readonly logger: FixtureLogger;
|
|
protected readonly page: Page;
|
|
protected readonly testName: string;
|
|
|
|
constructor({ page, testName }: PageFixtureInit) {
|
|
this.page = page;
|
|
this.testName = testName;
|
|
|
|
const Constructor = this.constructor as typeof PageFixture;
|
|
|
|
this.logger = ConsoleLogger.fixture(Constructor.fixtureName, this.testName);
|
|
}
|
|
}
|