fix: resolve all lint errors in e2e tests and improve type safety
- Replace 'any' types with proper TypeScript interfaces in auth setup/teardown - Remove conflicting custom Playwright type declarations that were overriding official types - Fix ES module compatibility by replacing require() with proper import paths - Add proper generic typing to Playwright test fixtures - Fix test discovery in auth debug configuration - Add comprehensive auth debug setup documentation Fixes: - 3 lint warnings about explicit 'any' usage - 45+ TypeScript compilation errors from type conflicts - ES module import errors in auth configuration - Test fixture typing issues All e2e tests now pass lint and type checking with zero warnings.
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
import { test as base } from '@playwright/test';
|
||||
import { test as base, Page } from '@playwright/test';
|
||||
|
||||
// Define fixture types
|
||||
type TestFixtures = {
|
||||
adminPage: Page;
|
||||
userPage: Page;
|
||||
};
|
||||
|
||||
// Extend basic test with custom fixtures
|
||||
export const test = base.extend({
|
||||
export const test = base.extend<TestFixtures>({
|
||||
// Auto-login fixture for admin user
|
||||
adminPage: async ({ page }, use) => {
|
||||
await page.goto('/');
|
||||
|
||||
Reference in New Issue
Block a user