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