Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the double tap editor freeze issue and added test cases #26203

Merged
merged 8 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Modified the test cases
  • Loading branch information
Shalini-Ashokan committed Dec 3, 2024
commit 5a37579a05b3fc637b3279e212640778a2a65ab5
14 changes: 2 additions & 12 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue25975.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ protected override void Init()
{
var editor = new Editor()
{
Text = "Editor",
Text = "MAUI",
AutomationId = "DoubleTapEditor",
FontSize = 24,
MaxLength = 5,
Expand All @@ -17,21 +17,11 @@ protected override void Init()
AutoSize = EditorAutoSizeOption.TextChanges,
};

var entry = new Entry()
{
Text = "Entry",
AutomationId = "DoubleTapEntry",
FontSize = 24,
VerticalOptions = LayoutOptions.Center,
HorizontalTextAlignment = TextAlignment.Center,
HorizontalOptions = LayoutOptions.Fill,
};

var stackLayout = new StackLayout()
{
Children =
{
editor, entry
editor
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ public void PerformDoubleTapActionOnEditor()
{
App.WaitForElement("DoubleTapEditor");
App.DoubleTap("DoubleTapEditor");
App.ClearText("DoubleTapEditor");
App.EnterText("DoubleTapEditor", "Hello");

App.DoubleTap("DoubleTapEntry");
App.ClearText("DoubleTapEntry");
App.EnterText("DoubleTapEntry", "World");
App.DoubleTap("DoubleTapEditor");
App.ClearText("DoubleTapEditor");
App.EnterText("DoubleTapEditor", "World");

var editorText = App.FindElement("DoubleTapEditor").GetText();
Assert.That(editorText, Is.EqualTo("Hello"));
Assert.That(editorText, Is.EqualTo("World"));
}
}
}
Loading