-
Notifications
You must be signed in to change notification settings - Fork 407
chore(repo): Add new test instance for protect service #7242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
| Name | Type |
|---|---|
| @clerk/clerk-js | Minor |
| @clerk/shared | Minor |
| @clerk/chrome-extension | Patch |
| @clerk/clerk-expo | Patch |
| @clerk/agent-toolkit | Patch |
| @clerk/astro | Patch |
| @clerk/backend | Patch |
| @clerk/elements | Patch |
| @clerk/expo-passkeys | Patch |
| @clerk/express | Patch |
| @clerk/fastify | Patch |
| @clerk/nextjs | Patch |
| @clerk/nuxt | Patch |
| @clerk/react-router | Patch |
| @clerk/clerk-react | Patch |
| @clerk/remix | Patch |
| @clerk/tanstack-react-start | Patch |
| @clerk/testing | Patch |
| @clerk/themes | Patch |
| @clerk/types | Patch |
| @clerk/vue | Patch |
| @clerk/localizations | Patch |
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughIntroduces an initial Clerk Protect dynamic loader and related types via a changeset, adds a new test environment preset ( Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test Runner
participant Env as Mock Config Service
participant Browser as Browser Page
participant Clerk as Clerk JS Loader
Note over Test,Env: configure protect_config.loader rollout
Test->>Env: set protect_config.loader = { rollout: X }
Test->>Browser: navigate to app page
Browser->>Clerk: load Clerk JS
Clerk-->>Browser: evaluate protect_config.loader
alt rollout == 1.0
Clerk->>Browser: inject protect loader element
Browser-->>Test: detect loader element (count > 0)
else rollout == 0.00 or not set
Clerk-->>Browser: do not inject loader
Browser-->>Test: detect no loader element (count == 0)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🔇 Additional comments (1)
Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.changeset/beige-sloths-provide.md(1 hunks)integration/presets/envs.ts(2 hunks)integration/tests/protect-service.test.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
integration/tests/protect-service.test.ts (2)
integration/testUtils/index.ts (1)
createTestUtils(24-86)integration/presets/index.ts (1)
appConfigs(15-32)
🪛 LanguageTool
.changeset/beige-sloths-provide.md
[grammar] ~6-~6: Ensure spelling is correct
Context: ...pes to support dynamically enabling and rollout out protect in the environment.
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (33)
- GitHub Check: Integration Tests (quickstart, chrome, 15)
- GitHub Check: Integration Tests (nextjs, chrome, 14)
- GitHub Check: Integration Tests (billing, chrome)
- GitHub Check: Integration Tests (nextjs, chrome, 16)
- GitHub Check: Integration Tests (machine, chrome)
- GitHub Check: Integration Tests (quickstart, chrome, 16)
- GitHub Check: Integration Tests (billing, chrome, RQ)
- GitHub Check: Integration Tests (nextjs, chrome, 15)
- GitHub Check: Integration Tests (nextjs, chrome, 15, RQ)
- GitHub Check: Integration Tests (sessions:staging, chrome)
- GitHub Check: Integration Tests (custom, chrome)
- GitHub Check: Integration Tests (expo-web, chrome)
- GitHub Check: Integration Tests (nuxt, chrome)
- GitHub Check: Integration Tests (handshake, chrome)
- GitHub Check: Integration Tests (astro, chrome)
- GitHub Check: Integration Tests (vue, chrome)
- GitHub Check: Integration Tests (react-router, chrome)
- GitHub Check: Integration Tests (tanstack-react-start, chrome)
- GitHub Check: Integration Tests (handshake:staging, chrome)
- GitHub Check: Integration Tests (ap-flows, chrome)
- GitHub Check: Integration Tests (localhost, chrome)
- GitHub Check: Integration Tests (generic, chrome)
- GitHub Check: Integration Tests (elements, chrome)
- GitHub Check: Integration Tests (sessions, chrome)
- GitHub Check: Integration Tests (express, chrome)
- GitHub Check: Publish with pkg-pr-new
- GitHub Check: Unit Tests (22, shared, clerk-js, RQ)
- GitHub Check: Static analysis
- GitHub Check: Unit Tests (22, **)
- GitHub Check: Formatting | Dedupe | Changeset
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (5)
integration/presets/envs.ts (1)
221-221: LGTM!The export is correctly added to the
envsobject, making the new environment preset available for use in tests.integration/tests/protect-service.test.ts (4)
20-27: LGTM!The test suite correctly uses the new
withProtectServiceenvironment preset and is properly configured for parallel execution with appropriate teardown.
29-47: LGTM!The test properly verifies that a loader script is added when
protect_config.loadersis configured with a rollout of 1.0. The per-test setup ensures proper isolation for parallel execution.
49-70: LGTM!The test correctly verifies that no loader script is added when the rollout percentage is 0, even when the loader configuration is present. This is a valuable edge case test.
72-80: LGTM!The test correctly verifies the baseline scenario where no loader is added when
protect_config.loadersis not configured. The comment on lines 78-79 is helpful for understanding Playwright's behavior.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
integration/.keys.json.sample(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Formatting | Dedupe | Changeset
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (1)
integration/.keys.json.sample (1)
62-65: LGTM! New test instance entry follows the established pattern.The new "with-protect-service" entry is consistent with existing entries and properly formatted for the sample configuration file.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
jacekradko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
Description
Adding new integration instance for protect service. A follow up PR to #7227
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
New Features
Tests
Chores