Skip to content

feat: enable onboarding-v3 globally and update e2e tests#27922

Merged
volnei merged 4 commits intomainfrom
devin/1770972916-enable-onboarding-v3-globally
Feb 13, 2026
Merged

feat: enable onboarding-v3 globally and update e2e tests#27922
volnei merged 4 commits intomainfrom
devin/1770972916-enable-onboarding-v3-globally

Conversation

@sean-brydon
Copy link
Member

@sean-brydon sean-brydon commented Feb 13, 2026

What does this PR do?

Enables the onboarding-v3 feature flag globally via a Prisma migration (it's been enabled in production for months) and updates all e2e tests that were testing the old onboarding flow.

Changes:

  1. Migration: Sets onboarding-v3 feature flag enabled = true in the Feature table
  2. onboarding.e2e.ts: Fully rewritten from old 5-step flow to new 3-step v3 flow (Plan Selection → Personal Settings → Calendar Connection)
  3. 5 other test files: URL assertions updated to accept both old (/getting-started) and new (/onboarding/getting-started, /onboarding/personal/settings) onboarding paths
  4. waitForURL fix: Changed signupFromInviteLink and signupFromEmailInviteLink helpers in organization-invitation.e2e.ts, signup.e2e.ts, and team-invitation.e2e.ts to match against url.pathname only instead of the full URL string. The previous regex /\/(getting-started|onboarding\/(getting-started|personal\/settings))/ was falsely matching the callbackUrl=/onboarding/personal/settings query parameter in the signup page URL itself, causing waitForURL to resolve immediately before the signup API call completed — resulting in the user never being persisted to the database.

Requested by: @sean-brydon
Link to Devin run

Updates since last revision

Fixed the 4 failing organization-invitation.e2e.ts tests. Root cause: with onboarding-v3 enabled, org invite links include callbackUrl=/onboarding/personal/settings as a query param. The waitForURL regex matched this query param on the signup page itself, so the test proceeded before signup completed. The fix uses a function-based URL matcher that checks only url.pathname:

// Before (matches query params too — broken)
await page.waitForURL(/\/(getting-started|onboarding\/(getting-started|personal\/settings))/);

// After (matches pathname only)
await page.waitForURL((url) => {
  const path = url.pathname;
  return /\/(getting-started|onboarding\/(getting-started|personal\/settings))/.test(path);
});

All 4 previously-failing tests now pass locally.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Apply the migration and confirm the onboarding-v3 flag is enabled
  2. Run the updated e2e tests, especially onboarding.e2e.ts and organization-invitation.e2e.ts, to verify they pass against the v3 flow
  3. Sign up as a new user and confirm the v3 onboarding flow loads (/onboarding/getting-started/onboarding/personal/settings/onboarding/personal/calendar)

⚠️ Items for Reviewer Attention

  1. onboarding.e2e.ts selectors need verification: The rewritten test uses button:has-text("Continue"), input[name="name"], and button[type="submit"] — these should be verified against the actual v3 onboarding UI components. These were not validated against a running dev server with the full UI.
  2. Dual-path regex patterns: The other test files accept both old AND new onboarding URLs. Since v3 is now globally enabled, consider whether these should exclusively match v3 paths (e.g. /onboarding/getting-started) instead of also accepting /getting-started. The dual-accept approach prevents breakage but is a weaker assertion.
  3. auth-index.e2e.ts lost content assertion: Previously checked for "Welcome to Cal.com!" text visibility; now only asserts the redirect URL. This is a weaker check.
  4. ab-tests-redirect.e2e.ts: Now navigates directly to /onboarding/personal/calendar instead of /getting-started/connected-calendar — assumes the v3 calendar page renders "Apple Calendar" text the same way.

Checklist

  • My code follows the style guidelines of this project
  • I have checked if my changes generate no new warnings
  • My PR is not too large (<500 lines, <10 files)

- Add migration to set onboarding-v3 feature flag enabled=true
- Rewrite onboarding.e2e.ts for v3 flow (Plan Selection → Personal Settings → Calendar)
- Update URL assertions in signup, team-invitation, org-invitation, ab-tests-redirect, and auth tests to accept both old and new onboarding paths

Co-Authored-By: sean@cal.com <Sean@brydon.io>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions github-actions bot added the ❗️ migrations contains migration files label Feb 13, 2026
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.

2 issues found across 7 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/web/playwright/onboarding.e2e.ts">

<violation number="1" location="apps/web/playwright/onboarding.e2e.ts:22">
P2: Rule violated: **E2E Tests Best Practices**

Avoid text-based locators in E2E tests. Rule 1 requires using explicit data-testid selectors (getByTestId) instead of text locators like `button:has-text("Continue")` to keep tests resilient.</violation>

<violation number="2" location="apps/web/playwright/onboarding.e2e.ts:40">
P2: `/event-types**` is not a valid glob-style URL pattern for Playwright and may never match, causing the test to hang. Use a proper glob segment (e.g., `**/event-types`) or a regex.</violation>
</file>

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

@sean-brydon sean-brydon marked this pull request as ready for review February 13, 2026 09:12
@sean-brydon sean-brydon requested a review from a team as a code owner February 13, 2026 09:12
@graphite-app graphite-app bot requested a review from a team February 13, 2026 09:12
@graphite-app graphite-app bot added core area: core, team members only consumer labels Feb 13, 2026
@github-actions
Copy link
Contributor

E2E results are ready!

Copy link
Contributor

@volnei volnei left a comment

Choose a reason for hiding this comment

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

I love tests! ❤️

@volnei volnei enabled auto-merge (squash) February 13, 2026 10:36
@volnei volnei merged commit 7aefefc into main Feb 13, 2026
56 checks passed
@volnei volnei deleted the devin/1770972916-enable-onboarding-v3-globally branch February 13, 2026 10:37
volnei added a commit that referenced this pull request Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer core area: core, team members only ❗️ migrations contains migration files ready-for-e2e size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants