import { html } from "lit"; describe("", () => { it("should mount", () => { cy.mount(html``); cy.get("tems-header").should("exist"); }); it("should display heading", () => { const heading = "Test Heading"; cy.mount(html``); cy.get("tems-header").find(".heading").contains(heading); }); it("should display breadcrumb", () => { const breadcrumb = [ { route: "/home", label: "Home", resource: "", }, { route: "/resource", label: "Resource", resource: "Category", }, ]; cy.mount(html``); cy.get("tems-header").find("tems-breadcrumb").should("exist"); }); it("should emit backlink event on back button click", () => { const onBacklinkSpy = cy.spy().as("onBacklinkSpy"); cy.mount( html``, ); cy.get("tems-header").find("tems-button").click(); cy.get("@onBacklinkSpy").should("have.been.calledOnce"); }); it("should display slot content", () => { const slotContent = "Test Slot Content"; cy.mount( html`
${slotContent}
`, ); cy.get("tems-header").find("slot").should("exist"); cy.get("tems-header").find(".test-slot").contains(slotContent); }); });