Pin skills to the top of the sidebar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fb237cb686
commit
be478f3b2e
5 changed files with 55 additions and 4 deletions
|
|
@ -1496,6 +1496,24 @@ class FittingTest(unittest.TestCase):
|
|||
self.assertEqual(world["city"]["buildings"]["houses"]["fittings"], [])
|
||||
|
||||
|
||||
class PinTest(unittest.TestCase):
|
||||
def test_pin_toggles(self):
|
||||
world = world_with(("fred", "commoner"))
|
||||
p = world["players"]["fred"]
|
||||
self.assertIsNone(game.toggle_pin(p, "mining"))
|
||||
self.assertEqual(p["pinned"], ["mining"])
|
||||
self.assertIsNone(game.toggle_pin(p, "mining"))
|
||||
self.assertEqual(p["pinned"], [])
|
||||
self.assertIsNotNone(game.toggle_pin(p, "juggling"))
|
||||
|
||||
def test_old_players_get_pins(self):
|
||||
world = world_with(("fred", "commoner"))
|
||||
del world["players"]["fred"]["pinned"]
|
||||
world["version"] = 18
|
||||
game.migrate(world, T0)
|
||||
self.assertEqual(world["players"]["fred"]["pinned"], [])
|
||||
|
||||
|
||||
class IconTest(unittest.TestCase):
|
||||
def test_everything_has_a_glyph_in_the_sprite(self):
|
||||
sprite = (Path(__file__).resolve().parent.parent / "static" / "icons.svg").read_text()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue