test: enhance E2E and integration testing infrastructure
- Add comprehensive TypeScript types to E2E test helpers - Improve medication, auth, modal, and wait helper classes with proper typing - Enhance test data with readonly type assertions for better immutability - Update integration tests with better error handling and assertions - Improve Playwright type definitions for better IDE support - Add environment variable support to manual test scripts
This commit is contained in:
8
types/playwright.d.ts
vendored
8
types/playwright.d.ts
vendored
@@ -30,11 +30,11 @@ declare module '@playwright/test' {
|
||||
(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;
|
||||
extend: (fixtures: Record<string, unknown>) => TestFunction;
|
||||
}
|
||||
|
||||
export interface ExpectFunction {
|
||||
(actual: any): {
|
||||
(actual: unknown): {
|
||||
toBeVisible(): Promise<void>;
|
||||
toContainText(text: string | string[]): Promise<void>;
|
||||
toHaveClass(pattern: RegExp): Promise<void>;
|
||||
@@ -64,7 +64,7 @@ declare module '@playwright/test' {
|
||||
};
|
||||
projects?: Array<{
|
||||
name: string;
|
||||
use: any;
|
||||
use: Record<string, unknown>;
|
||||
}>;
|
||||
webServer?: {
|
||||
command: string;
|
||||
@@ -77,6 +77,6 @@ declare module '@playwright/test' {
|
||||
export function defineConfig(config: Config): Config;
|
||||
|
||||
export const devices: {
|
||||
[key: string]: any;
|
||||
[key: string]: Record<string, unknown>;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user