-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 Disabling some image tests after updating net9.0 with main #25770
base: main
Are you sure you want to change the base?
Changes from all commits
abc472a
29e40f7
e623d6c
7b58624
14f7c66
225cca6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ public MainPage() | |
|
||
popOnAppearing.Appearing += async (sender, args) => | ||
{ | ||
await Task.Yield(); | ||
await Task.Delay(50); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we wire into an event on the page we're popping back to and add a label? like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this should be a different test case? If there is a problem popping from Appearing, do we want to fix that of just say "don't do that"? We can still use your idea of a label update because the NavigatedTo will fire again on the first/initial page? When you pop the new page, we can increment the counter. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, if this is because of animations, then we will have to document that you can't pop in Appearing while pushing. |
||
await popOnAppearing.Navigation.PopModalAsync(); | ||
}; | ||
|
||
|
@@ -59,6 +59,7 @@ public MainPage() | |
} | ||
}; | ||
|
||
await Task.Delay(50); | ||
await intermediatePage.Navigation.PushModalAsync(popOnAppearing); | ||
|
||
await page1.Navigation.PushModalAsync(intermediatePage); | ||
|
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.
Could just include a View, like a Label, and wait for it?
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.
In the test case host app, a new page is being pushed and then immediately popped on the page's Appearing event. As a result, the page's UI does not load, making it impossible to validate views like labels. Here, added a slight delay before popping the page in the Appearing event to avoid exception.
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.
What was the exception? Adding a delay to fix the issue may mean something else went wrong.