Skip to content

[Testing] Feature Matrix UITest Cases for App Themes #31458

Merged
PureWeen merged 10 commits intodotnet:inflight/currentfrom
TamilarasanSF4853:feature-matrix-appthemes
Oct 31, 2025
Merged

[Testing] Feature Matrix UITest Cases for App Themes #31458
PureWeen merged 10 commits intodotnet:inflight/currentfrom
TamilarasanSF4853:feature-matrix-appthemes

Conversation

@TamilarasanSF4853
Copy link
Contributor

@TamilarasanSF4853 TamilarasanSF4853 commented Sep 2, 2025

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:

  • Adds themed and default pages demonstrating Light/Dark switching via UserAppTheme and broad AppThemeBinding coverage (foreground, background, border, placeholder, track, thumb, progress, title colors) across common controls (Button, Border, CheckBox, DatePicker, Entry, Editor, RadioButton, SearchBar, Image, BoxView, ImageButton, Rectangle, Picker, ProgressBar, Slider, Label, Stepper, Switch, TitleBar).
  • UI tests toggle themes, interact where needed, clear text to expose placeholders, and capture screenshots (with iOS crop) while guarding known failing scenarios behind conditional compilation for stability.

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

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Sep 2, 2025
@dotnet-policy-service
Copy link
Contributor

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.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Sep 2, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ghost ghost added the area-testing Unit tests, device tests label Sep 3, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TamilarasanSF4853 TamilarasanSF4853 marked this pull request as ready for review September 8, 2025 11:13
Copilot AI review requested due to automatic review settings September 8, 2025 11:13
@TamilarasanSF4853 TamilarasanSF4853 requested a review from a team as a code owner September 8, 2025 11:13
Copy link
Contributor

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 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()
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 369 to 370
VerifyScreenshotWithPlatformCropping();
#endif
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

Some tests failing on Desktop:
image

Bacause:
OpenQA.Selenium.Appium.AppiumCommandExecutionHelper.IsKeyboardShown is not implemented

@TamilarasanSF4853
Copy link
Contributor Author

Some tests failing on Desktop: image

Bacause: OpenQA.Selenium.Appium.AppiumCommandExecutionHelper.IsKeyboardShown is not implemented

@jsuarezruiz I have updated the test case in the latest commit. Could you please rerun the CI?

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

Tests failing:
image
Because there are pending snapshots, mostly on Windows. All are available in the latest build. Could you commit the images?

@TamilarasanSF4853
Copy link
Contributor Author

Tests failing: image Because there are pending snapshots, mostly on Windows. All are available in the latest build. Could you commit the images?

@jsuarezruiz I have added the pending snapshots in the latest commit.

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz
Copy link
Contributor

Could you rebase to fix the conflict? Thanks in advance.

@jsuarezruiz
Copy link
Contributor

@TamilarasanSF4853 Could you rebase and fix the conflicts?

@TamilarasanSF4853 TamilarasanSF4853 force-pushed the feature-matrix-appthemes branch from 115641b to 056102b Compare October 2, 2025 14:58
@TamilarasanSF4853
Copy link
Contributor Author

@TamilarasanSF4853 Could you rebase and fix the conflicts?

@jsuarezruiz I have rebased and resolved the conflicts.

@jsuarezruiz
Copy link
Contributor

/rebase

@github-actions github-actions bot force-pushed the feature-matrix-appthemes branch from fde3806 to de398a1 Compare October 21, 2025 08:01
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

Failing tests on Android:
image

@TamilarasanSF4853
Copy link
Contributor Author

Failing tests on Android: image

@jsuarezruiz I have added the pending snapshots in the latest commit.

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current October 31, 2025 20:29
@PureWeen PureWeen merged commit 4f619d4 into dotnet:inflight/current Oct 31, 2025
76 of 78 checks passed
PureWeen pushed a commit that referenced this pull request Nov 11, 2025
* 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
github-actions bot pushed a commit that referenced this pull request Nov 11, 2025
* 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
github-actions bot pushed a commit that referenced this pull request Nov 14, 2025
* 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
github-actions bot pushed a commit that referenced this pull request Nov 15, 2025
* 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
github-actions bot pushed a commit that referenced this pull request Nov 15, 2025
* 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
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
* 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
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
* 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
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
* 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
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
* 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
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
* 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
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2025
@TamilarasanSF4853 TamilarasanSF4853 deleted the feature-matrix-appthemes branch January 9, 2026 10:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

3 participants