[Testing] Feature Matrix UITest Cases for App Themes #31458
[Testing] Feature Matrix UITest Cases for App Themes #31458PureWeen merged 10 commits intodotnet:inflight/currentfrom
Conversation
|
Hey there @@TamilarasanSF4853! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive UI test coverage for .NET MAUI's App Theme functionality by implementing feature matrix tests that validate light/dark theme behavior across common controls using AppThemeBinding.
Key Changes:
- Adds extensive UI test suite with 28 test methods covering theme switching and AppThemeBinding functionality
- Creates host app pages demonstrating themed and default control styling across light/dark themes
- Implements platform-specific test handling with conditional compilation for known failing scenarios
Reviewed Changes
Copilot reviewed 6 out of 92 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| AppThemeFeatureTests.cs | Comprehensive UI test class with 28 test methods validating light/dark theme behavior and AppThemeBinding across various controls |
| DefaultThemePage.xaml | Host app page demonstrating standard control styling without AppThemeBinding for baseline comparison |
| DefaultThemePage.xaml.cs | Code-behind for default theme page with navigation and theme switching functionality |
| AppThemePage.xaml | Host app page showcasing AppThemeBinding styling across all major controls with extensive theme-aware properties |
| AppThemePage.xaml.cs | Code-behind for themed page with light/dark theme switching methods |
| CorePageView.cs | Updates gallery navigation to include new "App Theme" feature matrix entry |
| App.NavigateToGallery(AppThemeFeatureMatrix); | ||
| } | ||
|
|
||
| public void VerifyScreenshotWithPlatformCropping() |
There was a problem hiding this comment.
This method should be marked as private since it's a helper method used internally by test methods and should not be accessible from outside the class.
| VerifyScreenshotWithPlatformCropping(); | ||
| #endif |
There was a problem hiding this comment.
The VerifyScreenshotWithPlatformCropping() call is inside an iOS-specific conditional compilation block but should be outside it to ensure screenshots are captured on all platforms. Move this call after the #endif directive.
28ed2a7 to
dce2592
Compare
@jsuarezruiz I have updated the test case in the latest commit. Could you please rerun the CI? |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
@jsuarezruiz I have added the pending snapshots in the latest commit. |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Could you rebase to fix the conflict? Thanks in advance. |
|
@TamilarasanSF4853 Could you rebase and fix the conflicts? |
115641b to
056102b
Compare
@jsuarezruiz I have rebased and resolved the conflicts. |
|
/rebase |
fde3806 to
de398a1
Compare
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@jsuarezruiz I have added the pending snapshots in the latest commit. |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots
* added Android and iOS snapshots * added UITestCategorie * added Mac and Windows snapshots * modified test case * added Mac and Windows snapshots * added default style * removed some styles * modified the styles * added android and iOS snapshots * added snapshots






This PR adds a comprehensive App Theme feature matrix with host pages plus an extensive suite of UI tests validating light/dark theme behavior and AppThemeBinding styling across common controls.
App Themes Implementation:
After this fix PR #31891 is merged, the Android snapshots will need to be re-saved.
Screen.Recording.2025-08-29.at.3.30.56.PM.mov