Skip to content

Add comprehensive E2E testing infrastructure with Playwright#121

Merged
borisno2 merged 48 commits intomainfrom
claude/add-e2e-tests-016gz6WiGaMEfqKobtSrHyiR
Nov 23, 2025
Merged

Add comprehensive E2E testing infrastructure with Playwright#121
borisno2 merged 48 commits intomainfrom
claude/add-e2e-tests-016gz6WiGaMEfqKobtSrHyiR

Conversation

@borisno2
Copy link
Copy Markdown
Member

Implemented a complete end-to-end testing suite for OpenSaaS Stack using Playwright, with comprehensive test coverage for the starter-auth example.

Infrastructure

  • Added Playwright configuration with global setup/teardown
  • Created test utilities for authentication and database management
  • Configured automatic dev server startup for tests
  • Updated .gitignore for test artifacts

Test Coverage (~40 tests)

  • Build validation (7 tests): Project builds, schema generation, TypeScript compilation
  • Authentication (13 tests): Sign up, sign in, password reset, session management
  • CRUD & Access Control (10 tests): Operation-level and field-level access control
  • Admin UI (15 tests): Forms, tables, navigation, validation

Key Features

  • Tests validate build process, auth flows, and end-to-end functionality
  • Full access control testing (operation-level and field-level)
  • CRUD operations with validation and hooks
  • Admin UI component testing
  • CI/CD ready with GitHub Actions support

Documentation

  • Comprehensive E2E testing guide (e2e/README.md)
  • Summary document with quick start guide
  • Troubleshooting and debugging tips
  • Examples for extending tests to other examples

Scripts Added

  • pnpm test:e2e - Run all E2E tests
  • pnpm test:e2e:ui - Run with UI mode
  • pnpm test:e2e:headed - Run with visible browser
  • pnpm test:e2e:debug - Debug mode
  • pnpm test:e2e:codegen - Generate test code

Files Created

  • playwright.config.ts
  • e2e/utils/auth.ts
  • e2e/utils/db.ts
  • e2e/global-setup.ts
  • e2e/global-teardown.ts
  • e2e/starter-auth/00-build.spec.ts
  • e2e/starter-auth/01-auth.spec.ts
  • e2e/starter-auth/02-posts-access-control.spec.ts
  • e2e/starter-auth/03-admin-ui.spec.ts
  • e2e/README.md
  • E2E_TESTING_SUMMARY.md

Dependencies Added

  • @playwright/test
  • playwright

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
stack-docs Ready Ready Preview Comment Nov 23, 2025 4:33am

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Nov 18, 2025

🦋 Changeset detected

Latest commit: 19fcb54

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@opensaas/stack-core Minor
@opensaas/stack-auth Major
@opensaas/stack-cli Patch
@opensaas/stack-rag Major
@opensaas/stack-storage Major
@opensaas/stack-tiptap Major
@opensaas/stack-ui Major
@opensaas/stack-storage-s3 Major
@opensaas/stack-storage-vercel Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

🎭 E2E Test Results

❌ Some E2E tests failed.

View the full Playwright report for details.

Screenshots and traces have been uploaded as artifacts.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 18, 2025

Coverage Report for Storage S3 Package Coverage (./packages/storage-s3)

Status Category Percentage Covered / Total
🔵 Lines 100% 40 / 40
🔵 Statements 100% 40 / 40
🔵 Functions 100% 9 / 9
🔵 Branches 100% 19 / 19
File CoverageNo changed files found.
Generated in workflow #477 for commit 19fcb54 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 18, 2025

Coverage Report for Auth Package Coverage (./packages/auth)

Status Category Percentage Covered / Total
🔵 Lines 64.49% 89 / 138
🔵 Statements 61.03% 94 / 154
🔵 Functions 74.46% 35 / 47
🔵 Branches 62.79% 54 / 86
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/auth/src/config/types.ts 0% 0% 0% 0%
Generated in workflow #477 for commit 19fcb54 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 18, 2025

Coverage Report for Storage Vercel Package Coverage (./packages/storage-vercel)

Status Category Percentage Covered / Total
🔵 Lines 100% 38 / 38
🔵 Statements 100% 38 / 38
🔵 Functions 100% 8 / 8
🔵 Branches 100% 22 / 22
File CoverageNo changed files found.
Generated in workflow #477 for commit 19fcb54 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 18, 2025

Coverage Report for Storage Package Coverage (./packages/storage)

Status Category Percentage Covered / Total
🔵 Lines 43.45% 73 / 168
🔵 Statements 43.78% 74 / 169
🔵 Functions 45.45% 15 / 33
🔵 Branches 40.13% 61 / 152
File CoverageNo changed files found.
Generated in workflow #477 for commit 19fcb54 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 18, 2025

Coverage Report for RAG Package Coverage (./packages/rag)

Status Category Percentage Covered / Total
🔵 Lines 47.97% 355 / 740
🔵 Statements 48.14% 377 / 783
🔵 Functions 54.26% 70 / 129
🔵 Branches 42.08% 178 / 423
File CoverageNo changed files found.
Generated in workflow #477 for commit 19fcb54 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 18, 2025

Coverage Report for UI Package Coverage (./packages/ui)

Status Category Percentage Covered / Total
🔵 Lines 76.03% 92 / 121
🔵 Statements 75.39% 95 / 126
🔵 Functions 75.6% 31 / 41
🔵 Branches 65.78% 75 / 114
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/ui/src/components/fields/TextField.tsx 100% 88.88% 100% 100%
Generated in workflow #477 for commit 19fcb54 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 18, 2025

Coverage Report for Core Package Coverage (./packages/core)

Status Category Percentage Covered / Total
🔵 Lines 84.55% 427 / 505
🔵 Statements 83.65% 435 / 520
🔵 Functions 95.83% 69 / 72
🔵 Branches 75% 312 / 416
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/access/engine.ts 96.36% 93.06% 100% 96.36% 155, 168, 172, 338
Generated in workflow #477 for commit 19fcb54 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 18, 2025

Coverage Report for CLI Package Coverage (./packages/cli)

Status Category Percentage Covered / Total
🔵 Lines 69.04% 290 / 420
🔵 Statements 67.59% 290 / 429
🔵 Functions 62.85% 22 / 35
🔵 Branches 46.34% 57 / 123
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/cli/src/generator/lists.ts 90% 0% 50% 90% 93-101
packages/cli/src/generator/prisma-config.ts 0% 0% 0% 0% 16-45
packages/cli/src/generator/types.ts 88.26% 62.5% 84.61% 91.32% 11, 21, 30, 40, 65, 99, 133, 161, 256-271, 279-283, 310-312
Generated in workflow #477 for commit 19fcb54 by the Vitest Coverage Report Action

@borisno2 borisno2 merged commit 3851a3c into main Nov 23, 2025
12 of 13 checks passed
@github-actions github-actions bot mentioned this pull request Nov 23, 2025
@borisno2 borisno2 deleted the claude/add-e2e-tests-016gz6WiGaMEfqKobtSrHyiR branch March 10, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants