Skip to content

test(expo): small fixes to the e2e tests and their config - #10227

Closed
mikepitre wants to merge 10 commits into
mike/expo-verify-rename-e2e-testsfrom
mike/expo-verify-e2e-small-fixes
Closed

mikepitre wants to merge 10 commits into
mike/expo-verify-rename-e2e-testsfrom
mike/expo-verify-e2e-small-fixes

Conversation

@mikepitre

@mikepitre mikepitre commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

This is the same change as clerk/clerk-ios#694, for the Expo package in integration/expo-native/. clerk/clerk-android#1092 is the same change for clerk-android. A reader compared the docs of the e2e runner with our tests and found five small things to fix. This PR sits on #10225 and must merge after it.

  • A broken build no longer runs every test. When the app never reaches its home, each test waits 60 seconds and CI tries it twice. run now takes --max-failures <n> and passes it to e2e, and the workflow passes 5 on each platform. A test that the limit stopped is reported as failed with not run: failure-limit, never as passed. None of the last 40 runs of the workflow failed. run starts e2e once for each settings group, so the limit counts one group.
  • The retry wording is true. The skill said a failed test runs again. e2e runs a test again only for a failed assertion, an error the test threw, or a timeout. A failure of the device driver gets one attempt. Text only.
  • Three screenshot labels were used twice. A run keeps one file for a label, so run --all lost one of each pair. One of each pair has a new label: signed-in-from-native, signed-out-from-native and restored-home-after-relaunch. Each change is one line of a spec and the lines of its feature page that name the label. A new unit test fails when two committed specs use one label.
  • The fixture has host.expectVisible(locator, what, timeoutMs?). It is the wait that host.expectSignedInAs uses, for any element, and its message names the element when it runs out. clerk-ios needs it to replace two loops with sleeps. No spec here calls it yet.

Two things from the list did not change here. No spec has a text box lookup without a name. native-modules/google-sign-in waits for a page of Google Play services with a loop and a 1 second sleep, on Android only. host.expectVisible may fit there, but I had no Android device to try it on, so the loop stays.

One more unit test comes from the review of #10225. run --all skips a *.e2e.ts file outside specs/features/ and specs/explored/ and says nothing. The test fails when such a file exists and names it.

The shared files under integration/expo-native/src/core/ and integration/expo-native/specs/ are byte copies of the files of clerk/clerk-ios#694. The changeset is empty, as it is in the other PRs of the stack. No published package changes.

npm test in integration/expo-native/ passes 797 of 797, and 793 on #10225. npm run typecheck is clean. vitest run --root scripts verify-attach passes 196 of 196. A script undoes the 7 changes one at a time, and the test or the type check that covers each one fails.

The early stop itself has not been seen on a device. Unit tests cover the flag and the report.

verify-e2e run 38502198026 on 13b21b396e ran 17 tests on iOS and 15 on Android, as the last run on #10225 did. On Android all 15 passed, and 2 were skipped as iOS only. On iOS 16 passed, and native-auth-view/complete passed on its second attempt: the first did not find the code field within 20 seconds. This PR does not change that spec. iOS kept 29 screenshots and Android 24, against 26 and 22. The new files are the renamed labels. Three commits from review follow that run. They change skill text, two feature pages, and the message of host.expectVisible, which no spec here calls.

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:

🤖 Generated with Claude Code

mikepitre and others added 5 commits October 13, 2026 22:28
A build whose app never reaches its home fails every test of
`integration/expo-native/` the same way. Each test waits 60 seconds for
the home, and CI tries it twice, so the run spent about two minutes on
each of its tests before it could say that the build is broken.

`run` now takes `--max-failures <n>` and passes it to e2e. e2e stops
once `n` tests have failed and reports the tests it did not start as
skipped by the limit. The CLI already turns such a skip into a failed
result that says `not run: failure-limit`, and a new test pins that, so
a test the limit stopped never counts as passed.

`run` starts e2e once for each settings group, so the limit counts the
failures of one group, and the groups after it still start.

The workflow passes 5 on each platform. None of its last 40 runs
failed, so a healthy build stays far below the limit. The changeset is
empty, as it is in the other pull requests of the stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The skill said that `--retries <n>` runs a failed test again. e2e runs
a test again only when an assertion failed, the test threw an error, or
the test ran out of time (`isRetryEligible` in e2e 0.18.0). A failure
of the device driver gets one attempt, so a reader took a driver failure
that ran once for a test that failed twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three labels were used twice: `signed-in`, `signed-out` and
`restored-home`. A run keeps one file for a label, so `run --all` kept
one screenshot of each pair. One of each pair has a new label:
`signed-in-from-native` and `signed-out-from-native` in
`native-js-sync`, and `restored-home-after-relaunch` in
`token-cache-persistence`. The feature pages name the new labels.

A new test reads the committed specs and fails when two of them use one
label, and names the label and the files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`host.expectVisible(locator, timeoutMs?)` is the wait that
`host.expectSignedInAs` already uses, for any element. It fails at once
on the app's error screen, and on iOS it taps "Not Now" when the "Save
Password?" sheet is in front.

clerk-ios uses it in place of two loops with sleeps in one spec. No
spec here calls it yet. The fixture is one file in clerk-ios,
clerk-android and clerk/javascript, so it changes in all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`run --all` runs the spec files under `specs/features/`, and a scratch
spec under `specs/explored/` runs by its path. A `*.e2e.ts` file in any
other folder under `specs/`, such as one left in `specs/golden/` by a
branch that was cut before the rename, is skipped with no message, so
the release gate would pass without it.

A new test fails when such a file exists and names it.

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: 735ed29

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 14, 2026 12:40pm UTC
swingset Ready Ready Preview Oct 14, 2026 12:40pm 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.

mikepitre and others added 2 commits October 13, 2026 23:43
The skill gave "a launch that timed out" as a failure that gets one
attempt. That reads as the 60-second wait in `host.launch`, which throws
a plain error, so e2e counts it as a test failure and runs it again. What
gets one attempt is a command agent-device timed out on, such as `open`
or a screenshot (`isRetryEligible` in e2e 0.18.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Proof lines of `native-js-sync` and `token-cache-persistence` still
named `signed-out.png` and `restored-home.png`. Those specs now write
`signed-out-from-native` and `restored-home-after-relaunch`; the old
labels belong to other specs. No other feature page in clerk-ios,
clerk-android or clerk/javascript names a label its feature's specs do
not write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When `host.expectVisible` ran out, its message said that the app did not
show "the element the spec names in expectVisible", so a reader of a red
run had to find the line from the stack. It now takes `what`, the name
of the element, and the message says that name, as the messages of
`host.expectSignedInAs` and `host.launch` already do. clerk-ios has the one
caller; the fixture is shared, so it changes here too.

The wait moves into `untilVisible` in `specs/support/waiting.ts`, so a
unit test can run it on the simulated screen and assert the message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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@10227

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-native-components

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 735ed29

e2e 0.18.0 reports some driver errors as test errors (a stale node, an
action that timed out), and --retries reruns those. Only failures it counts
as infrastructure, such as ENGINE_FAILURE, get one attempt.

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

Copy link
Copy Markdown
Contributor Author

Replaced by the regrouped stack #10235, #10236, #10237 and #10238, which ends on the same code (tree c2fc7c19). The old stack grew one PR per port from clerk-ios and clerk-android; the new one groups what a reviewer reads together.

@mikepitre mikepitre closed this Oct 14, 2026

This branch was successfully deployed

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