UNPKG

@salla.sa/twilight-components

Version:
62 lines (61 loc) 2.03 kB
/*! * Crafted with ❤ by Salla */ import { newE2EPage } from "@stencil/core/testing"; // describe('salla-search-e2e', () => { // let page: E2EPage; // let element: E2EElement; // beforeEach(async () => { // page = await newE2EPage({ // html: `<salla-search></salla-search>` // }); // element = await page.find('salla-search'); // }) // it('should render the component', async () => { // expect(element).not.toBeNull(); // }) // it("should render in modal, by default", async () => { // const el = await page.find("salla-search >>> salla-modal"); // expect(el).not.toBeNull(); // }) // it('should render inline', async () => { // await page.$eval("salla-search", elm => { // elm.inline = true; // }); // await page.waitForChanges(); // const el = await page.find(".s-search-modal"); // expect(el).not.toBeNull(); // }) // }) describe('checking for props', () => { let page; let element; beforeEach(async () => { page = await newE2EPage({ html: `<salla-search></salla-search>` }); await page.waitForChanges(); element = await page.find('salla-search'); }); it('should work for height prop', async () => { await page.$eval("salla-search", elm => { elm.height = 60; }); await page.waitForChanges(); const inputField = await page.find('input'); //@ts-ignore const style = inputField.getComputedStyle("height"); expect(element.getProperty('height')).toBe(60); }); // it('should work for oval prop', async () => { // element.setProperty('oval', false); // await page.waitForChanges(); // expect(element.getProperty('oval')).toBe(false); // }) // it('should work for inline prop', async () => { // element.setProperty('inline', true); // await page.waitForChanges(); // expect(element.getProperty('inline')).toBe(true); // }) }); //# sourceMappingURL=salla-search.e2e.js.map