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:
William Valentin
2025-09-08 08:47:21 -07:00
parent 4d12aeef61
commit a1b3c6a8ed
6 changed files with 533 additions and 127 deletions

View File

@@ -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('/');