-
Notifications
You must be signed in to change notification settings - Fork 460
test(expo): Restore green expo native Maestro flows and enforce them #9303
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
Changes from all commits
87b7e3b
c0f648c
df3b7be
abfa03a
129ea14
1a6d98a
3805ae1
4380654
69bc4b3
24e9236
4fbba9d
f5c0124
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| const { withAppBuildGradle } = require('expo/config-plugins'); | ||
|
|
||
| // clerk-android is compiled against OkHttp 5 but React Native pins OkHttp 4, | ||
| // leaving a mixed classpath: clerk networking breaks on the 4.x core | ||
| // (NoClassDefFoundError: okhttp3.internal.UnreadableResponseBody), while RN's | ||
| // cookie jar breaks on the 5.x core (okhttp3.internal.Util). Force the 5.x | ||
| // core plus the urlconnection shim that still ships a JavaNetCookieJar class | ||
| // compatible with it, so both stacks run on one coherent OkHttp. | ||
| const GRADLE_BLOCK = ` | ||
| configurations.all { | ||
| resolutionStrategy { | ||
| force 'com.squareup.okhttp3:okhttp:5.4.0' | ||
| force 'com.squareup.okhttp3:logging-interceptor:5.4.0' | ||
| force 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16' | ||
| } | ||
| } | ||
| `; | ||
|
|
||
| module.exports = function withClerkOkHttpAlignment(config) { | ||
| return withAppBuildGradle(config, cfg => { | ||
| if (!cfg.modResults.contents.includes('com.squareup.okhttp3:okhttp:5.4.0')) { | ||
| cfg.modResults.contents += GRADLE_BLOCK; | ||
| } | ||
| return cfg; | ||
| }); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,28 +12,49 @@ appId: com.clerk.exponativebuildfixture | |
| visible: 'Enter your email( or username)?' | ||
| timeout: 25000 | ||
| # Clear any pre-populated identifier (Clerk persists the last-used one in | ||
| # secure-store, surviving clearState) via Select-all when the edit menu | ||
| # shows, falling back to eraseText when it doesn't (the menu is unreliable | ||
| # on a remounted AuthView on iOS). The retry gates on reaching the password | ||
| # step, so a mangled identifier gets a clean second attempt. | ||
| # secure-store, surviving clearState). On iOS eraseText is cursor-dependent, | ||
| # so Select-all via the edit menu when it shows (the menu is unreliable on a | ||
| # remounted AuthView). On Android eraseText clears the whole field, and the | ||
| # long-press can open Gboard's features panel over the screen instead of the | ||
| # edit menu, so skip the menu dance there. The retry gates on reaching the | ||
| # password step, so a mangled identifier gets a clean second attempt. | ||
| - retry: | ||
| maxRetries: 2 | ||
| commands: | ||
| - tapOn: | ||
| text: 'Enter your email( or username)?' | ||
| - waitForAnimationToEnd: | ||
| timeout: 2000 | ||
| - longPressOn: | ||
| text: 'Enter your email( or username)?' | ||
| # iOS shows "Select All", Android shows "Select all". | ||
| # A remounted AuthView prefills the last-used identifier, which is the | ||
| # same email this flow signs in with, and clearing a prefilled field is | ||
| # cursor-position dependent on Android. Only clear and retype when the | ||
| # field does not already hold the right value. | ||
| - runFlow: | ||
| when: | ||
| visible: 'Select [Aa]ll' | ||
| notVisible: ${CLERK_TEST_EMAIL} | ||
| commands: | ||
| - tapOn: | ||
| text: 'Select [Aa]ll' | ||
| - eraseText: 100 | ||
| - inputText: ${CLERK_TEST_EMAIL} | ||
| - runFlow: | ||
| when: | ||
| platform: iOS | ||
| commands: | ||
| - longPressOn: | ||
| text: 'Enter your email( or username)?' | ||
| - runFlow: | ||
| when: | ||
| visible: 'Select All' | ||
| commands: | ||
| - tapOn: | ||
| text: 'Select All' | ||
| - eraseText: 100 | ||
| - inputText: ${CLERK_TEST_EMAIL} | ||
| # Wait for the typed value to land before tapping: the tap can race the | ||
| # recomposition that enables the button, and this also catches a mangled | ||
| # identifier inside the retry instead of at the next screen's timeout. | ||
| - extendedWaitUntil: | ||
| visible: ${CLERK_TEST_EMAIL} | ||
| timeout: 5000 | ||
|
Comment on lines
32
to
+55
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- target workflow ---'
cat -n integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml | sed -n '1,110p'
printf '%s\n' '--- email generation and related selectors ---'
rg -n -C 3 'CLERK_TEST_EMAIL|sign-in-email-password|Select All|extendedWaitUntil' integration/tests/expo-nativeRepository: clerk/javascript Length of output: 29379 🌐 Web query:
💡 Result: In the Maestro automation framework, all Citations:
🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- all CLERK_TEST_EMAIL references ---'
rg -n -C 2 'CLERK_TEST_EMAIL|clerk_test' . --glob '!node_modules' --glob '!dist' --glob '!build'
printf '%s\n' '--- Maestro configuration and environment handling ---'
rg -n -C 3 'maestro|--env|test email|TEST_EMAIL' integration/tests/expo-native .github package.json pnpm-workspace.yaml 2>/dev/null || trueRepository: clerk/javascript Length of output: 38062 🏁 Script executed (no clone): Length of output: 247 Escape The 🤖 Prompt for AI Agents |
||
| - waitForAnimationToEnd: | ||
| timeout: 2000 | ||
| - tapOn: | ||
| text: 'Continue' | ||
| index: 0 | ||
|
|
@@ -60,6 +81,10 @@ appId: com.clerk.exponativebuildfixture | |
| text: 'Enter your password' | ||
| - eraseText: 50 | ||
| - inputText: ${CLERK_TEST_PASSWORD} | ||
| # The password is masked so its value can't be asserted; settle for the | ||
| # screen going stable so the tap doesn't race the enabling recomposition. | ||
| - waitForAnimationToEnd: | ||
| timeout: 2000 | ||
| - tapOn: | ||
| text: 'Continue' | ||
| index: 0 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
clerk-android is built against OkHttp 5, while React Native pins apps to OkHttp 4. That mismatch causes the native instance config fetch to fail at runtime, so sign-in never loads.
This CI fixture forces OkHttp 5, along with the last
okhttp-urlconnectionalpha that still shipsJavaNetCookieJar, to match clerk-android. This is a known ecosystem issue. Expo hit the same problem (expo/expo#44848), and the same workaround is documented on StackOverflow: https://stackoverflow.com/questions/72885577/how-to-implement-okhttp-5-0-0-in-react-native-moduleThis only affects the CI fixture. Consumer apps are unchanged.