Skip to content

feat(frontend): e2e onboarding guard tests#4509

Merged
jog1t merged 1 commit intomainfrom
03-25-feat_frontend_e2e_onboarding_guard_tests
Mar 26, 2026
Merged

feat(frontend): e2e onboarding guard tests#4509
jog1t merged 1 commit intomainfrom
03-25-feat_frontend_e2e_onboarding_guard_tests

Conversation

@jog1t
Copy link
Copy Markdown
Contributor

@jog1t jog1t commented Mar 25, 2026

Description

This PR adds comprehensive end-to-end testing for the onboarding flow and improves the test infrastructure for cloud-based features. The changes include a new GitHub Actions workflow that runs onboarding E2E tests when relevant files are modified, along with enhanced test fixtures and page objects for better test maintainability.

The E2E tests now cover the complete onboarding journey including project creation, provider selection, backend configuration with health checks, and verification steps. Test fixtures have been refactored to be more modular and reusable, with proper page object methods for common onboarding actions.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The changes include comprehensive E2E tests that verify:

  • Project creation and wizard navigation
  • Provider selection grid rendering
  • Backend configuration with health check mocking
  • Connection success/failure states
  • Verification step behavior with different backend states
  • Skip-to-deploy functionality

The new GitHub Actions workflow automatically runs these tests when onboarding-related files are modified, ensuring continuous validation of the onboarding experience.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link
Copy Markdown

railway-app bot commented Mar 25, 2026

🚅 Deployed to the rivet-pr-4509 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-inspector ❌ Build Failed (View Logs) Web Mar 26, 2026 at 2:42 am
frontend-cloud ❌ Build Failed (View Logs) Web Mar 26, 2026 at 2:42 am
ladle ❌ Build Failed (View Logs) Web Mar 26, 2026 at 2:41 am
kitchen-sink ❌ Build Failed (View Logs) Web Mar 26, 2026 at 2:41 am
website 😴 Sleeping (View Logs) Web Mar 25, 2026 at 5:11 pm
mcp-hub ✅ Success (View Logs) Web Mar 25, 2026 at 4:52 pm

@jog1t jog1t marked this pull request as ready for review March 25, 2026 16:49
Copy link
Copy Markdown
Contributor Author

jog1t commented Mar 25, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link
Copy Markdown

claude bot commented Mar 25, 2026

PR Review: feat(frontend): e2e onboarding guard tests

This PR adds comprehensive E2E tests for the onboarding flow and improves the test infrastructure. Overall it's well-structured and a meaningful improvement over the previous state.


Positives

  • Good page object pattern — encapsulating locator logic in OnboardingPage / OnboardingIntegrationPage keeps tests readable and reduces duplication.
  • API mocking in navigateToNewProject() — mocking runner configs and actors at the fixture level to ensure a fresh wizard state is the right approach for reliable cloud E2E tests.
  • CI improvements — Playwright browser caching, --frozen-lockfile, concurrency cancellation, and separate trace artifact uploads are all solid.
  • preview:cloud in CI — switching from dev:cloud to pnpm preview:cloud in CI avoids rebuilds mid-test.
  • Trace always-ontrace: 'on' produces traces for every run, which is very helpful for debugging flaky cloud tests.

Issues

1. Missing newline at end of pnpm-workspace.yaml

The file ends with enableGlobalVirtualStore: true and no trailing newline. Most tools and editors flag this. Please add a newline.

2. Datacenter mock shape may be incorrect

In the backend step regression test, the mock response uses:

{ label: 1, name: "atl", url: "https://atl.rivet.run" }

The label field is 1 (a number). If the actual API returns a string label (e.g., "Atlanta"), the combobox option text may differ from what selectFirstDatacenter() expects. Worth cross-checking the actual Datacenter type shape used in the frontend to make sure this mock won't silently mislead.

3. selectFirstDatacenter() uses an overly broad locator

await this.page.getByRole("combobox").click();
await this.page.getByRole("option").first().click();

If there are multiple comboboxes on the page (e.g., other selects on the backend step), .getByRole("combobox") could click the wrong one. Prefer a more specific locator scoped to the datacenter field label or a known container.

4. Each test creates a real project via the cloud API

Tests like "provider selection grid renders all expected providers" create a real project just to reach the wizard. If project creation is slow or flaky, all downstream tests will be brittle. Consider whether the wizard could be reached without a project-creation round-trip, or at least share a single created project across tests in the onboarding wizard describe block using test.beforeAll.

5. Removed continue-on-error: true without acknowledgement

The old engine E2E job had continue-on-error: true, making failures non-blocking. The new dashboard-e2e-cloud job does not — worth confirming the team is comfortable with cloud E2E failures now blocking the workflow.

6. Concurrency group cancels across all branches

concurrency:
  group: frontend-${{ github.ref }}
  cancel-in-progress: true

This will cancel in-progress runs on main if a new commit is pushed. If post-merge CI on main is important (e.g., deploying artifacts), consider scoping cancellation to PR branches only:

concurrency:
  group: frontend-${{ github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

Minor Notes

  • The shard matrix is currently shardIndex: [1] / shardTotal: [1] (no actual sharding). Fine as scaffolding, but a comment clarifying it's a no-op placeholder would help future maintainers.
  • The test name "Next Button Regression Test Project" is descriptive — consider adding a short inline comment linking to the issue/PR that introduced the regression so future readers have context.
  • Import ordering in getting-started.tsx: TEST_IDS is inserted between unrelated import groups rather than grouped with the other ../utils/* imports.

Summary

The core testing approach is sound and the new tests cover meaningful scenarios. Main items worth addressing before merge: the datacenter mock shape (2), the overly broad combobox locator (3), and the concurrency group behaviour on main (6). The rest are minor polish items.

@jog1t jog1t force-pushed the 03-25-feat_frontend_e2e_onboarding_guard_tests branch from b6c46de to e9b793e Compare March 25, 2026 17:06
@jog1t jog1t force-pushed the 03-25-feat_frontend_e2e_onboarding_guard_tests branch from e9b793e to e069ec5 Compare March 25, 2026 17:16
@jog1t jog1t force-pushed the 03-25-feat_frontend_e2e_onboarding_guard_tests branch 2 times, most recently from e356900 to 55c5180 Compare March 25, 2026 18:50
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 25, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4509

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4509

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4509

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4509

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4509

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4509

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4509

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4509

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4509

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4509

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4509

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4509

commit: 4a264e1

@jog1t jog1t force-pushed the 03-25-feat_frontend_e2e_onboarding_guard_tests branch from 4a264e1 to bff26cf Compare March 26, 2026 02:41
Copy link
Copy Markdown
Contributor Author

jog1t commented Mar 26, 2026

Merge activity

  • Mar 26, 2:44 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 26, 2:44 AM UTC: @jog1t merged this pull request with Graphite.

@jog1t jog1t merged commit fb9912b into main Mar 26, 2026
12 of 19 checks passed
@jog1t jog1t deleted the 03-25-feat_frontend_e2e_onboarding_guard_tests branch March 26, 2026 02:44
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