Skip to content

Replace the use of isEnabled() to isHittable()#12

Merged
jostnes merged 4 commits intotrunkfrom
add-isHittable-to-waitForScreen
Sep 7, 2022
Merged

Replace the use of isEnabled() to isHittable()#12
jostnes merged 4 commits intotrunkfrom
add-isHittable-to-waitForScreen

Conversation

@jostnes
Copy link
Copy Markdown
Contributor

@jostnes jostnes commented Sep 5, 2022

What does this do?

To replace the use of isEnabled() with isHittable(), also thought of adding both but after testing found that that is unnecessary

Why the change?

It was reported in woocommerce/woocommerce-ios#7526 that .isLoaded() method which uses this waitForScreen from ScreenObject could result in a false positive if the element still exists behind a modal. By updating this to isHittable it will no longer work if the element is behind a modal.

Testing

Test repos that are using this and make sure that all UI Tests still work - WCiOS and WPiOS.

Copy link
Copy Markdown
Contributor

@pachlava pachlava left a comment

Choose a reason for hiding this comment

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

The nature of this change is such, that I feel comfortable approving the PR just after seeing the linked WPiOS / WCiOS PRs pass. Also, using isHittable sounds more natural than isEnabled here. Thank you for working on this @jostnes!

@jostnes jostnes merged commit cb38a32 into trunk Sep 7, 2022
@jostnes jostnes deleted the add-isHittable-to-waitForScreen branch September 7, 2022 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants