Skip to content

test(e2e): Initial Chrome Extension integration tests#8075

Open
tmilewski wants to merge 1 commit intomainfrom
tom/user-4951-identify-and-close-gaps-in-sdk-tests
Open

test(e2e): Initial Chrome Extension integration tests#8075
tmilewski wants to merge 1 commit intomainfrom
tom/user-4951-identify-and-close-gaps-in-sdk-tests

Conversation

@tmilewski
Copy link
Member

@tmilewski tmilewski commented Mar 13, 2026

Description

  • Adds end-to-end integration tests for @clerk/chrome-extension covering basic sign-in/sign-out, background service worker auth state, and syncHost session sync from a host web app
  • Introduces a chrome-extension-vite template (manifest v3 popup + background service worker) and Playwright config that launches Chromium with --load-extension via persistent contexts
  • Adds reusable test fixtures and helpers for building the extension, launching extension contexts, extracting extension IDs, and querying background worker auth state

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other: Test

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Chrome extension template with Vite build support and integrated Clerk authentication
  • Tests

    • Added Chrome extension integration tests with authentication and sync host verification
  • Chores

    • Added npm script and CI pipeline configuration for Chrome extension test execution

@tmilewski tmilewski self-assigned this Mar 13, 2026
@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2026

🦋 Changeset detected

Latest commit: 02f099e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Mar 13, 2026 7:02pm

Request Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 13, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@8075

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8075

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8075

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8075

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8075

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8075

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8075

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8075

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8075

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8075

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8075

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8075

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8075

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8075

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8075

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8075

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8075

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8075

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8075

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8075

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8075

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8075

commit: 02f099e

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0ce4a0fb-fb07-492f-9e54-555c63485a28

📥 Commits

Reviewing files that changed from the base of the PR and between 154eec9 and 02f099e.

📒 Files selected for processing (22)
  • .changeset/yummy-hoops-drum.md
  • .github/workflows/ci.yml
  • integration/playwright.chrome-extension.config.ts
  • integration/presets/chrome-extension.ts
  • integration/presets/index.ts
  • integration/templates/chrome-extension-vite/manifest.json
  • integration/templates/chrome-extension-vite/package.json
  • integration/templates/chrome-extension-vite/popup.html
  • integration/templates/chrome-extension-vite/src/background.ts
  • integration/templates/chrome-extension-vite/src/popup.tsx
  • integration/templates/chrome-extension-vite/src/vite-env.d.ts
  • integration/templates/chrome-extension-vite/tsconfig.json
  • integration/templates/chrome-extension-vite/vite.background.config.ts
  • integration/templates/chrome-extension-vite/vite.config.ts
  • integration/templates/index.ts
  • integration/tests/chrome-extension/background.test.ts
  • integration/tests/chrome-extension/basic.test.ts
  • integration/tests/chrome-extension/fixtures.ts
  • integration/tests/chrome-extension/helpers.ts
  • integration/tests/chrome-extension/sync-host.test.ts
  • package.json
  • turbo.json

📝 Walkthrough

Walkthrough

This pull request introduces comprehensive Chrome extension integration support. It adds a new Chrome extension template (chrome-extension-vite) with Vite configuration, manifest.json, popup UI components, and background service worker scripts. A new Playwright configuration targets integration tests for the extension, which include basic sign-in flows, background service worker authentication verification, and sync-host functionality. Integration test fixtures and helpers enable extension loading and Clerk environment setup. Supporting infrastructure updates include a new integration preset, CI workflow matrix entry for chrome-extension tests, and corresponding npm and Turbo task definitions.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding Chrome Extension integration tests, with a clear scope indicator and alignment to the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant