import{newE2EPage}from"@stencil/core/testing";describe("sc-radio",(()=>{let a,e,t,i;const s="sc-radio";beforeEach((async()=>{a=await newE2EPage(),await a.setContent(`<${s}></${s}>`),e=await a.find(`${s}`),t=await a.find(`${s} >>> .radio`),i=await a.find(`${s} >>> input`)})),it("renders",(async()=>{const a=await newE2EPage();await a.setContent("<sc-radio></sc-radio>");const e=await a.find(s);expect(e).toHaveClass("hydrated")})),it("Should be clickable",(async()=>{i=await a.find(`${s} >>> input`);const e=await a.spyOnEvent("scBlur"),o=await a.spyOnEvent("scFocus");expect(t).toHaveClass("radio"),expect(t).not.toHaveClasses(["radio--checked","radio--focused"]),await i.click(),await a.waitForChanges(),t=await a.find(`${s} >>> .radio`),expect(t).toHaveClass("radio"),expect(t).toHaveClasses(["radio--checked","radio--focused"]),expect(o).toHaveReceivedEvent(),await a.$eval(s,(a=>a.blur())),await a.waitForChanges(),t=await a.find(`${s} >>> .radio`),expect(t).not.toHaveClass("radio--focused"),expect(e).toHaveReceivedEvent()})),it("Can be disabled",(async()=>{i=await a.find(`${s} >>> input`),expect(i).not.toHaveAttribute("disabled"),e.setProperty("disabled",!0),await a.waitForChanges(),t=await a.find(`${s} >>> .radio`),i=await a.find(`${s} >>> input`),expect(t).toHaveClasses(["radio","radio--disabled"]),expect(i).toHaveAttribute("disabled")}))}));