Skip to content

[Testing] Feature matrix UITest Cases for Editor Control #30574

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
Next Next commit
Added modified snapshot
  • Loading branch information
LogishaSelvarajSF4525 committed Jul 11, 2025
commit 1182adc11b38a8ce9382060fe5cd0c61c2873350
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e)
_viewModel.VerticalTextAlignment = TextAlignment.End;
_viewModel.CursorPosition = 0;
_viewModel.SelectionLength = 0;
_viewModel.HeightRequest = -1;
await Navigation.PushAsync(new EditorOptionsPage(_viewModel));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,17 @@ private void FontAttributes_CheckedChanged(object sender, CheckedChangedEventArg
_viewModel.FontAttributes = FontAttributes.Italic;
}
}

private void AutoSize_CheckedChanged(object sender, CheckedChangedEventArgs e)
{
if(AutoSizeTextChanges.IsChecked)
if (AutoSizeTextChanges.IsChecked)
{
_viewModel.HeightRequest = -1;
_viewModel.AutoSizeOption = EditorAutoSizeOption.TextChanges;
}
else if(AutoSizeDisabled.IsChecked)
else if (AutoSizeDisabled.IsChecked)
{
_viewModel.HeightRequest = -1;
_viewModel.AutoSizeOption = EditorAutoSizeOption.Disabled;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ public void VerifyEditorTextWhenReturnTypeSet()
App.Tap("Apply");
App.WaitForElement("TestEditor");
App.Tap("TestEditor");
VerifyScreenshotWithKeyboardHandling();
VerifyScreenshot();
}

#endif
Expand Down Expand Up @@ -606,29 +606,29 @@ public void VerifyEditorTextWhenTextTransFormSet()
}

[Test]
public void VerifyEditorTextWhenAutoSizeTextChangesSet()
public void VerifyzEditorTextWhenAutoSizeTextChangesSet()
{
App.WaitForElement("Options");
App.Tap("Options");
App.WaitForElement("AutoSizeTextChanges");
App.Tap("AutoSizeTextChanges");
App.WaitForElement("TextEntryChanged");
App.ClearText("TextEntryChanged");
App.EnterText("TextEntryChanged", "An Editor can be made to auto-size to its content by setting the Editor.AutoSize property to TextChanges");
App.EnterText("TextEntryChanged", "When auto-resizing is enabled, the height of the Editor will increase when the user fills it with text, and the height will decrease as the user deletes text. This can be used to ensure that Editor objects in a DataTemplate.");
App.WaitForElement("Apply");
App.Tap("Apply");
App.WaitForElement("TestEditor");
VerifyScreenshotWithKeyboardHandling();
}

[Test]
public void VerifyEditorTextWhenAutoSizeDisabled()
public void VerifyzEditorTextWhenAutoSizeDisabled()
{
App.WaitForElement("Options");
App.Tap("Options");
App.WaitForElement("TextEntryChanged");
App.ClearText("TextEntryChanged");
App.EnterText("TextEntryChanged", "Disabled indicates that automatic resizing is disabled, and is the default value");
App.EnterText("TextEntryChanged", "When auto-resizing is enabled, the height of the Editor will increase when the user fills it with text, and the height will decrease as the user deletes text. This can be used to ensure that Editor objects in a DataTemplate.");
App.WaitForElement("Apply");
App.Tap("Apply");
App.WaitForElement("TestEditor");
Expand Down Expand Up @@ -782,14 +782,15 @@ public void VerifyEditorPlaceholderWithFontAttributes()
VerifyScreenshot(cropBottom: CropBottomValue);
}

#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST //related issue link: https://github.com/dotnet/maui/issues/30571
[Test]
public void VerifyEditorPlaceholderWithAutoSizeDiabled()
public void VerifyzEditorPlaceholderWithAutoSizeDiabled()
{
App.WaitForElement("Options");
App.Tap("Options");
App.WaitForElement("PlaceholderText");
App.ClearText("PlaceholderText");
App.EnterText("PlaceholderText", "Disabled indicates that automatic resizing is disabled, and is the default value");
App.EnterText("PlaceholderText", "When auto-resizing is enabled, the height of the Editor will increase when the user fills it with text, and the height will decrease as the user deletes text. This can be used to ensure that Editor objects in a DataTemplate.");
App.WaitForElement("TextEntryChanged");
App.ClearText("TextEntryChanged");
App.WaitForElement("Apply");
Expand All @@ -799,22 +800,23 @@ public void VerifyEditorPlaceholderWithAutoSizeDiabled()
}

[Test]
public void VerifyEditorPlaceholderWithAutoSizeTextChanges()
public void VerifyzEditorPlaceholderWithAutoSizeTextChanges()
{
App.WaitForElement("Options");
App.Tap("Options");
App.WaitForElement("AutoSizeTextChanges");
App.Tap("AutoSizeTextChanges");
App.WaitForElement("PlaceholderText");
App.ClearText("PlaceholderText");
App.EnterText("PlaceholderText", "An Editor can be made to auto-size to its content by setting the Editor.AutoSize property to TextChanges");
App.EnterText("PlaceholderText", "When auto-resizing is enabled, the height of the Editor will increase when the user fills it with text, and the height will decrease as the user deletes text. This can be used to ensure that Editor objects in a DataTemplate.");
App.WaitForElement("TextEntryChanged");
App.ClearText("TextEntryChanged");
App.WaitForElement("Apply");
App.Tap("Apply");
App.WaitForElement("TestEditor");
VerifyScreenshot(cropBottom: CropBottomValue);
}
#endif

/// <summary>
/// Helper method to handle keyboard visibility and take a screenshot with appropriate cropping
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.