Skip to content
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

Fix Android device tests for AndroidX migration #1125

Merged

Conversation

mkevins
Copy link
Contributor

@mkevins mkevins commented Jun 12, 2019

This PR fixes e2e Android device tests for the AndroidX migration.

It seems that UI element locators were broken by a change in the way accessibilityIds are being assigned . content-desc has an extra comma and space in each element, described here: #1112 (comment).

The approach in this PR is to proxy calls to the driver, and selectively append the necessary characters (, ) to the call for any functions that need it. Additionally, where accessibilityIdXPathAttrib is tested for equality, an accessibilityIdSuffix is added to the appropriate ids. The suffix is not required when accessibilityIdXPathAttrib is tested via contains, as the lack of the suffix will not affect the match.

To test:
yarn test:e2e:android:local

@mkevins mkevins added [OS] Android Testing Anything related to automated tests labels Jun 12, 2019
@mkevins mkevins added this to the v1.8 milestone Jun 12, 2019
@mkevins mkevins requested review from Tug and hypest June 12, 2019 16:26
@mkevins mkevins mentioned this pull request Jun 13, 2019
1 task
@marecar3
Copy link
Contributor

Hey, @mkevins 👋I have fixed iOS tests so it seems that we are ready to merge this one in AndroidX branch.

Copy link
Contributor

@marecar3 marecar3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@marecar3
Copy link
Contributor

Merging this one in #1112

@marecar3 marecar3 merged commit 82de3b6 into issue/android_x_migration Jun 14, 2019
@marecar3 marecar3 deleted the try/fix-e2e-tests-for-androidx-migration branch June 14, 2019 22:02
hypest added a commit that referenced this pull request Oct 23, 2019
hypest added a commit that referenced this pull request Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[OS] Android Testing Anything related to automated tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants