Skip to content

Replace any types in E2E auth fixture with Playwright types #69

Description

@aruneshwisdm

Summary

The E2E auth fixture file uses `any` for Playwright's `Browser` and `Page` types in several helper functions. Since Playwright provides proper TypeScript types, these should be used instead.

Current code

In `apps/web/e2e/fixtures/auth.fixture.ts`:

export async function setupAuthState(browser: any): Promise<void> {  // line 79
export async function ensureTestUserExists(page: any): Promise<void> {  // line 106
export async function logout(page: any): Promise<void> {  // line 144
export async function switchUser(page: any, user: typeof TEST_USER): Promise<void> {  // line 158

What to do

Import and use the proper Playwright types:

import { type Browser, type Page } from '@playwright/test';

export async function setupAuthState(browser: Browser): Promise<void> {
export async function ensureTestUserExists(page: Page): Promise<void> {
export async function logout(page: Page): Promise<void> {
export async function switchUser(page: Page, user: typeof TEST_USER): Promise<void> {

Files

  • `apps/web/e2e/fixtures/auth.fixture.ts`

Acceptance criteria

  • All four `any` parameter types are replaced with `Browser` or `Page` from `@playwright/test`
  • TypeScript compiles without errors
  • No functionality changes — only type annotations are updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions