Simplify filters and make cross control slots not show by default (#782)

* Simplify filters and make cross control slots not show by default
Also sort author levels by oldest levels first rather than newest levels first.

* Fix unit test expecting slots to sorted by timestamp descending

* Remove errant whitespace
This commit is contained in:
Josh 2023-06-05 17:53:41 -05:00 committed by GitHub
parent 2a85b6a136
commit a69d94054b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 114 additions and 58 deletions

View file

@ -208,6 +208,34 @@ public class FilterTests
Assert.True(adventureFunc(slot));
}
[Fact]
public void ExcludeCrossControlFilter_ShouldAccept_WhenNotCrossControl()
{
ExcludeCrossControlFilter crossControlFilter = new();
Func<SlotEntity, bool> crossControlFunc = crossControlFilter.GetPredicate().Compile();
SlotEntity slot = new()
{
CrossControllerRequired = false,
};
Assert.True(crossControlFunc(slot));
}
[Fact]
public void ExcludeCrossControlFilter_ShouldReject_WhenCrossControl()
{
ExcludeCrossControlFilter crossControlFilter = new();
Func<SlotEntity, bool> crossControlFunc = crossControlFilter.GetPredicate().Compile();
SlotEntity slot = new()
{
CrossControllerRequired = true,
};
Assert.False(crossControlFunc(slot));
}
[Fact]
public void ExcludeLBP1OnlyFilter_ShouldReject_WhenLbp1Only_AndTokenNotLbp1_AndNotCreator()
{