Skip to content

Commit

Permalink
test(Popup): try fixing list/tree sizing flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezamirian committed Mar 17, 2024
1 parent 17eb0ab commit 3b9d089
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions packages/jui/src/Popup/Popup.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ import { composeStories } from "@storybook/react";
import * as stories from "./Popup.stories";
import { Popup } from "./Popup";

const { Default, DefaultPosition, DefaultSize, MenuContent, ListContent } =
composeStories(stories);
const {
Default,
DefaultPosition,
DefaultSize,
MenuContent,
ListContent,
TreeContent,
} = composeStories(stories);

describe("Popup", () => {
describe("sizing and positioning", () => {
Expand All @@ -14,12 +20,12 @@ describe("Popup", () => {
matchImageSnapshot("Popup-default-bounds--simple");
cy.mount(<MenuContent />);
matchImageSnapshot("Popup-default-bounds--menu");
cy.mount(<ListContent />);
matchImageSnapshot("Popup-default-bounds--list");

// Tree uses virtualization, and sizing is flaky at the moment. FIXME
// cy.mount(<TreeContent />);
// matchImageSnapshot("Popup-default-bounds--tree");
// List and Tree use virtualization, and are not immediately sized in the first render
cy.mount(<ListContent />).wait(200);
matchImageSnapshot("Popup-default-bounds--list");
cy.mount(<TreeContent />).wait(200);
matchImageSnapshot("Popup-default-bounds--tree");
});

it("takes default position into account, while setting size based on content", () => {
Expand Down

0 comments on commit 3b9d089

Please sign in to comment.