From 6f1a14668a75001010167f1e37ca269a281421bb Mon Sep 17 00:00:00 2001 From: JC Franco Date: Fri, 27 Sep 2024 15:36:43 -0700 Subject: [PATCH] test(card): remove redundant spy and setup wrapper element in test --- packages/calcite-components/src/components/card/card.e2e.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/calcite-components/src/components/card/card.e2e.ts b/packages/calcite-components/src/components/card/card.e2e.ts index 0fd65751855..6cb6167f492 100644 --- a/packages/calcite-components/src/components/card/card.e2e.ts +++ b/packages/calcite-components/src/components/card/card.e2e.ts @@ -76,26 +76,22 @@ describe("calcite-card", () => { describe("when a card is selectable (deprecated)", () => { it("should update the card's selected state when its checkbox is clicked", async () => { const page = await newE2EPage(); - await page.setContent(` -
+ await page.setContent(html`

ArcGIS Online: Gallery and Organization pages

A great example of a study description that might wrap to a line or two, but isn't overly verbose.
-
`); const card = await page.find("calcite-card"); const checkbox = await page.find(`calcite-card >>> .${CSS.checkboxWrapperDeprecated} calcite-checkbox`); const cardSelectSpy = await card.spyOnEvent("calciteCardSelect"); - const clickSpy = await card.spyOnEvent("calciteCardSelect"); await checkbox.click(); await page.waitForChanges(); expect(cardSelectSpy).toHaveReceivedEventTimes(1); - expect(clickSpy).toHaveReceivedEventTimes(1); expect(await checkbox.getProperty("checked")).toBe(true); expect(await card.getProperty("selected")).toBe(true); });