mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Got all unit tests passing. Some AdvanceFocus stuff still not right.
This commit is contained in:
@@ -8557,4 +8557,67 @@ line.
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Autocomplete_Popup_Added_To_SuperView_On_Init ()
|
||||
{
|
||||
View superView = new ()
|
||||
{
|
||||
CanFocus = true,
|
||||
};
|
||||
|
||||
TextView t = new ();
|
||||
|
||||
superView.Add (t);
|
||||
Assert.Single (superView.Subviews);
|
||||
|
||||
superView.BeginInit ();
|
||||
superView.EndInit ();
|
||||
|
||||
Assert.Equal (2, superView.Subviews.Count);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void Autocomplete__Added_To_SuperView_On_Add ()
|
||||
{
|
||||
View superView = new ()
|
||||
{
|
||||
CanFocus = true,
|
||||
Id = "superView",
|
||||
};
|
||||
|
||||
superView.BeginInit ();
|
||||
superView.EndInit ();
|
||||
Assert.Empty (superView.Subviews);
|
||||
|
||||
TextView t = new ()
|
||||
{
|
||||
Id = "t"
|
||||
};
|
||||
|
||||
superView.Add (t);
|
||||
|
||||
Assert.Equal (2, superView.Subviews.Count);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void Autocomplete_Visible_False_By_Default ()
|
||||
{
|
||||
View superView = new ()
|
||||
{
|
||||
CanFocus = true,
|
||||
};
|
||||
|
||||
TextView t = new ();
|
||||
|
||||
superView.Add (t);
|
||||
superView.BeginInit ();
|
||||
superView.EndInit ();
|
||||
|
||||
Assert.Equal (2, superView.Subviews.Count);
|
||||
|
||||
Assert.True (t.Visible);
|
||||
Assert.False (t.Autocomplete.Visible);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user