add Carte Blanche trinket: equip system, gatekeeper multi-slot, mini tooltip portal; new token type Token.CARTE ('carte') with fa-money-check icon; migrations 0010-0012:
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
CARTE type, User.equipped_trinket FK, Token.slots_claimed field; post_save signal sets equipped_trinket=COIN for new users, PASS for staff; kit bag now shows only the equipped trinket in Trinkets section; Game Kit applet mini tooltip portal shows Equipped or Equip Trinket per token; AJAX POST equip-trinket id updates equippedId in-place; equip btn now works for COIN, PASS, and CARTE (data-token-id added to all three); Gatekeeper CARTE flow: drop_token sets current_room (no slot reserved); each empty slot up to slots_claimed+1 gets a drop-token-btn; slots_claimed high-water mark advances on fill, never decrements; highest CARTE-filled slot gets NVM (release_slot); token_return_btn resets current_room + slots_claimed + un-fills all CARTE slots; gate_status always returns full template so launch-game-btn persists via HTMX when gate_status == OPEN; room.html includes gatekeeper when GATHERING or OPEN; new FT test_trinket_carte_blanche.py (2 tests, both passing); 299 tests green
This commit is contained in:
@@ -55,3 +55,21 @@ class PassTokenTooltipTest(SimpleTestCase):
|
||||
def test_tooltip_contains_no_expiry(self):
|
||||
self.assertIn("no expiry", self.token.tooltip_text())
|
||||
|
||||
|
||||
class CarteTooltipTest(SimpleTestCase):
|
||||
def setUp(self):
|
||||
self.token = Token()
|
||||
self.token.token_type = Token.CARTE
|
||||
self.token.expires_at = None
|
||||
|
||||
def test_tooltip_contains_name(self):
|
||||
self.assertIn("Carte Blanche", self.token.tooltip_text())
|
||||
|
||||
def test_tooltip_contains_entry(self):
|
||||
self.assertIn("Admit up to +6", self.token.tooltip_text())
|
||||
|
||||
def test_tooltip_contains_shoptalk(self):
|
||||
self.assertIn("taking over from here", self.token.tooltip_text())
|
||||
|
||||
def test_tooltip_contains_no_expiry(self):
|
||||
self.assertIn("no expiry", self.token.tooltip_text())
|
||||
|
||||
Reference in New Issue
Block a user