import{newE2EPage}from"@stencil/core/testing";describe("sc-textarea",(()=>{it("renders",(async()=>{const t=await newE2EPage();await t.setContent("<sc-textarea></sc-textarea>");const a=await t.find("sc-textarea");expect(a).toHaveClass("hydrated")})),it("Should not allow you to type beyond max length",(async()=>{const t=await newE2EPage();await t.setContent('<sc-textarea maxlength="10"></sc-textarea>'),await t.waitForChanges();const a=await t.find("sc-textarea >>> .textarea__control");await a.type("Lorem ipsum d");let e=await a.getProperty("value");expect(e).toEqual("Lorem ipsu")})),it("Should show warning when approaching text limit",(async()=>{const t=await newE2EPage();await t.setContent('<sc-textarea maxlength="20"></sc-textarea>'),await t.waitForChanges();let a=await t.find("sc-textarea >>> .textarea__char-limit-warning");expect(a).toBe(null);const e=await t.find("sc-textarea >>> .textarea__control");await e.type("Lorem ipsum"),a=await t.find("sc-textarea >>> .textarea__char-limit-warning"),await t.waitForChanges(),expect(a).not.toBe(null);let n=await a.innerText;expect(n).toEqual("9 characters remaining")}))}));