diff --git a/src/apps/epic/static/apps/epic/sig-select.js b/src/apps/epic/static/apps/epic/sig-select.js index 999825e..320c76d 100644 --- a/src/apps/epic/static/apps/epic/sig-select.js +++ b/src/apps/epic/static/apps/epic/sig-select.js @@ -258,7 +258,7 @@ var SigSelect = (function () { } // ── Test API ────────────────────────────────────────────────────────── - window.SigSelect = { + return { _testInit: function () { _focusedCardEl = null; _reservedCardId = null; diff --git a/src/static/tests/SigSelectSpec.js b/src/static/tests/SigSelectSpec.js index 1eb928f..1b149f0 100644 --- a/src/static/tests/SigSelectSpec.js +++ b/src/static/tests/SigSelectSpec.js @@ -110,7 +110,10 @@ describe("SigSelect", () => { // ── Touch: OK btn tap allows synthetic click through ──────────────── // describe("touch on OK button", () => { - beforeEach(() => makeFixture()); + beforeEach(() => { + if (typeof TouchEvent === 'undefined') { pending('TouchEvent unavailable in desktop Firefox'); return; } + makeFixture(); + }); it("touchstart on OK btn does not call preventDefault (allows synthetic click)", () => { // First tap the card body to show OK @@ -142,7 +145,10 @@ describe("SigSelect", () => { // ── Touch outside grid dismisses stage (mobile) ───────────────────── // describe("touch outside grid", () => { - beforeEach(() => makeFixture()); + beforeEach(() => { + if (typeof TouchEvent === 'undefined') { pending('TouchEvent unavailable in desktop Firefox'); return; } + makeFixture(); + }); it("dismisses stage preview when touching outside the grid (unfocused state)", () => { // Focus a card first @@ -195,6 +201,7 @@ describe("SigSelect", () => { }); it("does not call preventDefault on touchstart while a card is reserved", () => { + if (typeof TouchEvent === 'undefined') { pending('TouchEvent unavailable in desktop Firefox'); return; } SigSelect._setReservedCardId("99"); var touchEvent = new TouchEvent("touchstart", { bubbles: true, diff --git a/src/static_src/tests/SigSelectSpec.js b/src/static_src/tests/SigSelectSpec.js index 1eb928f..1b149f0 100644 --- a/src/static_src/tests/SigSelectSpec.js +++ b/src/static_src/tests/SigSelectSpec.js @@ -110,7 +110,10 @@ describe("SigSelect", () => { // ── Touch: OK btn tap allows synthetic click through ──────────────── // describe("touch on OK button", () => { - beforeEach(() => makeFixture()); + beforeEach(() => { + if (typeof TouchEvent === 'undefined') { pending('TouchEvent unavailable in desktop Firefox'); return; } + makeFixture(); + }); it("touchstart on OK btn does not call preventDefault (allows synthetic click)", () => { // First tap the card body to show OK @@ -142,7 +145,10 @@ describe("SigSelect", () => { // ── Touch outside grid dismisses stage (mobile) ───────────────────── // describe("touch outside grid", () => { - beforeEach(() => makeFixture()); + beforeEach(() => { + if (typeof TouchEvent === 'undefined') { pending('TouchEvent unavailable in desktop Firefox'); return; } + makeFixture(); + }); it("dismisses stage preview when touching outside the grid (unfocused state)", () => { // Focus a card first @@ -195,6 +201,7 @@ describe("SigSelect", () => { }); it("does not call preventDefault on touchstart while a card is reserved", () => { + if (typeof TouchEvent === 'undefined') { pending('TouchEvent unavailable in desktop Firefox'); return; } SigSelect._setReservedCardId("99"); var touchEvent = new TouchEvent("touchstart", { bubbles: true,