-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Use a fixed WinUI window size for Appium test app #16956
Conversation
This makes the screenshots more deterministic, more likely to match between dev machines and CI.
|
||
protected override Window CreateWindow(IActivationState activationState) | ||
{ | ||
#if WINDOWS |
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.
Won't we have the same problem on catalyst?
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.
Yes, good point. Updated.
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.
(And I updated this again, with the Catalyst sizing workaround code suggested by @mattleibow)
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.
D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\MauiProgram.cs(56,14): error CS0219: The variable 'desktopWindowWidth' is assigned but its value is never used [D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\Controls.Sample.UITests.csproj::TargetFramework=net7.0-ios]
D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\MauiProgram.cs(57,14): error CS0219: The variable 'desktopWindowHeight' is assigned but its value is never used [D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\Controls.Sample.UITests.csproj::TargetFramework=net7.0-ios]
D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\MauiProgram.cs(56,14): error CS0219: The variable 'desktopWindowWidth' is assigned but its value is never used [D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\Controls.Sample.UITests.csproj::TargetFramework=net7.0-tizen]
D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\MauiProgram.cs(57,14): error CS0219: The variable 'desktopWindowHeight' is assigned but its value is never used [D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\Controls.Sample.UITests.csproj::TargetFramework=net7.0-tizen]
D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\MauiProgram.cs(56,14): error CS0219: The variable 'desktopWindowWidth' is assigned but its value is never used [D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\Controls.Sample.UITests.csproj::TargetFramework=net7.0-android]
D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\MauiProgram.cs(57,14): error CS0219: The variable 'desktopWindowHeight' is assigned but its value is never used [D:\a\_work\1\s\src\Controls\samples\Controls.Sample.UITests\Controls.Sample.UITests.csproj::TargetFramework=net7.0-android]
256 Warning(s)
6 Error(s)
fixed |
This makes the screenshots more deterministic, more likely to match between dev machines and CI.
Previously the window size was the WinUI default, taking up maybe 2/3 of the screen width - so it
was huge on huge monitors, small on small monitors.