Skip to content

Set up Playwright and write one end-to-end repository import test #22

Description

@SHAURYASANYAL3

🛑 The Problem

We have zero End-to-End (E2E) test coverage. We could accidentally break the main 'Import Repository' button, and our unit tests would still pass, but users wouldn't be able to use the app. We need a browser automation test to act as a final safety net.

💡 The Solution

Install Playwright and write a single, highly-reliable smoke test for the critical user journey: visiting the homepage, importing a repo, and viewing the dashboard.

🛠️ Implementation Details

  1. Run pnpm create playwright to scaffold the setup.
  2. Write a test script e2e/import.spec.ts.
  3. The test should:
    • page.goto('/')
    • page.fill('input[name="repo"]', 'voidswift/Forge-Lens')
    • page.click('button[type="submit"]')
    • page.waitForURL('**/dashboard/**')
    • expect(page.locator('h1')).toContainText('Health Score')
  4. Add a pnpm test:e2e script to package.json.

✅ Acceptance Criteria

  • Playwright runs headless successfully.
  • The test accurately simulates the user journey.
  • The test automatically runs on GitHub Actions (optional but preferred).

Ready to tackle this? Comment .take below to get automatically assigned!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions