Skip to content

Commit 0c42e3e

Browse files
committed
Add failing (disabled) e2e test
1 parent 5c13ebd commit 0c42e3e

2 files changed

Lines changed: 36 additions & 2 deletions

File tree

integrations/tests/src/components/Separator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export function Separator({
1717
<SeparatorExternal
1818
className={cn(
1919
"min-h-2 min-w-2 shrink-0 rounded rounded-xs overflow-hidden",
20-
"bg-slate-600 [&[data-separator='hover']]:bg-slate-500 [&[data-separator='active']]:bg-slate-400",
20+
"bg-slate-600 [&[data-separator='hover']]:bg-slate-500 [&[data-separator='active']]:bg-slate-300",
2121
"text-slate-900 [&[data-separator='hover']]:text-slate-950 [&[data-separator='active']]:text-slate-950",
22-
"focus:bg-slate-400",
22+
"focus:outline-none",
2323
className
2424
)}
2525
{...rest}

integrations/tests/tests/pointer-interactions.spec.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,40 @@ test.describe("pointer interactions", () => {
535535
await expect(separator).toHaveAttribute("data-separator", "inactive");
536536
});
537537

538+
// See github.com/bvaughn/react-resizable-panels/issues/688
539+
test.skip("should update separator state when the cursor is released while over an iframe", async ({
540+
page: mainPage
541+
}) => {
542+
const page = await goToUrl(
543+
mainPage,
544+
<Group className="gap-0!">
545+
<Panel className="p-0! *:p-0!" id="left" minSize="25%">
546+
<IFrame className="w-full h-full bg-red-300" />
547+
</Panel>
548+
<Separator id="separator" />
549+
<Panel className="p-0! *:p-0!" id="right" />
550+
</Group>
551+
);
552+
553+
const separator = page.getByTestId("separator");
554+
555+
const { x, y } = getCenterCoordinates((await separator.boundingBox())!);
556+
557+
await expect(separator).toHaveAttribute("data-separator", "inactive");
558+
559+
await page.mouse.move(x, y);
560+
await expect(separator).toHaveAttribute("data-separator", "hover");
561+
562+
await page.mouse.down();
563+
await expect(separator).toHaveAttribute("data-separator", "active");
564+
565+
await page.mouse.move(x - 25, y);
566+
await expect(separator).toHaveAttribute("data-separator", "active");
567+
568+
await page.mouse.up();
569+
await expect(separator).toHaveAttribute("data-separator", "inactive");
570+
});
571+
538572
test("should not prevent click events if no drag occurs", async ({
539573
page: mainPage
540574
}) => {

0 commit comments

Comments
 (0)