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 t=await e.find("sc-donation-choices");expect(t).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 t=await e.find("sc-donation-choices");t.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();const i=await e.find('sc-choice[value="100"]');expect(i).toHaveAttribute("disabled"),expect(await i.isVisible()).toBe(!1);const c=await e.find('sc-choice[value="1500"]');expect(c).toHaveAttribute("disabled"),expect(await c.isVisible()).toBe(!1),t.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(),expect(i).toHaveAttribute("disabled"),expect(await i.isVisible()).toBe(!1),expect(c).not.toHaveAttribute("disabled"),expect(await c.isVisible()).toBe(!0),t.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(),expect(i).not.toHaveAttribute("disabled"),expect(await i.isVisible()).toBe(!0),expect(c).not.toHaveAttribute("disabled"),expect(await c.isVisible()).toBe(!0)}))}));