mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Assert switch state before the toggled visual screenshot (#59413)
Summary: The custom-colors switch flow takes its `toggled` screenshot without checking the taps landed, so a dropped tap captures the wrong state. That spoiled a baseline on `main` and failed https://github.com/react/react-native/issues/59390. This asserts each switch's `checked` state before the screenshot, so a dropped tap fails the flow and it's retried instead. Changelog: [Internal] Pull Request resolved: https://github.com/react/react-native/pull/59413 Test Plan: Ran the section on the iOS 26 visual simulator: passes as written, and fails when asserting the wrong state. Android runs in this PR's CI. Reviewed By: cipolleschi Differential Revision: D127577122 Pulled By: cortinico fbshipit-source-id: 59bed882d9f1f7cdb553c170e2d897fc39f22e41
This commit is contained in:
1 parent
f76f251b62
commit
7206dcc848
1 file changed
+6
@@ -80,6 +80,12 @@ appId: ${APP_ID}
|
||||
id: 'initial-false-switch'
|
||||
- tapOn:
|
||||
id: 'initial-true-switch'
|
||||
- assertVisible:
|
||||
id: 'initial-false-switch'
|
||||
checked: true
|
||||
- assertVisible:
|
||||
id: 'initial-true-switch'
|
||||
checked: false
|
||||
- waitForAnimationToEnd:
|
||||
timeout: 5000
|
||||
- takeScreenshot:
|
||||
|
||||
Reference in new issue
Block a user