-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0138a4
commit 21ed209
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
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,9 @@ | ||
<?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.Issue18668"> | ||
<VerticalStackLayout> | ||
<RadioButton x:Name="radioButton" Content="Hello, Maui!"/> | ||
<Button AutomationId="button" Text="Disable radio button" Clicked="ButtonClicked"/> | ||
</VerticalStackLayout> | ||
</ContentPage> |
17 changes: 17 additions & 0 deletions
17
src/Controls/tests/TestCases.HostApp/Issues/Issue18668.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,17 @@ | ||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 18668, "Visual state change for disabled RadioButton", PlatformAffected.All)] | ||
public partial class Issue18668 : ContentPage | ||
{ | ||
public Issue18668() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void ButtonClicked(object sender, EventArgs e) | ||
{ | ||
radioButton.IsEnabled = false; | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18668.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,24 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue18668 : _IssuesUITest | ||
{ | ||
public override string Issue => "Visual state change for disabled RadioButton"; | ||
|
||
public Issue18668(TestDevice device) : base(device){ } | ||
|
||
[Test] | ||
[Category(UITestCategories.RadioButton)] | ||
public void TestIssue18668() | ||
{ | ||
App.WaitForElement("button"); | ||
App.Click("button"); | ||
|
||
// The test passes if the radio button is visually disabled | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |