Skip to content

Commit

Permalink
fixed the app title dropdown and it closes on interaction with other …
Browse files Browse the repository at this point in the history
…components
  • Loading branch information
saicharan-zemoso committed Sep 24, 2024
1 parent 9731728 commit 29c818a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import homePage from "../../../../locators/HomePage";
const omnibar = require("../../../../locators/Omnibar.json");

describe("application dropdown interaction test", () => {
it("application dropdown closes when interacting with omni bar using hotkeys", () => {
cy.get(homePage.applicationName).click();
cy.get(homePage.applicationEditMenu).should("be.visible");
cy.wait(1000);
cy.get("body").type("{ctrl}{k}");
cy.get(omnibar.categoryTitle).should("be.visible");
cy.get(homePage.applicationEditMenu).should("not.exist");
cy.get("body").type("{esc}");
cy.get(omnibar.categoryTitle).should("not.exist");
cy.get(homePage.applicationName).click();
cy.get(homePage.applicationEditMenu).should("be.visible");
cy.wait(1000);
cy.get("body").type("{ctrl}{p}");
cy.get(homePage.applicationEditMenu).should("not.exist");
});
});
8 changes: 6 additions & 2 deletions app/client/src/pages/Editor/EditorName/NavigationMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ interface NavigationMenuProps {

export function NavigationMenu(props: NavigationMenuProps) {
const { menuItems, setIsPopoverOpen } = props;

return (
<MenuContent width="214px">
<MenuContent
width="214px"
onInteractOutside={() => {
setIsPopoverOpen(false);
}}
>
{menuItems?.map((item, idx) => {
return (
<NavigationMenuItem
Expand Down

0 comments on commit 29c818a

Please sign in to comment.