import{newE2EPage}from"@stencil/core/testing";describe("sc-order-billing-address",(()=>{it("renders",(async()=>{const e=await newE2EPage();await e.setContent("<sc-order-billing-address></sc-order-billing-address>");const s=await e.find("sc-order-billing-address");expect(s).toHaveClass("hydrated")})),it("Should show billing address input when checkbox is unchecked",(async()=>{const e=await newE2EPage();await e.setContent("<sc-order-shipping-address></sc-order-shipping-address><sc-order-billing-address></sc-order-billing-address>"),await e.waitForChanges();let s=await e.find("sc-order-billing-address >>> sc-address");const d=await e.find("sc-order-billing-address >>> sc-checkbox");d.setAttribute("checked",!1),await e.waitForChanges(),s=await e.find("sc-order-billing-address >>> sc-address"),expect(s).not.toBeNull(),expect(d).not.toBeNull(),expect(await d.getProperty("checked")).toBeFalsy()})),it("should show billing address if shipping address field does not exist",(async()=>{const e=await newE2EPage();await e.setContent("<sc-order-billing-address></sc-order-billing-address>"),e.waitForChanges();const s=await e.find("sc-order-billing-address >>> sc-address"),d=await e.find("sc-order-billing-address >>> sc-switch");expect(s).not.toBeNull(),expect(d).toBeNull()})),it("uses default country if supplied",(async()=>{const e=await newE2EPage();await e.setContent('<sc-order-billing-address default-country="BD"></sc-order-billing-address>'),await e.waitForChanges();const s=await e.find("sc-order-billing-address >>> sc-address"),d=await s.getProperty("address");expect(d.country).toEqual("BD")}))}));