-
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.
[Testing] Added UI Test for manual test D12 (#18677)
* Added UI Test * Added snapshots * Updated snapshot
- Loading branch information
1 parent
59fa062
commit 417acea
Showing
6 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/Controls/samples/Controls.Sample.UITests/Issues/Issue18675.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,22 @@ | ||
<?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.Issue18675"> | ||
<ScrollView> | ||
<VerticalStackLayout> | ||
<Label | ||
AutomationId="WaitForStubControl" | ||
Text="1. The test fails if the placeholder text in the editor below is missing." /> | ||
<Editor | ||
AutomationId="IsReadOnlyEditor" | ||
IsReadOnly="True" | ||
Placeholder="testing" /> | ||
<Label | ||
Text="2. The test fails if the placeholder text in the editor below is not blue." /> | ||
<Editor | ||
IsReadOnly="True" | ||
Placeholder="testing" | ||
PlaceholderColor="Blue" /> | ||
</VerticalStackLayout> | ||
</ScrollView> | ||
</ContentPage> |
15 changes: 15 additions & 0 deletions
15
src/Controls/samples/Controls.Sample.UITests/Issues/Issue18675.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,15 @@ | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.Xaml; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.ManualTest, "D12", "Editor IsReadOnly property prevent from modifying the text", PlatformAffected.All)] | ||
public partial class Issue18675 : ContentPage | ||
{ | ||
public Issue18675() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
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,27 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.AppiumTests.Issues | ||
{ | ||
public class Issue186751 : _IssuesUITest | ||
{ | ||
public Issue186751(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
public override string Issue => "Editor IsReadOnly property prevent from modifying the text"; | ||
|
||
[Test] | ||
public void EditorIsReadOnlyPreventModify() | ||
{ | ||
App.WaitForElement("WaitForStubControl"); | ||
|
||
// 1.The test fails if the placeholder text in the editor below is missing. | ||
App.Click("IsReadOnlyEditor"); | ||
|
||
// 2. The test fails if the placeholder text in the editor below is not blue. | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |
Binary file added
BIN
+39.9 KB
src/Controls/tests/UITests/snapshots/android/EditorIsReadOnlyPreventModify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+58.3 KB
src/Controls/tests/UITests/snapshots/ios/EditorIsReadOnlyPreventModify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.1 KB
src/Controls/tests/UITests/snapshots/windows/EditorIsReadOnlyPreventModify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.