UNPKG

@salla.sa/twilight-components

Version:
45 lines (44 loc) 1.57 kB
/*! * Crafted with ❤ by Salla */ import { newSpecPage } from "@stencil/core/testing"; import { SallaSocialShare } from "../salla-social-share"; describe('salla-social-share', () => { it("should build", () => { expect(new SallaSocialShare()).toBeTruthy(); }); it('should be able to render component with out loading a2a script again, if already exists', async () => { let page = await newSpecPage({ components: [SallaSocialShare], html: '<salla-social-share id="a2a-script"></salla-social-share>' }); await page.waitForChanges(); let component = page.doc.querySelector('salla-social-share'); expect(component).toBeDefined(); }); it.skip('should open the menu using a method call', async () => { let page = await newSpecPage({ components: [SallaSocialShare], html: '<salla-social-share></salla-social-share>' }); let element = await page.doc.querySelector('salla-social-share'); await element.open(); await page.waitForChanges(); expect(element.classList.contains('opened')).toBeTruthy(); }); describe('rendering', () => { let page; beforeEach(async () => { page = await newSpecPage({ components: [SallaSocialShare], html: '<salla-social-share></salla-social-share>' }); }); it('should be able to render component', async () => { await page.waitForChanges(); let component = page.doc.querySelector('salla-social-share'); expect(component).toBeDefined(); }); }); }); //# sourceMappingURL=salla-social-share.spec.js.map