Skip to content

[net10.0, Testing] Fix LabelFeatureTests Screenshot Issue on Windows #30137

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

NafeelaNazhir
Copy link
Contributor

This pull request enhances the test cases for verifying label features in LabelFeatureTests.cs by ensuring that the main label is explicitly tapped before taking a screenshot. This interaction removes the keyboard navigation focus indicator (black box) that may appear if a control is previously focused via keyboard. By tapping another region (the label), the black box disappears, resulting in more reliable and cleaner screenshots for verification.
Enhancements to label feature test cases:

Copy link
Contributor

Hey there @@NafeelaNazhir! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Jun 23, 2025
@NafeelaNazhir NafeelaNazhir marked this pull request as ready for review June 23, 2025 14:47
@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 14:47
@NafeelaNazhir NafeelaNazhir requested a review from a team as a code owner June 23, 2025 14:47
Copy link
Contributor

@Copilot Copilot AI left a 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 LabelFeatureTests to address the screenshot issue on Windows by explicitly tapping the MainLabel to remove the keyboard focus indicator (black box) before verifying screenshots.

  • Added wait and tap steps for MainLabel in four test cases to ensure a clean screenshot.

Comment on lines +527 to +528
App.WaitForElement(MainLabel);
App.Tap(MainLabel);
Copy link
Preview

Copilot AI Jun 23, 2025

Choose a reason for hiding this comment

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

[nitpick] The calls to 'WaitForElement(MainLabel)' and 'Tap(MainLabel)' are repeated in each test case. Consider extracting these steps into a helper method to improve maintainability and reduce duplication in your test suite.

Suggested change
App.WaitForElement(MainLabel);
App.Tap(MainLabel);
WaitForAndTapMainLabel();

Copilot uses AI. Check for mistakes.

@anandhan-rajagopal anandhan-rajagopal added the area-testing Unit tests, device tests label Jun 23, 2025
@rmarinho
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho changed the title [net 10.0, Testing] Fix LabelFeatureTests Screenshot Issue on Windows [net10.0, Testing] Fix LabelFeatureTests Screenshot Issue on Windows Jun 23, 2025
@rmarinho rmarinho merged commit c2b7608 into dotnet:net10.0 Jun 24, 2025
127 of 129 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants