fix(book): shorten gear summary labels
Release / release (push) Successful in 9m45s

This commit is contained in:
dmg committed 2026-09-21 11:49:45 -04:00
1 parent 91412fa1ae
commit 8b5461753c
4 files changed
+7 -5

No files matched your search

@@ -327,8 +327,9 @@ class CharacterBookNativeTest {
assertTrue(pages.size() <= 100, "Keep each native linked-book view bounded");
assertTrue(pages.get(0).getString().contains("STR: 0 [+1 STR]"));
assertTrue(pages.get(0).getString().contains("INT: 12 [+1 INT]"));
assertTrue(pages.get(1).getString().startsWith("Current gear"));
assertTrue(pages.get(1).getString().contains("Head: Cosmetic"));
assertTrue(pages.get(1).getString().startsWith("Gear\n\nHead: Cosmetic\nChestplate:"));
assertFalse(pages.get(1).getString().contains("Current gear"));
assertFalse(pages.get(1).getString().contains("Cosmetic\nonly"));
assertTrue(pages.get(2).getString().startsWith("Active abilities"));
assertTrue(pages.get(2).getString().contains("3: No Ability"));
int index = firstPageStarting(pages, "Ability index");
@@ -100,8 +100,9 @@ class TailBooksNativeTest {
for (String expected : List.of("Tail of Ari", "Level: 2", "XP: 100", "Unspent points: 30", "Coins: 123",
"STR: 0", "DEX: 0", "CON: 10", "INT: 0", "WIS: 0", "CHR: 0")) assertTrue(summary.contains(expected), expected);
String complete = String.join("", pages).replace("\n", "");
for (String expected : List.of("Current gear", "Head: Cosmetic only", "Chestplate: Diamond", "Leggings: Gold", "Boots: Leather"))
for (String expected : List.of("GearHead: Cosmetic", "Chestplate: Diamond", "Leggings: Gold", "Boots: Leather"))
assertTrue(complete.contains(expected), expected);
assertFalse(complete.contains("Current gear")); assertFalse(complete.contains("Cosmetic only"));
String wind = pages.stream().map(p -> p.replace("\n", "")).filter(p -> p.contains("Ability: second_wind")).findFirst().orElseThrow();
assertTrue(wind.contains("Slots: 1, 3")); assertTrue(wind.contains(expiry.toString()));
assertFalse(wind.contains("unknown:雪"), "Each learned ability starts its own page/section");