import{newE2EPage}from"@stencil/core/testing";describe("sc-compact-address",(()=>{it("renders",(async()=>{const a=await newE2EPage();await a.setContent("<sc-compact-address></sc-compact-address>");const e=await a.find("sc-compact-address");expect(e).toHaveClass("hydrated")})),it("Emits a change event when the address is changed",(async()=>{const a=await newE2EPage();await a.setContent("<sc-compact-address></sc-compact-address><button></button>");const e=await a.find("sc-compact-address");await a.$eval("sc-compact-address",(a=>{a.address={country:"US",city:null,line_1:null,line_2:null,postal_code:null,state:null}})),await a.waitForChanges();const t=await e.spyOnEvent("scChangeAddress"),s=await a.find('sc-compact-address >>> [name="shipping_postal_code"]');await s.triggerEvent("scChange",{detail:"12345"}),await a.waitForChanges(),expect(t).toHaveReceivedEventTimes(1),await a.$eval("sc-compact-address",(a=>{a.address={country:"UK",city:"Monona",line_1:"303 Park Ave",line_2:null,postal_code:"12345",state:"WI"}}));const n=await e.getProperty("address");expect(n).toEqual({country:"UK",city:"Monona",line_1:"303 Park Ave",line_2:null,postal_code:"12345",state:"WI"});const c=await e.spyOnEvent("scChangeAddress"),i=await a.find('sc-compact-address >>> [name="shipping_country"]');await i.triggerEvent("scChange",{detail:"12345"}),await a.waitForChanges(),expect(c).toHaveReceivedEventTimes(1)}))}));