Skip to content

Set up unit and end-to-end (E2E) testing across the app #96

@afrinxnahar

Description

@afrinxnahar

🎯 Problem Statement
Script AI lacks comprehensive unit and e2e testing, increasing risk of regressions and slowing delivery.

💡 Proposed Solution

  • Choose stack: Jest + Testing Library for unit/component tests (React), Playwright for E2E.
  • Add test configuration and sample tests for core areas: auth flows, idea, script flow, contact form, credits calc, notification preferences.
  • Create CI workflows to run unit and E2E tests on PRs using test environments and mock external APIs.
  • Add code-coverage reporting and enforce a baseline coverage gate.

📊 Impact Assessment
User Impact: Indirect but High (fewer bugs).
Development Effort: Medium–High.
Priority: High.

🧪 Acceptance Criteria

  • Unit testing framework installed and configured.
  • E2E framework installed and configured.
  • CI runs tests on PRs and blocks merging on failures.
  • Representative tests cover key user flows.

🔗 Related Features
All features (contact, email, credits, idea research, etc.)

📚 Additional Context
Mock external APIs in unit tests; for E2E consider a seeded test DB snapshot.

📋 Checklist

  • Choose test frameworks
  • Add test config & scripts
  • Add CI test jobs
  • Write representative unit tests
  • Write representative E2E tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthigh priorityTop most priority based task

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions