import{newE2EPage}from"@stencil/core/testing";describe("sc-donation-choices",(()=>{it("renders",(async()=>{const e=await newE2EPage();await e.setContent("<sc-donation-choices></sc-donation-choices>");const i=await e.find("sc-donation-choices");expect(i).toHaveClass("hydrated")})),it("only renders price selections within maximum and minimum",(async()=>{const e=await newE2EPage();await e.setContent('<sc-donation-choices price-id="test_price">\n    <sc-choice value="100">$1</sc-choice>\n    <sc-choice value="500">$5</sc-choice>\n    <sc-choice value="1000">$10</sc-choice>\n    <sc-choice value="1500">$15</sc-choice>\n    <sc-choice value="ad_hoc">Other</sc-choice>\n    </sc-donation-choices>');const i=await e.find("sc-donation-choices");i.setProperty("lineItems",[{id:"line",ad_hoc_amount:1e3,price:{id:"test_price",ad_hoc_min_amount:500,ad_hoc_max_amount:1e3}}]),await e.waitForChanges();let t=await e.find('sc-choice[value="100"]');expect(t).toHaveAttribute("disabled"),expect(await t.isVisible()).toBe(!1);let c=await e.find('sc-choice[value="1500"]');expect(c).toHaveAttribute("disabled"),expect(await c.isVisible()).toBe(!1),i.setProperty("lineItems",[{id:"line",ad_hoc_amount:1e3,price:{id:"test_price",ad_hoc_min_amount:500,ad_hoc_max_amount:null}}]),await e.waitForChanges(),t=await e.find('sc-choice[value="100"]'),c=await e.find('sc-choice[value="1500"]'),expect(t).toHaveAttribute("disabled"),expect(await t.isVisible()).toBe(!1),expect(c).not.toHaveAttribute("disabled"),expect(await c.isVisible()).toBe(!0),i.setProperty("lineItems",[{id:"line",ad_hoc_amount:1e3,price:{id:"test_price",ad_hoc_min_amount:null,ad_hoc_max_amount:null}}]),await e.waitForChanges(),t=await e.find('sc-choice[value="100"]'),c=await e.find('sc-choice[value="1500"]'),expect(t).not.toHaveAttribute("disabled"),expect(await t.isVisible()).toBe(!0),expect(c).not.toHaveAttribute("disabled"),expect(await c.isVisible()).toBe(!0)}))}));