Skip to content

Commit

Permalink
test(combobox): update test to reduce complexity (#8810)
Browse files Browse the repository at this point in the history
**Related Issue:** #7180

## Summary
I don’t know why but adding three items always resulted in an overflow
on my machine. I don’t think this change alters the actual intent of the
test but it does allow it to pass locally.
  • Loading branch information
alisonailea authored Feb 22, 2024
1 parent 1272f1f commit d8d2bdd
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1191,25 +1191,20 @@ describe("calcite-combobox", () => {
<calcite-combobox id="myCombobox" selection-display="fit" style="width:400px">
<calcite-combobox-item id="one" value="one" text-label="one"></calcite-combobox-item>
<calcite-combobox-item id="two" value="two" text-label="two"></calcite-combobox-item>
<calcite-combobox-item-group text-label="Last Item">
<calcite-combobox-item id="three" value="three" text-label="three"></calcite-combobox-item>
</calcite-combobox-item-group>
<calcite-combobox-item id="three" value="three" text-label="three"></calcite-combobox-item>
</calcite-combobox>
`);

const element = await page.find("#myCombobox");
await element.click();

const item1 = await page.find("calcite-combobox-item#one");
const item2 = await page.find("calcite-combobox-item#two");
const item3 = await page.find("calcite-combobox-item:last-child");
await item1.click();
await item2.click();
await item3.click();

await element.click();
await element.press("Backspace");
expect((await element.getProperty("selectedItems")).length).toBe(2);
await element.press("Delete");
expect((await element.getProperty("selectedItems")).length).toBe(1);
});
});

Expand Down

0 comments on commit d8d2bdd

Please sign in to comment.