Skip to content

Commit

Permalink
chore: Fix TextBox_TextProperty_Validation for header focus
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Jul 10, 2024
1 parent 6f512af commit f074522
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@ public void TextBox_TextProperty_Validation()
Run("Uno.UI.Samples.Content.UITests.TextBoxControl.TextBox_TextProperty");

var textBox1 = _app.Marked("TextBox1");
var textBoxInner1 = textBox1.Descendant("ScrollContentPresenter");
var textBox2 = _app.Marked("TextBox2");
var textBoxInner2 = textBox2.Descendant("ScrollContentPresenter");
var textChangedTextBlock = _app.Marked("TextChangedTextBlock");
var lostFocusTextBlock = _app.Marked("LostFocusTextBlock");

Expand All @@ -489,14 +491,14 @@ public void TextBox_TextProperty_Validation()
Assert.AreEqual("", lostFocusTextBlock.GetDependencyPropertyValue("Text")?.ToString());

// Change text and verify text of text blocks
textBox1.FastTap();
textBox1.ClearText();
textBox1.EnterText("Testing text property");
textBoxInner1.FastTap();
textBoxInner1.ClearText();
textBoxInner1.EnterText("Testing text property");
_app.WaitForText(textChangedTextBlock, "Testing text property");
_app.WaitForText(lostFocusTextBlock, "");

// change focus and assert
textBox2.FastTap();
textBoxInner2.FastTap();
_app.WaitForText(textChangedTextBlock, "Testing text property");
_app.WaitForText(lostFocusTextBlock, "Testing text property");
}
Expand Down

0 comments on commit f074522

Please sign in to comment.