import{newE2EPage}from"@stencil/core/testing";describe("sc-form-control",(()=>{it("renders",(async()=>{const t=await newE2EPage();await t.setContent("<sc-form-control></sc-form-control>");const o=await t.find("sc-form-control");expect(o).toHaveClass("hydrated")})),it("Can have sizes",(async()=>{const t=await newE2EPage();await t.setContent("<sc-form-control></sc-form-control>");const o=await t.find("sc-form-control >>> .form-control");await t.$eval("sc-form-control",(t=>{t.size="large"})),await t.waitForChanges(),expect(o).toHaveClass("form-control--large"),await t.$eval("sc-form-control",(t=>{t.size="small"})),await t.waitForChanges(),expect(o).toHaveClass("form-control--small")})),it("Can have a label",(async()=>{const t=await newE2EPage();await t.setContent("<sc-form-control></sc-form-control>");const o=await t.find("sc-form-control >>> .form-control");expect(o).not.toHaveClass("form-control--has-label"),await t.$eval("sc-form-control",(t=>{t.label="Test Label Text"})),await t.waitForChanges(),expect(o).toHaveClass("form-control--has-label");const a=await t.find("sc-form-control >>> .form-control__label");expect(a).toEqualText("Test Label Text"),await t.$eval("sc-form-control",(t=>{t.showLabel=!1})),await t.waitForChanges(),expect(o).not.toHaveClass("form-control--has-label"),expect(a).toHaveAttribute("aria-hidden")})),it("Can have help text",(async()=>{const t=await newE2EPage();await t.setContent("<sc-form-control></sc-form-control>");const o=await t.find("sc-form-control >>> .form-control");await t.$eval("sc-form-control",(t=>{t.help="Help Text Test"})),await t.waitForChanges(),expect(o).toHaveClass("form-control--has-help-text");const a=await t.find("sc-form-control >>> .form-control__help-text");let e=await a.isVisible();expect(e).toBe(!0),expect(a).toEqualText("Help Text Test")}))}));