Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions packages/calcite-components/src/components/card/card.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(`
<div style="width:260px">
await page.setContent(html`
<calcite-card label="example-label" selectable>
<h3 slot="title">ArcGIS Online: Gallery and Organization pages</h3>
<span slot="subtitle">
A great example of a study description that might wrap to a line or two, but isn't overly verbose.
</span>
</calcite-card>
</div>
`);
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);
});
Expand Down