Skip to content

Commit 2e2e50a

Browse files
committed
test(web): remove permission spacing test
1 parent 7e6b6bd commit 2e2e50a

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

‎apps/web/src/components/chat/ComposerPermissionsSection.browser.test.tsx‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { type ReactNode, useRef, useState } from "react";
33
import { expect, it, vi } from "vite-plus/test";
44
import { page, userEvent } from "vite-plus/test/browser";
55

6-
import "../../index.css";
76
import { render } from "../../../test/render";
87
import { ComposerHandleContext, type ComposerHandleRef } from "../../composerHandleContext";
98
import { Menu, MenuPopup, MenuRadioGroup, MenuRadioItem, MenuTrigger } from "../ui/menu";
@@ -88,26 +87,6 @@ it("marks the current mode as checked and closes on Escape", async () => {
8887
await expect.element(screen.getByRole("button", { name: "Effort" })).toHaveFocus();
8988
});
9089

91-
it("keeps the space between permission options clickable", async () => {
92-
await using screen = await render(<EffortMenu />, { router: false });
93-
await userEvent.click(screen.getByRole("button", { name: "Effort" }));
94-
const items = options.map((option) =>
95-
page.getByRole("menuitemradio", { name: option.label }).element(),
96-
);
97-
98-
for (let i = 0; i < items.length - 1; i++) {
99-
const left = items[i]!;
100-
const right = items[i + 1]!;
101-
const leftRect = left.getBoundingClientRect();
102-
const rightRect = right.getBoundingClientRect();
103-
expect(rightRect.left - leftRect.right).toBeLessThanOrEqual(0);
104-
for (const y of [leftRect.top + 1, leftRect.top + leftRect.height / 2]) {
105-
expect(left.contains(document.elementFromPoint(leftRect.right - 1.5, y))).toBe(true);
106-
expect(right.contains(document.elementFromPoint(rightRect.left + 1.5, y))).toBe(true);
107-
}
108-
}
109-
});
110-
11190
// The real composer menu focus rule (useComposerMenuProps), with a stub composer handle.
11291
function withComposer(children: ReactNode) {
11392
const handle = { focusAtEnd: vi.fn() };

0 commit comments

Comments
 (0)