Skip to content

feat(playwright): initialize Playwright with connection creation test#2485

Merged
viktormarinho merged 15 commits intomainfrom
feat/playwright
Feb 25, 2026
Merged

feat(playwright): initialize Playwright with connection creation test#2485
viktormarinho merged 15 commits intomainfrom
feat/playwright

Conversation

@viktormarinho
Copy link
Contributor

@viktormarinho viktormarinho commented Feb 24, 2026

Summary

Initializes Playwright e2e testing in apps/mesh/. Branches off feat/connections-setup so it can be reviewed separately.

What's included

  • playwright.config.ts — Chromium only, port 4000, reuseExistingServer: true (run bun run dev first)
  • e2e/fixtures/auth.tssignUp() helper that creates a unique test user via the login form
  • e2e/tests/connection-create.spec.ts — first test: sign up → enter org → connections page → create HTTP connection → assert detail page

Running the tests

# Start the dev server first
bun run dev

# Run all e2e tests
bun run --cwd=apps/mesh test:e2e

# Run with Playwright UI (recommended for development)
bun run --cwd=apps/mesh test:e2e:ui

Notes

  • Each test run creates a unique user (test-{timestamp}@playwright.local) — no test data cleanup needed
  • The org name selector (button[hasText=/open/i]) may need adjustment depending on the exact home page layout — this is the first thing to validate when running against a live server
  • Chromium browser binaries are downloaded via npx playwright install chromium (not committed)

🤖 Generated with Claude Code


Summary by cubic

Sets up Playwright E2E tests for Mesh with a first test that signs up and creates an HTTP connection. Adds CI to run them on main and PRs, and updates unit test CI to avoid running Playwright specs.

  • New Features

    • Playwright config in apps/mesh: Chromium, baseURL http://localhost:3000, starts dev server, 1 worker, CI retries with trace/screenshots on failure.
    • Auth fixture signUp() creates a unique user via /login; first E2E creates a “Custom Connection” (HTTP) and verifies the detail page.
    • GitHub Actions workflow installs Bun/Playwright, writes auth-config.json, creates SQLite data dir, and runs E2E on main and PRs.
  • Bug Fixes

    • Signup stability: wait for inputs, fill before Continue, wait for redirect; extract org slug and navigate directly to connections.
    • Prevent Bun from running Playwright specs: scope root test script to apps/mesh/src and packages; CI now uses bun run test.
    • Knip cleanup: ignore Playwright binary in knip.jsonc and keep generateTestUser internal.

Written for commit b91a516. Summary will update on new commits.

@github-actions
Copy link
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

Release Options

Should a new version be published when this PR is merged?

React with an emoji to vote on the release type:

Reaction Type Next Version
👍 Prerelease 2.114.2-alpha.1
🎉 Patch 2.114.2
❤️ Minor 2.115.0
🚀 Major 3.0.0

Current version: 2.114.1

Deployment

  • Deploy to production (triggers ArgoCD sync after Docker image is published)

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/mesh/e2e/fixtures/auth.ts">

<violation number="1" location="apps/mesh/e2e/fixtures/auth.ts:28">
P2: Waiting unconditionally for the “Sign up” toggle can time out when the form already starts in sign-up mode (the link is absent), causing the test to fail. Guard the click so it only runs when the toggle exists.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@viktormarinho viktormarinho changed the base branch from feat/connections-setup to main February 24, 2026 21:56
viktormarinho and others added 3 commits February 25, 2026 09:16
`bun test` was picking up `apps/mesh/e2e/**/*.spec.ts` and running
Playwright files through Bun's runner, causing an immediate crash.
Scope the test command to `apps/mesh/src` and `packages` where all
unit tests live.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
bun test directly picks up apps/mesh/e2e/*.spec.ts and crashes when
Playwright APIs are called outside the Playwright runner. bun run test
scopes to apps/mesh/src and packages where unit tests live.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Add playwright to ignoreBinaries (used via npx in e2e workflow)
- Remove export from generateTestUser (only used internally by signUp)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@viktormarinho viktormarinho merged commit 294c522 into main Feb 25, 2026
8 of 9 checks passed
@viktormarinho viktormarinho deleted the feat/playwright branch February 25, 2026 12:37
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.

1 participant