import{h}from"@stencil/core";import{newSpecPage}from"@stencil/core/testing";import{ScAddress}from"../sc-address";describe("sc-address",(()=>{it("renders",(async()=>{const e=await newSpecPage({components:[ScAddress],html:"<sc-address></sc-address>"});expect(e.root).toMatchSnapshot()})),it("renders loading",(async()=>{const e=await newSpecPage({components:[ScAddress],html:'<sc-address loading="true"></sc-address>'});expect(e.root).toMatchSnapshot()})),it("renders US address fields",(async()=>{const e=await newSpecPage({components:[ScAddress],template:()=>h("sc-address",{address:{country:"US",city:"Monona",line_1:"303 Park Ave",line_2:null,postal_code:"12345",state:"WI"}})});expect(e.root).toMatchSnapshot()})),it("renders CA address fields",(async()=>{const e=await newSpecPage({components:[ScAddress],template:()=>h("sc-address",{address:{country:"CA",city:"Monona",line_1:"303 Park Ave",line_2:null,postal_code:"12345",state:"WI"}})});expect(e.root).toMatchSnapshot()})),it("renders EU address fields",(async()=>{const e=await newSpecPage({components:[ScAddress],template:()=>h("sc-address",{address:{country:"UK",city:"Monona",line_1:"303 Park Ave",line_2:null,postal_code:"12345",state:"WI"}})});expect(e.root).toMatchSnapshot()})),it("shows the name field if showName is true",(async()=>{const e=await newSpecPage({components:[ScAddress],template:()=>h("sc-address",{showName:!0})});expect(e.root).toMatchSnapshot()})),it("shows and requires name if requireName is true",(async()=>{const e=await newSpecPage({components:[ScAddress],template:()=>h("sc-address",{requireName:!0})});expect(e.root).toMatchSnapshot()}))}));