Skip to content

Comments

chore: update playwright config for platform examples#23352

Merged
Ryukemeister merged 1 commit intomainfrom
update-playwright-config-for-atoms-tests
Aug 26, 2025
Merged

chore: update playwright config for platform examples#23352
Ryukemeister merged 1 commit intomainfrom
update-playwright-config-for-atoms-tests

Conversation

@Ryukemeister
Copy link
Contributor

What does this PR do?

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

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. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

@Ryukemeister Ryukemeister requested a review from a team August 26, 2025 09:09
@Ryukemeister Ryukemeister requested a review from a team as a code owner August 26, 2025 09:09
@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Aug 26, 2025
@graphite-app
Copy link

graphite-app bot commented Aug 26, 2025

Graphite Automations

"Add ready-for-e2e label" took an action on this PR • (08/26/25)

1 label was added to this PR based on Keith Williams's automation.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 26, 2025

Walkthrough

The Playwright configuration in packages/platform/examples/base/playwright.config.ts was modified by changing the fullyParallel property from true to false. No other configuration options were altered.

Possibly related PRs

  • feat: atoms e2e tests #22926: Introduced the Playwright config for packages/platform/examples/base with fullyParallel set to true; this PR directly changes that same property to false.

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-playwright-config-for-atoms-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2025

E2E results are ready!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/platform/examples/base/playwright.config.ts (1)

39-46: Secrets leak risk: interpolating env values into webServer.command can expose credentials in logs.

Interpolating X_CAL_SECRET_KEY and OAuth client secrets directly into the command string risks leakage in CI logs and local terminals. Prefer passing them via the webServer.env map so the command itself stays clean. Also avoids accidental injection of literal "undefined" when a var is missing.

Apply this diff:

   webServer: {
-    command: process.env.CI
-      ? `yarn workspace @calcom/atoms dev-on && yarn workspace @calcom/atoms build && rm -f prisma/dev.db && yarn prisma db push && NEXT_PUBLIC_IS_E2E=1 NODE_ENV=test NEXT_PUBLIC_X_CAL_ID="${process.env.ATOMS_E2E_OAUTH_CLIENT_ID}" X_CAL_SECRET_KEY="${process.env.ATOMS_E2E_OAUTH_CLIENT_SECRET}" NEXT_PUBLIC_CALCOM_API_URL="${process.env.ATOMS_E2E_API_URL}" VITE_BOOKER_EMBED_OAUTH_CLIENT_ID="${process.env.ATOMS_E2E_OAUTH_CLIENT_ID_BOOKER_EMBED}" VITE_BOOKER_EMBED_API_URL="${process.env.ATOMS_E2E_API_URL}" ORGANIZATION_ID=${process.env.ATOMS_E2E_ORG_ID} yarn dev:e2e`
-      : `rm -f prisma/dev.db && yarn prisma db push && yarn dev:e2e`,
+    command: process.env.CI
+      ? `yarn workspace @calcom/atoms dev-on && yarn workspace @calcom/atoms build && rm -f prisma/dev.db && yarn prisma db push && yarn dev:e2e`
+      : `rm -f prisma/dev.db && yarn prisma db push && yarn dev:e2e`,
     url: "http://localhost:4322",
     timeout: 600_000,
+    env: process.env.CI
+      ? {
+          NEXT_PUBLIC_IS_E2E: "1",
+          NODE_ENV: "test",
+          NEXT_PUBLIC_X_CAL_ID: process.env.ATOMS_E2E_OAUTH_CLIENT_ID,
+          X_CAL_SECRET_KEY: process.env.ATOMS_E2E_OAUTH_CLIENT_SECRET,
+          NEXT_PUBLIC_CALCOM_API_URL: process.env.ATOMS_E2E_API_URL,
+          VITE_BOOKER_EMBED_OAUTH_CLIENT_ID: process.env.ATOMS_E2E_OAUTH_CLIENT_ID_BOOKER_EMBED,
+          VITE_BOOKER_EMBED_API_URL: process.env.ATOMS_E2E_API_URL,
+          ORGANIZATION_ID: process.env.ATOMS_E2E_ORG_ID,
+        }
+      : undefined,
     reuseExistingServer: !process.env.CI,
   },

Additionally, consider failing fast if required vars are missing in CI (place near the top of the file):

if (process.env.CI) {
  const required = [
    "ATOMS_E2E_OAUTH_CLIENT_ID",
    "ATOMS_E2E_OAUTH_CLIENT_SECRET",
    "ATOMS_E2E_API_URL",
    "ATOMS_E2E_OAUTH_CLIENT_ID_BOOKER_EMBED",
    "ATOMS_E2E_ORG_ID",
  ];
  const missing = required.filter((k) => !process.env[k]);
  if (missing.length) {
    throw new Error(`Missing required CI env vars: ${missing.join(", ")}`);
  }
}
🧹 Nitpick comments (1)
packages/platform/examples/base/playwright.config.ts (1)

13-13: Confirm intent: fullyParallel: false only affects local runs (CI already serial).

With workers: process.env.CI ? 1 : undefined on Line 11, CI runs are already single-worker, so disabling intra-file parallelism has no CI effect; it will only serialize tests within a file for local developers. If the goal is to deflake CI, this change won’t help there. If the goal is to make local runs more predictable due to shared state, this is fine. Optionally gate it behind an env var so devs can opt-in when needed.

Optional toggle:

-  fullyParallel: false,
+  fullyParallel: !!process.env.SERIAL_E2E ? false : true,
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d9adb6c and 4424730.

📒 Files selected for processing (1)
  • packages/platform/examples/base/playwright.config.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never use include, always use select
Ensure the credential.key field is never returned from tRPC endpoints or APIs

Files:

  • packages/platform/examples/base/playwright.config.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • packages/platform/examples/base/playwright.config.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • packages/platform/examples/base/playwright.config.ts
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Publish HTML report / publish-report
  • GitHub Check: Publish HTML report / publish-report
  • GitHub Check: Publish HTML report / publish-report
  • GitHub Check: Publish HTML report / publish-report
  • GitHub Check: Publish HTML report / publish-report
  • GitHub Check: Publish HTML report / publish-report
  • GitHub Check: Publish HTML report / publish-report
  • GitHub Check: Publish HTML report / publish-report
  • GitHub Check: Publish HTML report / publish-report
  • GitHub Check: Publish HTML report / publish-report

@Ryukemeister Ryukemeister merged commit 3fa7b30 into main Aug 26, 2025
105 of 111 checks passed
@Ryukemeister Ryukemeister deleted the update-playwright-config-for-atoms-tests branch August 26, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only platform Anything related to our platform plan ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants