Add live skill filtering and align tests with current campaign behavior

This commit is contained in:
2026-02-26 15:37:17 +01:00
parent 59fe453297
commit ba8141b336
8 changed files with 119 additions and 75 deletions

View File

@@ -46,15 +46,17 @@ public sealed class ServiceSkillGroupAndOwnershipTests
Assert.True(deletedGroup);
var afterGroupDelete = ServiceTestSupport.GetValue(service.GetCampaign(ownerSession, campaign.Id));
Assert.Empty(afterGroupDelete.SkillGroups);
Assert.DoesNotContain(afterGroupDelete.SkillGroups, group => group.Id == renamedGroup.Id);
Assert.Contains(afterGroupDelete.SkillGroups, group => group.Id == otherGroup.Id);
Assert.Null(afterGroupDelete.Skills.Single(s => s.Id == regroupedSkill.Id).SkillGroupId);
var deletedSkill = ServiceTestSupport.GetValue(service.DeleteSkill(ownerSession, regroupedSkill.Id));
Assert.True(deletedSkill);
var ownerView = ServiceTestSupport.GetValue(service.GetCampaign(ownerSession, campaign.Id));
Assert.Empty(ownerView.SkillGroups);
Assert.Empty(ownerView.Skills);
Assert.DoesNotContain(ownerView.SkillGroups, group => group.Id == renamedGroup.Id);
Assert.Contains(ownerView.SkillGroups, group => group.Id == otherGroup.Id);
Assert.DoesNotContain(ownerView.Skills, skillSummary => skillSummary.Id == regroupedSkill.Id);
}
[Fact]