step 17 complete: game kit deck variant cards with hover-equip mini-tooltip; DeckVariant.short_key property for template ids; equip-deck view and url in gameboard; gameboard.js unified for decks and trinkets, portals now inline-display-controlled for FT compatibility; billboard scroll fix: pos captured at event time, rAF guard prevents spurious debounce reset on first visit; 3 new ITs for Earthman deck defaults, Fiorentine not auto-assigned; gameboard IT updated for deck variant cards [git log Co-Authored-By: Claude Sonnet 4.6]
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Disco DeDisco
2026-03-24 21:52:57 -04:00
parent 2896efa8e0
commit 15ac3216ff
8 changed files with 148 additions and 41 deletions

View File

@@ -220,14 +220,22 @@ class GameKitDeckSelectionTest(FunctionalTest):
"grid_rows": rows, "context": "gameboard",
},
)
# DeckVariant rows are flushed by TransactionTestCase — recreate before
# creating the user so the post_save signal can set equipped_deck = earthman.
self.earthman, _ = DeckVariant.objects.get_or_create(
slug="earthman",
defaults={"name": "Earthman Deck", "card_count": 108, "is_default": True},
)
self.fiorentine, _ = DeckVariant.objects.get_or_create(
slug="fiorentine-minchiate",
defaults={"name": "Fiorentine Minchiate", "card_count": 78, "is_default": False},
)
self.gamer = User.objects.create(email="gamer@deck.io")
# TODO: once DeckVariant model is defined —
# from apps.epic.models import DeckVariant
# self.earthman = DeckVariant.objects.get(slug="earthman")
# self.fiorentine = DeckVariant.objects.get(slug="fiorentine-minchiate")
# # Put gamer on Fiorentine so the test can show switching back to Earthman
# self.gamer.equipped_deck = self.fiorentine
# self.gamer.save(update_fields=["equipped_deck"])
# Signal sets equipped_deck = earthman (now it exists); put gamer on
# Fiorentine so the test can exercise switching back to Earthman.
self.gamer.refresh_from_db()
self.gamer.equipped_deck = self.fiorentine
self.gamer.save(update_fields=["equipped_deck"])
# ------------------------------------------------------------------ #
# Test 5 — Game Kit shows deck cards with correct equip/equipped state #