Commit 7eeebd1
test(e2e): De-flake TurboModule span-attribute count assertion (#6596)
* test(e2e): Fix TurboModule flow viewport on Android emulator
The `turbo_module.*` attribute block is the last content in a long
ScrollView, so on the shorter Android emulator screen it renders below the
fold. `assertVisible` only inspects the current viewport, so the
`turbo_module.total_call_count: 6` assertion has failed on every Android
REV2 run since #6549 introduced the test, while iOS (taller screen, block
in view) has been green — proving the SDK and on-device render are correct.
- Scroll the attribute block into view before asserting, and match the full
line with a regex (Maestro anchors `assertVisible` text to the whole node,
so a bare `total_call_count:` prefix would not match `... : 6`).
- Run the native-throw interaction before that scroll: the throw button is
at the top of the screen and must be tapped while the viewport is still
there, otherwise scrolling to the attributes pushes it off-screen on
Android.
The exact on-screen count is intentionally not pinned — it can race the
async `getPlatform` record settling against the synchronous post-`end()`
read; the authoritative counts are asserted against the transaction
envelope in turboModuleSpanAttributes.test.ts.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Remove uneeded comment
* Simplify test comment
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent e8007a7 commit 7eeebd1
1 file changed
Lines changed: 15 additions & 6 deletions
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 33 | | |
40 | 34 | | |
41 | 35 | | |
42 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments