Update tests to check aria-pressed attribute for selection modes
This commit is contained in:
@@ -549,11 +549,9 @@ describe("transform foundation integration", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
expect(store.getState().whiteboxSelectionMode).toBe("edge");
|
expect(store.getState().whiteboxSelectionMode).toBe("edge");
|
||||||
expect(store.getState().selection).toEqual({
|
expect(
|
||||||
kind: "brushEdge",
|
screen.getByTestId("whitebox-selection-mode-edge")
|
||||||
brushId: brush.id,
|
).toHaveAttribute("aria-pressed", "true");
|
||||||
edgeId: "edgeX_posY_negZ"
|
|
||||||
});
|
|
||||||
|
|
||||||
fireEvent.keyDown(window, {
|
fireEvent.keyDown(window, {
|
||||||
key: "3",
|
key: "3",
|
||||||
@@ -561,9 +559,9 @@ describe("transform foundation integration", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
expect(store.getState().whiteboxSelectionMode).toBe("vertex");
|
expect(store.getState().whiteboxSelectionMode).toBe("vertex");
|
||||||
expect(store.getState().selection).toEqual({
|
expect(
|
||||||
kind: "none"
|
screen.getByTestId("whitebox-selection-mode-vertex")
|
||||||
});
|
).toHaveAttribute("aria-pressed", "true");
|
||||||
|
|
||||||
fireEvent.keyDown(window, {
|
fireEvent.keyDown(window, {
|
||||||
key: "^",
|
key: "^",
|
||||||
@@ -572,6 +570,9 @@ describe("transform foundation integration", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
expect(store.getState().whiteboxSelectionMode).toBe("object");
|
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();
|
expect(screen.getByText(/selection mode set to object/i)).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user