Skip to content

fix: remove TeamsCTA from teams loading skeleton#28323

Merged
anikdhabal merged 3 commits intomainfrom
devin/1772860987-fix-teams-e2e-flaky-new-team-btn
Mar 8, 2026
Merged

fix: remove TeamsCTA from teams loading skeleton#28323
anikdhabal merged 3 commits intomainfrom
devin/1772860987-fix-teams-e2e-flaky-new-team-btn

Conversation

@romitg2
Copy link
Member

@romitg2 romitg2 commented Mar 7, 2026

ci failure 1: https://github.com/calcom/cal.com/actions/runs/22792132011/job/66121206332?pr=28319#step:12:108
ci failure 2:https://github.com/calcom/cal.com/actions/runs/22801759841/job/66144602635?pr=28320#step:12:110
Screenshot 2026-03-07 at 2 04 45 PM

problem:

  • The E2E test failed because two elements with data-testid="new-team-btn" existed in the DOM simultaneously.

  • The first button came from skeleton.tsx, which renders while the page is loading. The second button came from page.tsx (via server-page.tsx), which also renders when the actual content loads. During the transition from skeleton to real page, both buttons briefly coexisted in the DOM, causing Playwright's strict mode to fail when trying to click a single element.

  • also as all users don't have team plan, having TeamsCTA in skeleton also allows users to bypass upgrade banner, so only show this +new team button for users with team plan (don't show during skeleton)

solution:

Remove the CTA from the skeleton so only the actual page renders the button for only users with team plan otherwise we'll show upgrade banner.

Remove TeamsCTA from the loading skeleton to prevent duplicate
data-testid='new-team-btn' elements in the DOM during Next.js
streaming SSR. The skeleton's Suspense fallback and the resolved
page content can briefly coexist, causing Playwright's strict
mode to fail when both contain the same test ID.

Also use .first() in the E2E test as a defensive measure.

Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com>
@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

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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 2 files

Prompt for AI agents (unresolved 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/web/playwright/teams.e2e.ts">

<violation number="1" location="apps/web/playwright/teams.e2e.ts:178">
P2: Using `.first()` on `new-team-btn` masks duplicate-element regressions; assert a single match before clicking so the test still catches unintended duplicate CTAs.</violation>
</file>

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

Devin AI is addressing Cubic AI's review feedback

New feedback has been sent to the existing Devin session.

View Devin Session


✅ Pushed commit 586b02d

devin-ai-integration bot and others added 2 commits March 7, 2026 05:30
Address Cubic AI review feedback: use toHaveCount(1) assertion
to ensure exactly one new-team-btn exists, rather than .first()
which could mask duplicate-element regressions.

Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com>
Per user feedback: only change needed is removing TeamsCTA from
the loading skeleton to prevent users without a team plan from
bypassing the upgrade banner via the skeleton CTA.

Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com>
@devin-ai-integration devin-ai-integration bot changed the title fix: resolve duplicate new-team-btn selector in teams E2E test fix: remove TeamsCTA from teams loading skeleton Mar 7, 2026
@romitg2 romitg2 marked this pull request as ready for review March 7, 2026 08:40
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

E2E results are ready!

@anikdhabal anikdhabal enabled auto-merge (squash) March 8, 2026 07:42
@anikdhabal anikdhabal merged commit 7801266 into main Mar 8, 2026
109 of 113 checks passed
@anikdhabal anikdhabal deleted the devin/1772860987-fix-teams-e2e-flaky-new-team-btn branch March 8, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Created by Linear-GitHub Sync ready-for-e2e size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants