diff --git a/src/components/select/bl-select.test.ts b/src/components/select/bl-select.test.ts index 927de928..38c542c1 100644 --- a/src/components/select/bl-select.test.ts +++ b/src/components/select/bl-select.test.ts @@ -132,7 +132,7 @@ describe("bl-select", () => { const selectedOptions = el.shadowRoot?.querySelector(".selected-options"); - expect(selectedOptions?.children[0].children[0]).to.equal(""); + expect(selectedOptions?.children[0].children[0].outerHTML).to.equal(""); }); it("should open select menu", async () => { const el = await fixture(html`Option 1`); diff --git a/src/components/select/option/bl-select-option.test.ts b/src/components/select/option/bl-select-option.test.ts index 74ebf140..5f285d86 100644 --- a/src/components/select/option/bl-select-option.test.ts +++ b/src/components/select/option/bl-select-option.test.ts @@ -1,4 +1,4 @@ -import { assert, elementUpdated, fixture, expect, html, oneEvent } from "@open-wc/testing"; +import { assert, elementUpdated, expect, fixture, html, oneEvent } from "@open-wc/testing"; import { sendKeys } from "@web/test-runner-commands"; import BlSelectOption from "./bl-select-option"; @@ -15,6 +15,8 @@ describe("bl-select", () => { expect(el).shadowDom.equal( `
+ +
@@ -41,6 +43,14 @@ describe("bl-select", () => { ); }); + it("should rendered with custom icon", async () => { + const el = await fixture(html``); + + const iconSlot = el.shadowRoot!.querySelector("slot[name=icon]")!; + + expect(iconSlot.assignedElements()).deep.equal([el.querySelector("bl-icon")]); + }); + it("should have aria-selected attribute set to true if the option is selected", async function () { const el = await fixture( html`Basketball`