-
Notifications
You must be signed in to change notification settings - Fork 58
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
RN upgrade: Fix test suite 1 errors #5986
RN upgrade: Fix test suite 1 errors #5986
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! |
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.
LGTM 🎊 !
I ran the e2e tests locally and confirmed the change addressed the issue.
@@ -13,7 +13,7 @@ const { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.js
suite 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.js
TEST_RN_PLATFORM=ios npm run device-tests:local gutenberg-editor-sanity-test-1-visual.test.js
PR submission checklist: