[Testing] Added UI Test for manual test E1 (#18624)
* Added UI Test * Updated test * Added snapshots * Updated test * Generate new snapshot on iOS * Updated test
This commit is contained in:
Родитель
32e300553e
Коммит
62a1b2cb18
|
@ -0,0 +1,20 @@
|
|||
<?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.Issue18623">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
||||
AutomationId="WaitForStubControl"
|
||||
Text="1. In the Entry control below, input some text. The test passes if the text is not obscured." />
|
||||
<Entry
|
||||
AutomationId="NoPasswordEntry"
|
||||
IsPassword="False"
|
||||
Placeholder="IsPassword=False" />
|
||||
<Label
|
||||
Text="2. In the Entry control below, input some text. The test passes if the text is obscured." />
|
||||
<Entry
|
||||
AutomationId="PasswordEntry"
|
||||
IsPassword="True"
|
||||
Placeholder="IsPassword=True" />
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
|
@ -0,0 +1,15 @@
|
|||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Controls.Xaml;
|
||||
|
||||
namespace Maui.Controls.Sample.Issues
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
[Issue(IssueTracker.ManualTest, "E1", "Entry IsPassword obscure the text", PlatformAffected.All)]
|
||||
public partial class Issue18623 : ContentPage
|
||||
{
|
||||
public Issue18623()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
using NUnit.Framework;
|
||||
using UITest.Appium;
|
||||
using UITest.Core;
|
||||
|
||||
namespace Microsoft.Maui.AppiumTests.Issues
|
||||
{
|
||||
public class Issue18623 : _IssuesUITest
|
||||
{
|
||||
public Issue18623(TestDevice device) : base(device)
|
||||
{
|
||||
}
|
||||
|
||||
public override string Issue => "Entry IsPassword obscure the text";
|
||||
|
||||
[Test]
|
||||
public async Task EntryIsPasswordObscureText()
|
||||
{
|
||||
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.iOS },
|
||||
"Currently fails on iOS; see https://github.com/dotnet/maui/issues/18981");
|
||||
|
||||
App.WaitForElement("WaitForStubControl");
|
||||
|
||||
// 1. In the Entry control below, input some text. The test passes if the text is not obscured.
|
||||
App.EnterText("NoPasswordEntry", "Test");
|
||||
|
||||
// 2. In the Entry control below, input some text. The test passes if the text is obscured.
|
||||
App.EnterText("PasswordEntry", "Test");
|
||||
|
||||
// Wait to capture the snapshot after enter the text and
|
||||
// closed the keyboard.
|
||||
await Task.Delay(1000);
|
||||
|
||||
// 3. Verify the result comparing snapshots.
|
||||
VerifyScreenshot();
|
||||
}
|
||||
}
|
||||
}
|
Двоичные данные
src/Controls/tests/UITests/snapshots/android/EntryIsPasswordObscureText.png
Normal file
Двоичные данные
src/Controls/tests/UITests/snapshots/android/EntryIsPasswordObscureText.png
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 21 KiB |
Двоичные данные
src/Controls/tests/UITests/snapshots/windows/EntryIsPasswordObscureText.png
Normal file
Двоичные данные
src/Controls/tests/UITests/snapshots/windows/EntryIsPasswordObscureText.png
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 12 KiB |
Загрузка…
Ссылка в новой задаче