in role-select.js, selectRole() runs in more precise ordering to ensure card hand for role selection passes to the next gamer after a selection is made; previous bug allowed multiple cards at a single gamer position, which prevented the card hand from making a circuit around the table before depletion; backend fixes including to apps.epic.views.select_role; +2 FTs & +1 IT asserts these features
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Disco DeDisco
2026-03-21 14:33:06 -04:00
parent 91e0eaad8e
commit f5c2cf4636
4 changed files with 120 additions and 10 deletions

View File

@@ -628,6 +628,24 @@ class SelectRoleViewTest(TestCase):
response, reverse("epic:gatekeeper", args=[self.room.id])
)
def test_same_gamer_cannot_double_pick_sequentially(self):
"""A second POST from the active gamer — after their role has been
saved — must redirect rather than assign a second role."""
self.client.post(
reverse("epic:select_role", kwargs={"room_id": self.room.id}),
data={"role": "PC"},
)
response = self.client.post(
reverse("epic:select_role", kwargs={"room_id": self.room.id}),
data={"role": "BC"},
)
self.assertRedirects(
response, reverse("epic:gatekeeper", args=[self.room.id])
)
self.assertEqual(
TableSeat.objects.filter(room=self.room, role__isnull=False).count(), 1
)
class RevealPhaseRenderingTest(TestCase):
def setUp(self):