Minimize e2e brittleness#7406
Conversation
|
🧪 Flashlight Performance Report (AWS Device Farm) 🔀 Commit: 9ac8297
|
This reverts commit bdb4be7.
This reverts commit 1be576e.
janicduplessis
left a comment
There was a problem hiding this comment.
Nice, I remember seeing random failures related to anvil download. Left a few minor comments, but also fine as is.
| try { | ||
| const currentValue = useConnectedToAnvilStore.getState().connectedToAnvil; | ||
| setConnectedToAnvil(!currentValue); | ||
| setConnectedToAnvil(true); |
There was a problem hiding this comment.
Prob not a big deal, but this means we can't disconnect from anvil if enabled in dev?
| return; | ||
| } | ||
|
|
||
| if (handledUrls.current.has(url)) return; |
There was a problem hiding this comment.
Is this needed? My idea for commands is it could be used for anything so it would make sense to be able to execute the same one multiple times.
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 | ||
|
|
||
| - name: Cache Foundry binaries | ||
| if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/e2e') |
There was a problem hiding this comment.
I think this might not be needed, also iOS doesnt have it.
|
Overall looks good with the specific fixes and foundry centralization, but I wonder if there's a better approach do achieve the same fixes in some of the cases? re: remoteConfig short-circuit We may want to consider either making config init non-blocking liek I think has been discussed previpusly wth a proper fallback UI meanwhile, which fixes it for both tests AND users, or we could inject a test confnig client at the boundary or use MSW so the init code still runs against known fixtures. Both are bigger lifts ofc, but stubbing it out doesn't fix the race, it just hides it from this one consumer, and I'm not usre it's the right path tbh. Curious what your thoughts are here @christianbaroni ? re: the new e2e marker views re: the broader direction |
Removed the remote config changes which weren't needed. The current loading design there works pretty well in production — it's only blocking (up to 3s) when the app version changes which is generally the only time it needs to block, and even then it's typically fast to load. Also cleaned up the marker component code so it's at least not scattered within production code. Regarding With the recent commits the brittleness seems to be resolved, or at least is far less common, so broadly I think these changes are worthwhile. There were a couple real NFT bugs that showed up in the run artifact recordings. Might be useful to have those posted somewhere on failure rather than being buried in the CI views. |
|
Thanks for simplifying @christianbaroni! The core E2E fixes here look really good! A few more things worth considering before merge, mostly around minimizing what's actually in this PR vs. what could ship separately or even get dropped. 1.Split out the NFT fixes 2. 3. Dormant marker states What if we make it such that:
Removes a bunch of code that nothing reads. 4. Used markers -> dev button state? If we do this maestro will be asserting on the existing button testID (with the new label state), no need for invisible 2x2 marker views anywhere, devs pressing the buttons get visible feedback they don't have today as a bonus even. Alsow ould remove the the IS_TEST code. Bigger refactor ofc, and fine to defer if you'd rather keep the markers, but if we do this it looks to m elike we can drop e2e markers entirely and solve it simpler. |
What changed (plus any additional context for devs)
Fixes several sources of e2e brittleness that were showing up as intermittent Android and iOS shard failures.
E2E setup
ANVIL_FORK_BLOCK_NUMBERbefore each transaction attempt, with an Anvil restart if reset failsLinking.getInitialURL()E2EStatusMarker:e2e-wallet-importing,e2e-wallet-ready, ande2e-wallet-errore2e-anvil-connectede2e-anvil-fundedafter the provider is reachable and the funding transaction confirmsMaestro flows
1iOSplatform valueNFT collection loading
The SendNft recordings showed the Rainbow Pooly collection with the collection row visible, but
Rainbow Pooly 16was missing from the expanded collection.fetchNftCollection(...)accepts{ expectedCount, force }expectedCountexpectedCount, because those refreshes can legitimately remove NFTs from the collectionbuildBriefUniqueTokenList(...)normalizes collection totals before building placeholder NFT rows