Skip to content

Commit 9e1c078

Browse files
committed
Updated tests for value provider changes
1 parent 4c40b33 commit 9e1c078

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Microsoft.Toolkit.Uwp.UI.Controls.Input/TokenizingTextBox/TokenizingTextBoxAutomationPeer.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ protected override object GetPatternCore(PatternInterface patternInterface)
9191
return patternInterface switch
9292
{
9393
PatternInterface.Value => this,
94-
PatternInterface.Selection => this,
9594
_ => base.GetPatternCore(patternInterface)
9695
};
9796
}

UnitTests/UnitTests.UWP/UI/Controls/Test_TokenizingTextBox_AutomationPeer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
2424
{
2525
const string expectedAutomationName = "MyAutomationName";
2626
const string expectedName = "MyName";
27+
const string expectedValue = "Wor";
2728

2829
var items = new ObservableCollection<TokenizingTextBoxTestItem> { new() { Title = "Hello" }, new() { Title = "World" } };
2930

@@ -43,6 +44,9 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
4344
// Asserts the automation peer name based on the element Name property.
4445
tokenizingTextBox.Name = expectedName;
4546
Assert.IsTrue(tokenizingTextBoxAutomationPeer.GetName().Contains(expectedName), "Verify that the UIA name contains the given Name of the TokenizingTextBox.");
47+
48+
tokenizingTextBox.Text = expectedValue;
49+
Assert.IsTrue(tokenizingTextBoxAutomationPeer.Value.Equals(expectedValue), "Verify that the Value contains the given Text of the TokenizingTextBox.");
4650
});
4751
}
4852

0 commit comments

Comments
 (0)