-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[net10.0, Testing] Fix Button & RadioFeatureTests Screenshot Issue on Windows #30416
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
[net10.0, Testing] Fix Button & RadioFeatureTests Screenshot Issue on Windows #30416
Conversation
Hey there @@HarishKumarSF4517! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
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.
Pull Request Overview
This PR enhances the stability of Button and RadioButton feature UI tests on Windows by explicitly waiting for and tapping the event label before taking screenshots.
- Added
App.WaitForElement
andApp.Tap
steps forClickedEventLabel
in three Button tests. - Added
App.WaitForElement
andApp.Tap
steps forSelectedValueLabelOne
in the RadioButton test.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs | Added wait-and-tap steps on ClickedEventLabel before VerifyScreenshot() in three methods. |
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/RadioButtonFeatureTests.cs | Added wait-and-tap steps on SelectedValueLabelOne before VerifyScreenshot() . |
@@ -75,6 +75,8 @@ public void Button_SetCharacterSpacingAndText_VerifyVisualState() | |||
App.WaitForElement("Apply"); | |||
App.Tap("Apply"); | |||
App.WaitForElementTillPageNavigationSettled("ButtonControl"); | |||
App.WaitForElement("ClickedEventLabel"); |
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.
[nitpick] The wait-and-tap pattern for 'ClickedEventLabel' is repeated across multiple tests; consider extracting this into a shared helper to reduce duplication and simplify future updates.
Copilot uses AI. Check for mistakes.
@@ -213,6 +213,8 @@ public void RadioButton_SetContentAndFontSize_VerifyVisualState() | |||
App.WaitForElement("Apply"); | |||
App.Tap("Apply"); | |||
App.WaitForElementTillPageNavigationSettled("RadioButtonControlOne"); | |||
App.WaitForElement("SelectedValueLabelOne"); |
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.
Ensure that the AutomationId 'SelectedValueLabelOne' is defined in the TestCases.HostApp UI with a unique value so the test can reliably locate the element.
Copilot uses AI. Check for mistakes.
@@ -75,6 +75,8 @@ public void Button_SetCharacterSpacingAndText_VerifyVisualState() | |||
App.WaitForElement("Apply"); | |||
App.Tap("Apply"); | |||
App.WaitForElementTillPageNavigationSettled("ButtonControl"); | |||
App.WaitForElement("ClickedEventLabel"); |
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.
Verify that the AutomationId 'ClickedEventLabel' has been added to the relevant TestCases.HostApp UI page and is unique to avoid test element collisions.
Copilot uses AI. Check for mistakes.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
I have fixed the UI test in the PR #29281 and improved the stability for the test cases.
Build Link: Azure DevOps - Build #145495
Enhancements to Button feature tests:
Enhancements to RadioButton feature tests: