Fix failing unit test

This commit is contained in:
tznind
2023-04-02 20:15:08 +01:00
parent 20f773d5df
commit 2b01a4c2b5

View File

@@ -22,7 +22,7 @@ namespace Terminal.Gui.Core {
public void DirectTyping_Allowed ()
{
var dlg = GetInitializedFileDialog ();
var tf = dlg.Subviews [0].Subviews.OfType<TextField> ().Single ();
var tf = dlg.Subviews [0].Subviews.OfType<TextField> ().First (t=>t.HasFocus);
tf.ClearAllSelection ();
tf.CursorPosition = tf.Text.Length;
Assert.True (tf.HasFocus);