import{newE2EPage}from"@stencil/core/testing";describe("sc-form-control",(()=>{let o;it("renders",(async()=>{const o=await newE2EPage();await o.setContent("<sc-form-control></sc-form-control>");const t=await o.find("sc-form-control");expect(t).toHaveClass("hydrated")})),it("Can have sizes",(async()=>{const t=await newE2EPage();await t.setContent("<sc-form-control></sc-form-control>"),o=await t.find("sc-form-control >>> .form-control"),await t.$eval("sc-form-control",(o=>{o.size="large"})),await t.waitForChanges(),o=await t.find("sc-form-control >>> .form-control"),expect(o).toHaveClass("form-control--large"),await t.$eval("sc-form-control",(o=>{o.size="small"})),await t.waitForChanges(),o=await t.find("sc-form-control >>> .form-control"),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>"),o=await t.find("sc-form-control >>> .form-control"),expect(o).not.toHaveClass("form-control--has-label"),await t.$eval("sc-form-control",(o=>{o.label="Test Label Text"})),await t.waitForChanges(),o=await t.find("sc-form-control >>> .form-control"),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",(o=>{o.showLabel=!1})),await t.waitForChanges(),o=await t.find("sc-form-control >>> .form-control"),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>"),o=await t.find("sc-form-control >>> .form-control"),await t.$eval("sc-form-control",(o=>{o.help="Help Text Test"})),await t.waitForChanges(),o=await t.find("sc-form-control >>> .form-control"),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")}))}));