-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UITesting] Moved ButtonHandler.ImageSourceInitializesCorrectly to ap…
…pium
- Loading branch information
Showing
5 changed files
with
65 additions
and
46 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/Controls/tests/TestCases.HostApp/Issues/Issue24916.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue24916" | ||
Title="Issue 24916"> | ||
<ContentPage.Resources> | ||
<Style TargetType="Button"> | ||
<Setter Property="WidthRequest" | ||
Value="100"/> | ||
<Setter Property="HeightRequest" | ||
Value="100"/> | ||
<Setter Property="BackgroundColor" | ||
Value="Black"/> | ||
</Style> | ||
<Style TargetType="ImageButton"> | ||
<Setter Property="WidthRequest" | ||
Value="100"/> | ||
<Setter Property="HeightRequest" | ||
Value="100"/> | ||
<Setter Property="BackgroundColor" | ||
Value="Black"/> | ||
</Style> | ||
</ContentPage.Resources> | ||
<VerticalStackLayout> | ||
<Label Text="Buttons:" AutomationId="label"/> | ||
<Button ImageSource="oasis.png"/> | ||
<Button ImageSource="dotnet_bot.png"/> | ||
<Label Text="Image buttons:"/> | ||
<ImageButton Source="oasis.png"/> | ||
<ImageButton Source="dotnet_bot.png"/> | ||
</VerticalStackLayout> | ||
</ContentPage> |
12 changes: 12 additions & 0 deletions
12
src/Controls/tests/TestCases.HostApp/Issues/Issue24916.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 24916, "Image Source in Button initializes correctly", PlatformAffected.All)] | ||
public partial class Issue24916 : ContentPage | ||
{ | ||
public Issue24916() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24916.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue24916 : _IssuesUITest | ||
{ | ||
public Issue24916(TestDevice testDevice) : base(testDevice){} | ||
|
||
public override string Issue => "Image Source in Button initializes correctly"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Button)] | ||
public void ImageSourceInitializesCorrectly() | ||
{ | ||
App.WaitForElement("label"); | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters