diff --git a/packages/calcite-components/src/components/popover/popover.e2e.ts b/packages/calcite-components/src/components/popover/popover.e2e.ts index ec26b7628fc..f0ea02bf118 100644 --- a/packages/calcite-components/src/components/popover/popover.e2e.ts +++ b/packages/calcite-components/src/components/popover/popover.e2e.ts @@ -683,6 +683,31 @@ describe("calcite-popover", () => { expect(await popover.getProperty("open")).toBe(false); }); + it("should not reopen when trigger is clicked and autoClose=true", async () => { + const page = await newE2EPage(); + + await page.setContent(html` + Content + + `); + + await page.waitForChanges(); + const popover = await page.find("calcite-popover"); + + expect(await popover.getProperty("open")).toBe(false); + + const referenceElement = await page.find("#ref"); + await referenceElement.click(); + await page.waitForChanges(); + + expect(await popover.getProperty("open")).toBe(true); + + await referenceElement.click(); + await page.waitForChanges(); + + expect(await popover.getProperty("open")).toBe(false); + }); + describe("setFocus", () => { const createPopoverHTML = (contentHTML?: string, attrs?: string) => `${contentHTML}`;