-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Testing] Feature matrix UITest Cases for ScrollView with LayoutOptions #31650
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
Conversation
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. |
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 pull request introduces a comprehensive UI test suite for testing ScrollView layout behavior with different LayoutOptions configurations. The feature matrix approach allows for systematic testing of various layout combinations including horizontal/vertical alignment options, width/height requests, and scroll orientations.
- Adds a new feature matrix test page with interactive UI controls for configuring ScrollView layout properties
- Implements 48 automated UI tests covering different combinations of layout options, size requests, and orientations
- Creates supporting infrastructure including MVVM pattern with LayoutViewModel for managing test state
Reviewed Changes
Copilot reviewed 7 out of 199 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
ScrollViewWithLayoutOptionsFeatureTests.cs | Contains 48 comprehensive UI tests for different ScrollView layout combinations |
LayoutViewModel.cs | View model implementing INotifyPropertyChanged for managing layout properties |
LayoutOptionsPage.xaml.cs | Code-behind for options configuration page with event handlers |
LayoutOptionsPage.xaml | UI layout for configuring layout options, size requests, and orientation |
LayoutControlPage.xaml.cs | Main test page with ScrollView and layout switching functionality |
LayoutControlPage.xaml | XAML definition for the main test interface |
CorePageView.cs | Registration entry point for the new feature matrix page |
App.Tap(Apply); | ||
App.WaitForElement(StackLayoutButton); | ||
App.Tap(StackLayoutButton); |
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.
The test pattern of navigating to options, configuring settings, applying them, and then tapping layout buttons is repeated 48 times with only minor variations. Consider extracting this into a helper method to reduce code duplication and improve maintainability.
Copilot uses AI. Check for mistakes.
|
||
private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e) | ||
{ | ||
BindingContext = _viewModel = new LayoutViewModel(); |
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.
Creating a new LayoutViewModel instance here discards any configuration changes made on the options page. The existing _viewModel should be reused to preserve the configured layout options.
BindingContext = _viewModel = new LayoutViewModel(); | |
BindingContext = _viewModel; |
Copilot uses AI. Check for mistakes.
<ToolbarItem Text="Apply" | ||
Clicked="ApplyButton_Clicked"/> |
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.
The Apply button is missing an AutomationId. Based on the test file, it should have AutomationId="Apply" to match the test expectations.
Copilot uses AI. Check for mistakes.
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.
I have added the AutomationId in the latest commit.
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
This PR reopens the work from the closed PR #31122
This pull request introduces a new feature matrix page to the test host app, allowing users to interactively test and configure layout options for ScrollView child layouts. The changes add a new LayoutControlPage with a detailed UI for adjusting layout options, as well as the necessary supporting view model and navigation logic.
UI Implementation
LayoutControlPage
andLayoutMainPage
(LayoutControlPage.xaml
and.xaml.cs
) which display a ScrollView and buttons to switch between StackLayout and Grid layouts, and navigate to layout options. [1] [2]Layout Options Configuration
LayoutOptionsPage
(LayoutOptionsPage.xaml
and.xaml.cs
) providing buttons to change horizontal/vertical options, width/height requests, and scroll orientation for the ScrollView, updating the view model accordingly. [1] [2]MVVM Support
LayoutViewModel
, anINotifyPropertyChanged
view model that tracks and updates layout properties (options, size requests, and orientation) for the test pages.Issues Fixed
Fixes #30698
Screen.Recording.2025-08-11.at.10.48.50.AM.mov