- Migrated from Python pre-commit to NodeJS-native solution - Reorganized documentation structure - Set up Husky + lint-staged for efficient pre-commit hooks - Fixed Dockerfile healthcheck issue - Added comprehensive documentation index
83 lines
2.2 KiB
TypeScript
83 lines
2.2 KiB
TypeScript
// Temporary type declarations for Playwright
|
|
// This file can be removed once @playwright/test is properly installed
|
|
|
|
declare module '@playwright/test' {
|
|
export interface Page {
|
|
goto(url: string): Promise<void>;
|
|
click(selector: string): Promise<void>;
|
|
fill(selector: string, value: string): Promise<void>;
|
|
selectOption(selector: string, value: string): Promise<void>;
|
|
locator(selector: string): Locator;
|
|
waitForSelector(
|
|
selector: string,
|
|
options?: { timeout?: number }
|
|
): Promise<void>;
|
|
setViewportSize(size: { width: number; height: number }): Promise<void>;
|
|
}
|
|
|
|
export interface Locator {
|
|
click(): Promise<void>;
|
|
fill(value: string): Promise<void>;
|
|
toBeVisible(): Promise<void>;
|
|
toContainText(text: string | string[]): Promise<void>;
|
|
toHaveClass(pattern: RegExp): Promise<void>;
|
|
not: Locator;
|
|
first(): Locator;
|
|
toHaveCount(count: number): Promise<void>;
|
|
}
|
|
|
|
export interface TestFunction {
|
|
(name: string, fn: ({ page }: { page: Page }) => Promise<void>): void;
|
|
describe: (name: string, fn: () => void) => void;
|
|
beforeEach: (fn: ({ page }: { page: Page }) => Promise<void>) => void;
|
|
extend: (fixtures: any) => TestFunction;
|
|
}
|
|
|
|
export interface ExpectFunction {
|
|
(actual: any): {
|
|
toBeVisible(): Promise<void>;
|
|
toContainText(text: string | string[]): Promise<void>;
|
|
toHaveClass(pattern: RegExp): Promise<void>;
|
|
not: {
|
|
toBeVisible(): Promise<void>;
|
|
toHaveClass(pattern: RegExp): Promise<void>;
|
|
};
|
|
toHaveCount(count: number): Promise<void>;
|
|
};
|
|
}
|
|
|
|
export const test: TestFunction;
|
|
export const expect: ExpectFunction;
|
|
|
|
export interface Config {
|
|
testDir?: string;
|
|
fullyParallel?: boolean;
|
|
forbidOnly?: boolean;
|
|
retries?: number;
|
|
workers?: number;
|
|
reporter?: string;
|
|
use?: {
|
|
baseURL?: string;
|
|
trace?: string;
|
|
screenshot?: string;
|
|
video?: string;
|
|
};
|
|
projects?: Array<{
|
|
name: string;
|
|
use: any;
|
|
}>;
|
|
webServer?: {
|
|
command: string;
|
|
url: string;
|
|
reuseExistingServer: boolean;
|
|
timeout: number;
|
|
};
|
|
}
|
|
|
|
export function defineConfig(config: Config): Config;
|
|
|
|
export const devices: {
|
|
[key: string]: any;
|
|
};
|
|
}
|