'channels' tag now also moved to sequential FT group in pipeline; role-select.js ensures Tray.close() before turn advances so as not to obstruct next gamer selection; RoleSelectSpec.js asserrts this functionality
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Disco DeDisco
2026-03-29 22:08:59 -04:00
parent 73135df7a6
commit 29a5658b01
3 changed files with 12 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ steps:
- cd ./src
- python manage.py collectstatic --noinput
- python manage.py test functional_tests --tag=two-browser
- python manage.py test functional_tests --tag=channels
when:
- event: push
@@ -56,7 +57,6 @@ steps:
- cd ./src
- python manage.py collectstatic --noinput
- python manage.py test functional_tests --parallel --exclude-tag=channels --exclude-tag=two-browser
- python manage.py test functional_tests --tag=channels
when:
- event: push

View File

@@ -163,6 +163,9 @@ var RoleSelect = (function () {
var invSlot = document.getElementById("id_inv_role_card");
if (invSlot) invSlot.innerHTML = "";
// Close tray so it doesn't obscure the next player's card-stack
if (typeof Tray !== "undefined") Tray.close();
var stack = document.querySelector(".card-stack[data-user-slots]");
if (stack) {
// Sync starter-roles from server so the fan reflects actual DB state

View File

@@ -188,6 +188,14 @@ describe("RoleSelect", () => {
testDiv.appendChild(stack);
});
it("calls Tray.close() on turn change", () => {
spyOn(Tray, "close");
window.dispatchEvent(new CustomEvent("room:turn_changed", {
detail: { active_slot: 2 }
}));
expect(Tray.close).toHaveBeenCalled();
});
it("moves .active to the newly active seat", () => {
window.dispatchEvent(new CustomEvent("room:turn_changed", {
detail: { active_slot: 2 }