RN upgrade: Fix test suite 1 errors#5986
RN upgrade: Fix test suite 1 errors#5986SiobhyB merged 3 commits intoupgrade/react-native-0.71.8from
Conversation
With this change, the most up-to-date details for the XPATH are now in place.
This commit significantly simplifies the XPath used to identify the column block's appender button in the Android application. Previous long and potentially unstable XPath has been replaced with a more concise and reliable one, reducing the dependence on the complete UI hierarchy and improving the maintainability and stability of the automation script.
|
Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job! |
fluiddot
left a comment
There was a problem hiding this comment.
LGTM 🎊 !
I ran the e2e tests locally and confirmed the change addressed the issue.
| import { NESTED_COLUMNS_3_LEVELS } from './test-editor-data'; | ||
|
|
||
| const ANDROID_COLUMN_APPENDER_BUTTON_XPATH = | ||
| '//android.widget.Button[@content-desc="Column Block. Row 1"]/android.view.ViewGroup[2]/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.widget.Button'; |
There was a problem hiding this comment.
@SiobhyB it appears I originally defined this problematic XPath. I recall lacking confidence in its definition at the time. For my own education, what was your approach for identifying this simpler, more stable XPath? Thanks!
There was a problem hiding this comment.
@dcalhoun, I don't necessarily think the previous XPath was problematic, rather I think something must have changed in the view hierarchy, as it had begun to fail consistently. To get the newer XPath, I followed a process that I believe you may have also followed i.e. I selected the component in appium-inspector and then copied/pasted the current XPath value.
(Note, you'll see in my first commit that I'd initially copied/pasted the entire XPath. I referenced simplifying that XPath in a later commit when I realised it wasn't needed in its entirety. The references to stability and simplification in that later commit's message are related to my mistake within this PR, not the test's previous XPath.)
Let me know if I can further expand on anything!
There was a problem hiding this comment.
Ah, OK. Yes, I sourced my XPath from Appium Inspector as well. Thanks for elaborating!
Description
Following the upgrade to React Native
0.71.11, all but the first test in thegutenberg-editor-sanity-test-1-visual.test.jssuite were failing for Android.In this PR, the following changes have been made to address the failures:
Testing
TEST_RN_PLATFORM=android npm run device-tests:local gutenberg-editor-sanity-test-1-visual.test.jsTEST_RN_PLATFORM=ios npm run device-tests:local gutenberg-editor-sanity-test-1-visual.test.jsPR submission checklist: