Skip to content

test(expo): add the Expo e2e tests and their core, copied from clerk-ios and clerk-android - #10236

Draft
mikepitre wants to merge 16 commits into
mike/expo-verify-r1-fixturefrom
mike/expo-verify-r2-shared-core
Draft

mikepitre wants to merge 16 commits into
mike/expo-verify-r1-fixturefrom
mike/expo-verify-r2-shared-core

Conversation

@mikepitre

@mikepitre mikepitre commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

This is the second of four pull requests that replace the eleven of stack #10100. It sits on #10235, and #10237 sits on it. It holds the end-to-end tests that #10087 added and the shared core they run on, in their final state after the edits of #10131, #10219, #10221, #10225, #10227, and #10230.

integration/expo-native/ is a Node package that installs its own dependencies with npm ci from its own lockfile, outside the pnpm workspace. Its core is the code that clerk-ios, clerk-android, and this repository share: the CLI's verbs, device leases, the throwaway Clerk application of a session, the stand-in for Clerk's Backend API that the tests call, secret redaction, the evidence of a run, the borrowed-device session, and the support code of the e2e tests. The Expo host that builds the fixture and runs the CLI is in #10237, so this package has no bin/control-clerk-expo yet.

The three commits:

Commit Lines What it adds
1. The package and its CI job 1,898 package.json, the generated package-lock.json (1,783 lines), tsconfig.json, the Expo Native Runner Tests job in ci.yml, and the entries that keep the repository's formatter and linter off the package.
2. The shared core 21,995 Copies, except three small files. Check it by hash.
3. The e2e tests 459 17 tests in 12 files under specs/features/, in seven feature groups, and specs/native.ts, the locators of the fixture's home. Read these.

Of the 109 files of commit 2, 106 files, 21,303 lines, are byte copies of the same path under e2e-tests/ on main of clerk/clerk-ios (bd2266d3c) or clerk/clerk-android (ca990b48), where they were reviewed and merged. src/core/MANIFEST lists the shared files with their hashes, and npm test fails when one drifts. To check them against clerk-ios:

$ git clone -q https://github.com/clerk/clerk-ios /tmp/clerk-ios && git -C /tmp/clerk-ios checkout -q bd2266d3c
$ for d in src/core specs/support testing; do diff -r /tmp/clerk-ios/e2e-tests/$d integration/expo-native/$d; done

The second command prints nothing. src/platform/android/ and test/android.test.ts are copies from clerk-android. The three files of commit 2 that are this repository's own are specs/app.ts, which names the test app and how to launch its dev client, src/platform/ios/simulator.ts, which holds the simctl commands with this repository's log predicate, and test/session-agent.test.ts, the shared test without its one case that names the app sources of clerk-ios.

What to read, in this order:

  1. The e2e tests in specs/features/. Each starts at the fixture's home from test(expo): drive the expo-native fixture from verify launch inputs #10235 and taps to the screen it needs, as a user would. They assert on what a user sees, in the prebuilt views first and on the home for the outcome of a flow. They type only +clerk_test addresses and the test code 424242. Two are for iOS only, so Android runs 15.
  2. package.json: e2e 0.18.0, @e2e-dev/mobile 0.10.0, @e2e-dev/github 0.4.0, ai 7.0.128, and typescript 7.0.2, on Node 24.8 or newer.
  3. The Expo Native Runner Tests job in ci.yml. It runs the package's unit tests and tsc on Linux, with no device and no secret, when a pull request changes the package, the fixture, or an Expo package.

The three changesets are the empty ones that #10087, #10225, and #10227 carried. No published package changes.

npm test in integration/expo-native/ passes 712 of 712 on this branch, and npm run typecheck is clean.

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 tooling

🤖 Generated with Claude Code

mikepitre and others added 3 commits October 14, 2026 13:52
…t job

The package installs its own dependencies with npm ci from its own lockfile, outside the pnpm
workspace. The Expo Native Runner Tests job runs its unit tests and tsc when a pull request
changes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-ios and clerk-android

Every file in this commit is a byte copy of the same path under e2e-tests/ on main of
clerk/clerk-ios or clerk/clerk-android, except three. specs/app.ts names this repository's test
app, src/platform/ios/simulator.ts holds its simctl commands, and test/session-agent.test.ts is
the shared test without its one case that names the app sources of clerk-ios.
src/core/MANIFEST lists the shared files with their hashes, and a unit test fails when one
drifts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each test starts at the fixture's home and taps to the screen it needs, as a user would.
specs/native.ts holds the locators of the home's buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0580238

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

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 15, 2026 5:14am UTC
swingset Ready Ready Preview Oct 15, 2026 5:14am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10236

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10236

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10236

@clerk/expo

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

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10236

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10236

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10236

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10236

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0580238

The job skipped its steps on a pull request that changed none of a list of paths, but the list
watched the whole Expo packages and missed files the tests read. It now watches the package, the
workflows and template screens its tests read, and watches the paths the host tests only require
to exist for a deletion or a move alone. A new test runs the job's check against real merge
commits, and fails when a test reads a workflow or repository file the list does not watch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikepitre and others added 2 commits October 14, 2026 15:59
This reverts commit 777527f. Expo test timing stays as it was for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikepitre added a commit that referenced this pull request Oct 14, 2026
…s tests"

This reverts commit 519a6c6. The job it describes is reverted on #10236.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s own test

attach used the before run's first failure screenshot for every label
that run lacked. With one test per state, every Before cell then showed
the same image. A run now records which test took each screenshot, and
attach pairs a missing label with the failure screenshot of that test in
the before run, or fails and says so when there is none. The core is the
same as in clerk-ios and clerk-android.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s missing

When the before run has no screenshot with the label and no failure
screenshot of the test that took it, attach now names that test, by
title and spec file name. When the after run does not record which test
took the screenshot, as a run made before the test was recorded does
not, attach says so and asks for a new after run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chooseEvidence matched the before run's failure screenshot by spec
basename and test title, taking the first hit. Several features have a
complete.e2e.ts, so the Before cell could show another spec's failure.

Match the full spec path first. Fall back to basename and title only
when exactly one result matches, which still pairs a committed spec
copied to specs/explored/ for the before run. When more than one
matches, fail and name the label, the test and each candidate spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This is the shared harness change from clerk/clerk-ios, copied byte for
byte. For about a second after typed text, the iOS simulator reports the
frames from before the keyboard moved the form, so a tap resolved in
that time lands where the control used to be. host.fill on iOS now
returns no sooner than 1.5 seconds after its last typing command. On
Android it returns as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eviewer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikepitre and others added 2 commits October 15, 2026 01:08
An evidence run raised the mobile engine's `settle` to 700 ms so the
screen would hold still after each action. The engine applies `settle`
only to actions an agent makes; a test's actions carry origin `test`,
and `perform` and `performAt` send them with no settle at all. So the
setting changed nothing, which the review saw in the step timings.

Remove it. The pacing a run really has is the 0.6 s wait before
`host.tap` and `host.fill` and the 2 s hold at the end of each
`host.evidence` block; the skill says so on the Expo host branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`attach --video` refuses a run that no `host.evidence` block marked, yet
the hint after every passing run, `--all` included, offered `--video`
beside screenshots. Now a run with a marked block suggests `--video`
alone, and any other run suggests screenshots for a still change and
says how to get a video: mark the steps, run that spec on its own, and
attach that run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – swingset — 0580238c Deployed Oct 15, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 0580238c Deployed Oct 15, 2026 by vercel[bot]
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