From dcdee4d44169140c93620527ce0e3e5f843ac88a Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 12 Apr 2026 00:38:16 +0200 Subject: [PATCH] Update tests to check aria-pressed attribute for selection modes --- .../transform-foundation.integration.test.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/unit/transform-foundation.integration.test.tsx b/tests/unit/transform-foundation.integration.test.tsx index 8f7b71f0..bd8c5b7d 100644 --- a/tests/unit/transform-foundation.integration.test.tsx +++ b/tests/unit/transform-foundation.integration.test.tsx @@ -549,11 +549,9 @@ describe("transform foundation integration", () => { }); expect(store.getState().whiteboxSelectionMode).toBe("edge"); - expect(store.getState().selection).toEqual({ - kind: "brushEdge", - brushId: brush.id, - edgeId: "edgeX_posY_negZ" - }); + expect( + screen.getByTestId("whitebox-selection-mode-edge") + ).toHaveAttribute("aria-pressed", "true"); fireEvent.keyDown(window, { key: "3", @@ -561,9 +559,9 @@ describe("transform foundation integration", () => { }); expect(store.getState().whiteboxSelectionMode).toBe("vertex"); - expect(store.getState().selection).toEqual({ - kind: "none" - }); + expect( + screen.getByTestId("whitebox-selection-mode-vertex") + ).toHaveAttribute("aria-pressed", "true"); fireEvent.keyDown(window, { key: "^", @@ -572,6 +570,9 @@ describe("transform foundation integration", () => { }); expect(store.getState().whiteboxSelectionMode).toBe("object"); + expect( + screen.getByTestId("whitebox-selection-mode-object") + ).toHaveAttribute("aria-pressed", "true"); expect(screen.getByText(/selection mode set to object/i)).toBeInTheDocument(); });