-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Tests] Add shared value e2e test #4434
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
Merged
j-piasecki
merged 1 commit into
jpiasecki/e2e-nested-touchables
from
jpiasecki/e2e-shared-value
Aug 18, 2026
+87
−3
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| steps: | ||
| - echo: Launching Expo Example | ||
| - launch: com.example.ExpoExample | ||
| - await: { visible: { text: "Empty Example" }, timeout: 15000 } | ||
| - echo: "On the Home list, search for the shared value example" | ||
| - type: { text: "shared", into: { id: "search-examples" } } | ||
| - echo: "Tap the example to open it" | ||
| - tap: { text: "Shared Value" } | ||
| - await: { visible: { id: "shared-value-box" } } | ||
| - await: { idle: true } | ||
|
|
||
| - echo: "Clear console" | ||
| - await: { visible: { id: "open-console-button" } } | ||
| - tap: { id: "open-console-button" } | ||
| - await: { visible: { id: "clear-console-button" } } | ||
| - tap: { id: "clear-console-button" } | ||
| - tap: { id: "close-console-button" } | ||
| - await: { idle: true } | ||
|
|
||
| - echo: "The gesture starts configured for a single tap, so one tap activates it" | ||
| - tap: { id: "shared-value-box" } | ||
| - tap: { id: "open-console-button" } | ||
| - await: { idle: true } | ||
| - await: { visible: { id: "close-console-button" } } | ||
| - assert: { visible: { text: "1. onBegin" } } | ||
| - assert: { visible: { text: "2. onActivate" } } | ||
| - assert: { visible: { text: "3. onDeactivate" } } | ||
| - assert: { visible: { text: "4. onFinalize" } } | ||
|
|
||
| - echo: "Clear console" | ||
| - tap: { id: "clear-console-button" } | ||
| - tap: { id: "close-console-button" } | ||
| - await: { idle: true } | ||
|
|
||
| - echo: "Raise the shared value, then check that a single tap no longer activates" | ||
| - tap: { id: "increment-taps-button" } | ||
| - tap: { id: "shared-value-box" } | ||
| - tap: { id: "open-console-button" } | ||
| - await: { idle: true } | ||
| - await: { visible: { id: "close-console-button" } } | ||
| - assert: { visible: { text: "5. Required taps: 2" } } | ||
| - assert: { visible: { text: "6. onBegin" } } | ||
| - assert: { visible: { text: "7. onFinalize" } } | ||
| - assert: { hidden: { text: "onActivate" } } | ||
|
|
||
| - echo: "Clear console" | ||
| - tap: { id: "clear-console-button" } | ||
| - tap: { id: "close-console-button" } | ||
| - await: { idle: true } | ||
|
|
||
| - echo: "A double tap matches the new configuration and activates the gesture" | ||
| - tap: { on: { id: "shared-value-box" }, times: 2 } | ||
| - tap: { id: "open-console-button" } | ||
| - await: { idle: true } | ||
| - await: { visible: { id: "close-console-button" } } | ||
| - assert: { visible: { text: "8. onBegin" } } | ||
| - assert: { visible: { text: "9. onActivate" } } | ||
| - assert: { visible: { text: "10. onDeactivate" } } | ||
| - assert: { visible: { text: "11. onFinalize" } } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 37666
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 50402
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 50404
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 50402
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 26823
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 12228
🌐 Web query:
Argent mobile UI testing flow YAML "await: { idle: true }" semantics💡 Result:
In the Argent mobile UI testing framework, the
await: { idle: true }directive is a synchronization mechanism used to ensure the application UI has reached a stable state before the test runner proceeds to the next step [1]. Semantics and Behavior: Theawait: { idle: true }directive invokes theawait-screen-idletool [2][1]. Unlikeawait-ui-element, which waits for a specific element to appear or change state (e.g., become visible or hidden) [3][4][5],await-screen-idlemonitors the entire UI tree to ensure it has settled [2]. Key characteristics include: - Settling Condition: The framework considers the screen "idle" when the accessibility tree (or component tree) stops changing for a minimum duration (minStableMs) [2]. It achieves this by taking consecutive "snapshots" or "signatures" of the UI tree and verifying that they match over a specified period [2]. - Use Case: This directive is primarily used to prevent "timing" or "flakiness" issues where tests interact with an app while it is still transitioning, loading, or animating [2][4]. It is the preferred, deterministic alternative to using fixed delays (delayMs), as it allows the test to resume as soon as the UI is stable [3][4]. - Implementation: Whenidle: trueis encountered in a flow, the runner blocks execution until the screen signature remains constant for the required threshold [2]. If the tree continues to change (e.g., due to ongoing animations or data loading) beyond the defined timeout, the step will fail, preventing the test from continuing in an unstable state [2]. This approach aligns with standard UI automation principles—similar towaitForIdlein Android Compose or Espresso—where the test environment synchronizes with the application's internal state to ensure reliability without relying on brittle, hard-coded sleeps [6][7][8].Citations:
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 15485
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 27798
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 438
🏁 Script executed:
Repository: software-mansion/react-native-gesture-handler
Length of output: 462
Gate the gesture tap on the shared-value update.
The JavaScript handler updates
numberOfTapsasynchronously, but the next step tapsshared-value-boximmediately.await: { idle: true }only waits for a stable accessibility tree, and this shared value does not re-render the screen. Add a runtime-visible synchronization point before tappingshared-value-box.🤖 Prompt for AI Agents