Skip to content

Implement @lytics/playwright-adapters-internal (Firestore) #3

Description

@prosdev

Branch: feat/implement-firestore-adapter

Priority: High

Estimate: 1-2 hours

Parent Epic: #1

Dependencies: #2

Description

Migrate Firestore adapter with Lytics-specific schema to the internal package. This adapter writes test results and runs to Firestore collections for dashboard visualization and trend analysis. It includes retry logic and proper error handling for production reliability.

Acceptance Criteria

  • Adapter implements ResultAdapter interface from @lytics/playwright-reporter
  • Writes to Firestore collections (test_runs, individual_test_runs, latest_test_cases) correctly
  • Handles GCP authentication (Application Default Credentials + Service Account JSON fallback)
  • Includes retry logic with exponential backoff for transient failures
  • Unit tests pass with Firestore emulator or mocks
  • Published to GitHub Packages registry
  • Documentation includes authentication setup and Firestore schema

Technical Requirements

  • Migrate FirestoreAdapter.ts implementing ResultAdapter interface
  • Update imports to use @lytics/playwright-reporter
  • Configure publishConfig for GitHub Packages
  • Add error handling for network failures and auth issues
  • Document Firestore collections schema
  • Add examples for local development vs CI environment

Files to Migrate

  • src/reporter/adapters/FirestoreAdapter.tspackages/adapters-internal/src/firestore/FirestoreAdapter.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions