@salla.sa/twilight-components
Version:
Salla Web Component
30 lines (29 loc) • 996 B
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { newSpecPage } from "@stencil/core/testing";
import { SallaProductSizeGuide } from "../salla-product-size-guide";
const product_id = 631341558;
describe('salla-product-size-guide', () => {
it('should build', () => {
expect(new SallaProductSizeGuide()).toBeTruthy();
});
describe('checking for methods', () => {
let page;
let element;
beforeEach(async () => {
page = await newSpecPage({
components: [SallaProductSizeGuide],
html: '<salla-product-size-guide></salla-product-size-guide>',
});
element = page.root.querySelector('salla-product-size-guide');
});
it('should be able to call method to open modal', async () => {
await page.root.open(product_id);
await page.waitForChanges();
const modal = await element.find('salla-modal');
expect(modal.getAttribute('visible')).not.toBeNull();
});
});
});
//# sourceMappingURL=salla-product-size-guide.spec.js.map