mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Fixes #4080. TabGroup not always navigate correctly across groups * Remove duplicated code * Improves code by removing duplicate code * Made requested changes * Change to Theory unit test * Cleanup to run git actions again * Trying fix racing fail unit tests --------- Co-authored-by: Tig <tig@users.noreply.github.com>
This commit is contained in:
@@ -118,6 +118,40 @@ public class SubViewTests
|
||||
Assert.Equal (new (5, 5), view.GetContentSize ());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData (ViewArrangement.Fixed)]
|
||||
[InlineData (ViewArrangement.Overlapped)]
|
||||
public void MoveSubViewToEnd_ViewArrangement (ViewArrangement arrangement)
|
||||
{
|
||||
View superView = new () { Arrangement = arrangement };
|
||||
|
||||
var subview1 = new View
|
||||
{
|
||||
Id = "subview1"
|
||||
};
|
||||
|
||||
var subview2 = new View
|
||||
{
|
||||
Id = "subview2"
|
||||
};
|
||||
|
||||
var subview3 = new View
|
||||
{
|
||||
Id = "subview3"
|
||||
};
|
||||
|
||||
superView.Add (subview1, subview2, subview3);
|
||||
|
||||
superView.MoveSubViewToEnd (subview1);
|
||||
Assert.Equal ([subview2, subview3, subview1], superView.SubViews.ToArray ());
|
||||
|
||||
superView.MoveSubViewToEnd (subview2);
|
||||
Assert.Equal ([subview3, subview1, subview2], superView.SubViews.ToArray ());
|
||||
|
||||
superView.MoveSubViewToEnd (subview3);
|
||||
Assert.Equal ([subview1, subview2, subview3], superView.SubViews.ToArray ());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MoveSubViewToStart ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user