Skip to content

Commit

Permalink
test: fix a flakiness in menu tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezamirian committed Oct 3, 2023
1 parent 792953a commit aadcfea
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/jui/src/Menu/Menu.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -734,9 +734,11 @@ describe("ContextMenu", () => {
// to viewport.
cy.mount(<ContextMenu />);
cy.scrollTo("bottom", { duration: 0 });
cy.get("#context-menu-container").rightclick("bottomRight", {
scrollBehavior: false,
});
cy.get("#context-menu-container")
.realMouseMove(0, 0) // this fixes a flakiness in screenshots, which depends on whether other test cases are run before this
.rightclick("bottomRight", {
scrollBehavior: false,
});
matchImageSnapshot("context-menu-opened");
});

Expand Down

0 comments on commit aadcfea

Please sign in to comment.