Skip to content

Commit 4f9c994

Browse files
author
Mike Corsaro
committed
Port UI tests from #20953
1 parent 2a6e814 commit 4f9c994

File tree

6 files changed

+792
-0
lines changed

6 files changed

+792
-0
lines changed

src/Controls/samples/Controls.Sample.UITests/Controls.Sample.UITests.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,24 @@
4343
<ItemGroup>
4444
<MauiImage Include="Resources\Images\*" />
4545
<MauiImage Update="Resources\Images\dotnet_bot.svg" Color="#FFFFFF" BaseSize="168,208" />
46+
<MauiImage Update="Resources\Images\dotnet_bot_resized.svg" Color="#FFFFFF" BaseSize="20,20" />
4647
<MauiImage Include="Resources\Images\dotnet_bot.svg" Link="Resources\Images\small_dotnet_bot.svg" Color="#FFFFFF" BaseSize="64,64" />
4748
<MauiImage Include="Resources\AppIcons\appicon.svg" ForegroundFile="Resources\AppIcons\appicon_foreground.svg" IsAppIcon="true" />
4849
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#FFFFFF" BaseSize="168,208" />
4950
<MauiFont Include="Resources\Fonts\OpenSans-Regular.ttf" />
5051
</ItemGroup>
52+
53+
<ItemGroup>
54+
<Compile Update="Issues\Issue21394.xaml.cs">
55+
<DependentUpon>Issue21394.xaml</DependentUpon>
56+
</Compile>
57+
</ItemGroup>
5158

5259
<Import Project="$(MauiSrcDirectory)Maui.InTree.props" Condition=" '$(UseMaui)' != 'true' " />
60+
61+
<ItemGroup>
62+
<MauiXaml Update="Issues\Issue21394.xaml">
63+
<Generator>MSBuild:Compile</Generator>
64+
</MauiXaml>
65+
</ItemGroup>
5366
</Project>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
x:Class="Maui.Controls.Sample.Issues.Issue21394"
5+
Title="Issue21394">
6+
<VerticalStackLayout>
7+
<Button Background="Lightgray" ContentLayout="Right, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title" AutomationId="WaitForStubControl"/>
8+
<BoxView HeightRequest="5" />
9+
10+
<Button Background="Lightgray" ContentLayout="Top, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/>
11+
<BoxView HeightRequest="5" />
12+
13+
<Button Background="Lightgray" ContentLayout="Left, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/>
14+
<BoxView HeightRequest="5" />
15+
16+
<Button Background="Lightgray" ContentLayout="Bottom, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/>
17+
<BoxView HeightRequest="5" />
18+
19+
<Button Background="Lightgray" ContentLayout="20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/>
20+
<BoxView HeightRequest="5" />
21+
22+
<Button Background="Lightgray" ContentLayout="Right, 0" ImageSource="dotnet_bot_resized.png" Text="Button Title"/>
23+
<BoxView HeightRequest="5" />
24+
25+
<Button Background="Lightgray" ContentLayout="Top, 20" ImageSource="dotnet_bot_resized.png" Text="Button Title"/>
26+
<BoxView HeightRequest="5" />
27+
28+
<Button Background="Lightgray" ContentLayout="Left, 30" ImageSource="dotnet_bot_resized.png" Text="Button Title"/>
29+
<BoxView HeightRequest="5" />
30+
31+
<Button Background="Lightgray" ContentLayout="Bottom, 0" ImageSource="dotnet_bot_resized.png" Text="Button Title"/>
32+
<BoxView HeightRequest="5" />
33+
34+
<Button Background="Lightgray" ContentLayout="Right, 10" ImageSource="dotnet_bot_resized.png" Text="Button Title" HeightRequest="60"/>
35+
<BoxView HeightRequest="5" />
36+
37+
<Button Background="Lightgray" ContentLayout="Top, 10" ImageSource="dotnet_bot_resized.png" Text="Button Title" HeightRequest="60"/>
38+
<BoxView HeightRequest="5" />
39+
40+
<Button Background="Lightgray" ContentLayout="Left, 10" ImageSource="dotnet_bot_resized.png" Text="Button Title" HeightRequest="60"/>
41+
<BoxView HeightRequest="5" />
42+
43+
<Button Background="Lightgray" ContentLayout="Bottom, 10" ImageSource="dotnet_bot_resized.png" Text="Button Title" HeightRequest="60"/>
44+
<BoxView HeightRequest="5" />
45+
</VerticalStackLayout>
46+
</ContentPage>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using Microsoft.Maui.Controls;
2+
using Microsoft.Maui.Controls.Xaml;
3+
4+
namespace Maui.Controls.Sample.Issues;
5+
6+
[XamlCompilation(XamlCompilationOptions.Compile)]
7+
[Issue(IssueTracker.Github, 21394, "Buttons with Images layouts", PlatformAffected.UWP)]
8+
public partial class Issue21394 : ContentPage
9+
{
10+
public Issue21394()
11+
{
12+
InitializeComponent();
13+
}
14+
}

0 commit comments

Comments
 (0)