Unify team grid, limit avatars to brand colours, keep duty tags on one line
This commit is contained in:
1 parent
a5a68ed122
commit
602f258257
4 files changed
+72
-72
No files matched your search
@@ -28,13 +28,28 @@ public class TeamMemberTests
|
||||
// Pinned values: the colour must not change between restarts or releases, so a
|
||||
// change to the hash shows up here instead of recolouring the board.
|
||||
TeamMember.ColorOf("Maik Palm").ShouldBe(TeamMember.ColorOf(" Maik Palm "));
|
||||
TeamMember.ColorOf("Maik Palm").ShouldBe(4);
|
||||
TeamMember.ColorOf("Gentiana Erol").ShouldBe(5);
|
||||
TeamMember.ColorOf("Maik Palm").ShouldBe(2);
|
||||
TeamMember.ColorOf("Gentiana Erol").ShouldBe(2);
|
||||
TeamMember.ColorOf("Raul Chira").ShouldBe(1);
|
||||
|
||||
new[] { "Maik Palm", "Gentiana Erol", "Raul Chira", "Marion Leininger", "Isabell Vesper", "" }
|
||||
.ShouldAllBe(name => TeamMember.ColorOf(name) >= 1 && TeamMember.ColorOf(name) <= TeamMember.ColorCount);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Board_uses_both_colours_about_evenly()
|
||||
{
|
||||
// Two colours only make sense if both show up; the real board (ten names)
|
||||
// must not land mostly on one.
|
||||
string[] board =
|
||||
[
|
||||
"Maik Palm", "Gentiana Erol", "Raul Chira", "Marion Leininger", "Jenny Reger-Stilgenbauer",
|
||||
"Mariella Ianello", "Isabell Vesper", "Susanne Naumburg", "Rebecca Goldmann", "Michael Weber",
|
||||
];
|
||||
|
||||
board.Count(name => TeamMember.ColorOf(name) == 1).ShouldBeInRange(4, 6);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Item_with_role_duties_and_note_is_read_in_full()
|
||||
{
|
||||
@@ -101,7 +116,7 @@ public class TeamMemberTests
|
||||
|
||||
html.ShouldContain("<div class=\"team\">");
|
||||
html.ShouldContain($"<li class=\"{TeamMember.CardClass}\">");
|
||||
html.ShouldContain("<span class=\"team-avatar team-avatar-4\" aria-hidden=\"true\">MP</span>");
|
||||
html.ShouldContain("<span class=\"team-avatar team-avatar-2\" aria-hidden=\"true\">MP</span>");
|
||||
html.ShouldContain("<strong class=\"team-name\">Maik Palm</strong>");
|
||||
html.ShouldContain("<span class=\"team-role\">Vorsitzender</span>");
|
||||
html.ShouldContain("<span class=\"team-duty\">Schulkonferenz</span>");
|
||||
@@ -138,7 +153,7 @@ public class TeamMemberTests
|
||||
[Fact]
|
||||
public void Mistyped_modifier_keeps_the_grid()
|
||||
{
|
||||
// A typo in the modifier costs the larger size, not the cards.
|
||||
// A typo in the modifier costs the highlight, not the cards.
|
||||
var html = Markdown.ToHtml("::: team grss\n- **Maik Palm**\n:::");
|
||||
|
||||
html.ShouldContain("<div class=\"team\">");
|
||||
|
||||
Reference in new issue
Block a user