// Mockup https://www.figma.com/design/zsq2ahat30acTnumyy9aqC/00.Small-System?node-id=1195-55431&m=dev import { html } from "lit"; describe("", () => { it("should mount", () => { cy.mount(html``); cy.get("tems-label").should("exist"); }); const defaultText = "Label"; it("should accept label attribute", () => { cy.mount(html``); cy.get("tems-label").contains(defaultText); }); it("should accept slotted element", () => { cy.mount(html`${defaultText}`); cy.get("tems-label").find("span").contains(defaultText); }); it("should handle info attribute", () => { const info = "Some informations about this field"; cy.mount(html`${defaultText}`); cy.get("tems-label").find(`span[title="${info}"]`).should("exist"); }); it("should not display (?) when no info attribute provided", () => { cy.mount(html`${defaultText}`); cy.get("tems-label").find("span[title]").should("not.exist"); }); it("can be required", () => { cy.mount(html`${defaultText}`); cy.get("tems-label").find("span").first().contains("*"); }); it("can be optional", () => { cy.mount(html`${defaultText}`); cy.get("tems-label").find("span").last().contains("(optional)"); }); });