game kit + role icons + tarot fan: in-use mini-portal label, FLIP cue polarity reset, role icon redraws
Heterogeneous pre-existing changes (carried across multiple sessions, finally committed alongside the SIG SELECT exit sprint). Grouped: - gameboard.js: _inUseLabel(roomName) — buildMiniContent renders "In-Use: <name>" on hover (cap 24 chars; overflow → 21 + "…"). Reads token.dataset.inUseRoomName for decks & token.dataset.currentRoomName for trinkets. - _applet-game-kit.html: removes the inline <p class="tt-token-room-name"> + <p class="tt-deck-game-name"> paragraphs (now redundant — mini-portal carries the name); deck token gains data-in-use-room-name attr. - gameboard tests: assertions retargeted at data-in-use-room-name + the mini-portal flow rather than the deleted inline paragraphs (test_views, test_deck_contribution, test_trinket_carte_blanche). - game-kit.js: openFan + _testOpen reset _polarity = 'levity' so reopening the fan after FLIP-to-gravity always lands on the levity-painted face (the FLIP cue). The sessionStorage bookmark intentionally tracks card index only; polarity does NOT persist across reopen. - _tarot_fan.html: SSR-default polarity flipped from levity to gravity (levity_emanation → gravity_emanation, levity_qualifier → gravity_qualifier, levity_reversal → gravity_reversal across upright + reversal faces). Pairs w. the JS polarity reset above so JS repaints to levity on open. - FanStageSpec: 2 new specs — openFan polarity reset on reopen even after FLIP-to-gravity; sessionStorage stores no levity/gravity string. - starter-role-*.svg (Alchemist, Builder, Economist, Narrator, Player, Shepherd): redrawn / re-cropped art — viewBox tightened from 288×560 to ~154×156, paths re-traced. No new role added; existing 6 swapped in place. New starter-role-blank.svg added as fallback for unmapped role codes (referenced by tray.js _ROLE_SCRAWL default → 'Blank'). Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -111,15 +111,11 @@ class DeckContributionTest(FunctionalTest):
|
||||
earthman_card = self.wait_for(
|
||||
lambda: self.browser.find_element(By.CSS_SELECTOR, "#id_kit_earthman_deck")
|
||||
)
|
||||
earthman_card.click() # open tooltip
|
||||
|
||||
# Tooltip shows the game name (CSS-hidden; read textContent not .text)
|
||||
tooltip = self.wait_for(
|
||||
lambda: self.browser.find_element(By.CSS_SELECTOR, ".tt-deck-game-name")
|
||||
# Game name lives on data-in-use-room-name; the mini-portal renders it as
|
||||
# "In-Use: <name>" on hover (Jasmine covers the JS truncation).
|
||||
self.assertEqual(
|
||||
room.name, earthman_card.get_attribute("data-in-use-room-name")
|
||||
)
|
||||
self.assertIn(room.name.upper(), tooltip.get_attribute("textContent").upper())
|
||||
|
||||
# Mini-tooltip portal shows "In-Use" on hover — covered by gameboard.js Jasmine tests
|
||||
|
||||
|
||||
# ── Sprint 2 ─────────────────────────────────────────────────────────────────
|
||||
@@ -173,18 +169,16 @@ class DeckInUseGameKitTest(FunctionalTest):
|
||||
self.assertIn("btn-disabled", doff_btn.get_attribute("class"),
|
||||
"DOFF should be present but disabled for an in-use deck")
|
||||
|
||||
def test_tooltip_names_the_game_for_in_use_deck(self):
|
||||
"""Opening an in-use deck's tooltip shows the room name it is contributing to."""
|
||||
def test_in_use_deck_carries_game_name_for_mini_portal(self):
|
||||
"""The in-use deck token exposes the room name via data-in-use-room-name
|
||||
so the mini-portal can render it as 'In-Use: <name>' on hover."""
|
||||
gamer, earthman, room, seat = self._setup_in_use_deck()
|
||||
self.create_pre_authenticated_session(GAMER_EMAIL)
|
||||
self.browser.get(self.live_server_url + "/gameboard/")
|
||||
self.wait_for(
|
||||
deck_el = self.wait_for(
|
||||
lambda: self.browser.find_element(By.CSS_SELECTOR, "#id_kit_earthman_deck")
|
||||
).click()
|
||||
game_label = self.wait_for(
|
||||
lambda: self.browser.find_element(By.CSS_SELECTOR, ".tt-deck-game-name")
|
||||
)
|
||||
self.assertIn(room.name.upper(), game_label.get_attribute("textContent").upper())
|
||||
self.assertEqual(room.name, deck_el.get_attribute("data-in-use-room-name"))
|
||||
|
||||
def test_non_contributing_deck_has_normal_don_doff(self):
|
||||
"""A deck not assigned to any active seat shows the normal DON/DOFF apparatus."""
|
||||
|
||||
@@ -332,8 +332,9 @@ class CarteBlancheTest(FunctionalTest):
|
||||
)
|
||||
|
||||
def test_carte_in_use_game_kit_shows_room_attribution(self):
|
||||
"""While Carte Blanche is deposited in a room, its Game Kit tooltip
|
||||
shows 'In game: <room name>' so the gamer knows where it's committed."""
|
||||
"""While Carte Blanche is deposited in a room, its Game Kit token carries
|
||||
the room name on data-current-room-name so the mini-portal can render
|
||||
'In-Use: <room name>' on hover."""
|
||||
self.create_pre_authenticated_session("blanche@test.io")
|
||||
self.browser.get(self.live_server_url + "/gameboard/")
|
||||
self.wait_for(lambda: self.browser.find_element(By.ID, "id_game_kit"))
|
||||
@@ -374,12 +375,12 @@ class CarteBlancheTest(FunctionalTest):
|
||||
lambda: self.browser.find_element(By.CSS_SELECTOR, ".token-slot.claimed")
|
||||
)
|
||||
|
||||
# Game Kit panel is on /gameboard/, not the gate page — navigate back to check tooltip
|
||||
# Game Kit panel is on /gameboard/, not the gate page — navigate back to check token
|
||||
self.browser.get(self.live_server_url + "/gameboard/")
|
||||
carte_tt = self.wait_for(
|
||||
lambda: self.browser.find_element(By.CSS_SELECTOR, "#id_kit_carte_blanche .tt")
|
||||
carte_el = self.wait_for(
|
||||
lambda: self.browser.find_element(By.CSS_SELECTOR, "#id_kit_carte_blanche")
|
||||
)
|
||||
self.assertIn(
|
||||
self.assertEqual(
|
||||
"Commitment Room",
|
||||
carte_tt.get_attribute("textContent"),
|
||||
carte_el.get_attribute("data-current-room-name"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user