fix: remove TeamsCTA from teams loading skeleton#28323
Merged
anikdhabal merged 3 commits intomainfrom Mar 8, 2026
Merged
Conversation
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>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
There was a problem hiding this comment.
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.
Contributor
Devin AI is addressing Cubic AI's review feedbackNew feedback has been sent to the existing Devin session. ✅ Pushed commit |
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>
Contributor
E2E results are ready! |
anikdhabal
approved these changes
Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.