Reset opacity when view is being reused#22820
Merged
Merged
Conversation
mattleibow
reviewed
Jun 4, 2024
| App.Tap("NavigateToSecondPageButton"); | ||
| App.WaitForElement("NavigateBackToFirstPageButton"); | ||
| App.Tap("NavigateBackToFirstPageButton"); | ||
| App.WaitForElement("NavigateToSecondPageButton"); |
Member
There was a problem hiding this comment.
How does WaitForElement test for visibility?
Member
Author
There was a problem hiding this comment.
It looks like if the opacity is zero then appium can't find it.
I was curious about this as well :-)
If I remove my fix, the test fails, if I put the fix back, the test passes.
Contributor
There was a problem hiding this comment.
If the element is not visible on the screen, appium can't find it. So, it's valid. Just could be nice to include a comment here.
jsuarezruiz
reviewed
Jun 4, 2024
mattleibow
approved these changes
Jun 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
The DrawerLayout currently recreates its details view whenever it's navigated back to. In the case where you are nesting a FlyoutPage inside a NavigationPage, this causes a double animation to occur which leaves the opacity of the view set to zero. When android is processing an animation it sets the alpha of a view to zero
And then when it's done it sets it back to 1, the problem we're hitting is that the second animation is starting before the first one finishes, so, the second animation thinks it needs to use "0" as the "initial" alpha value.
Ideally, we will fix DrawerLayout to just reuse its view opposed to creating a new one but that's going to take a bit more of an effort, so, this should get us through until that can be reworked.
Issues Fixed
Fixes #19955