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
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user