Fixes #4080. TabGroup not always navigate correctly across groups (#4085)

* 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:
BDisp
2025-06-04 19:41:03 +01:00
committed by GitHub
parent 8fef16d35f
commit 4f707c453d
6 changed files with 173 additions and 36 deletions

View File

@@ -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 ()
{