Skip to content

Commit a852e75

Browse files
committed
fix: test
1 parent 4e42042 commit a852e75

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

packages/core/src/components/modal/test/modal.ct.ts

-52
Original file line numberDiff line numberDiff line change
@@ -206,55 +206,3 @@ regressionTest('emits one event on close', async ({ mount, page }) => {
206206

207207
expect(await page.evaluate(() => window.__counter)).toBe(1);
208208
});
209-
210-
regressionTest('emits one event on close', async ({ mount, page }) => {
211-
await mount(``);
212-
213-
await page.evaluate(() => {
214-
return new Promise<void>((resolve) => {
215-
const script = document.createElement('script');
216-
script.type = 'module';
217-
script.innerHTML = `
218-
import * as ix from 'http://127.0.0.1:8080/www/build/index.esm.js';
219-
window.showModal = ix.showModal;
220-
`;
221-
document.body.appendChild(script);
222-
resolve();
223-
});
224-
});
225-
226-
await page.waitForTimeout(1000);
227-
228-
await page.evaluate(() => {
229-
const elm = document.createElement('ix-modal');
230-
elm.innerHTML = `
231-
<ix-modal-header>Title</ix-modal-header>
232-
<ix-modal-content>Content</ix-modal-header>
233-
`;
234-
235-
window
236-
.showModal({
237-
content: elm,
238-
// Disable animation to get the direct animation end callback
239-
animation: false,
240-
})
241-
.then((instance: ModalInstance<unknown>) => {
242-
instance.onDismiss.on(() => {
243-
const counter = window.__counter;
244-
if (counter) {
245-
window.__counter = counter + 1;
246-
} else {
247-
window.__counter = 1;
248-
}
249-
});
250-
});
251-
});
252-
const dialog = page.locator('ix-modal dialog');
253-
await expect(dialog).toBeVisible();
254-
const iconButton = page.locator('ix-icon-button');
255-
256-
await iconButton.click();
257-
await expect(dialog).not.toBeVisible();
258-
259-
expect(await page.evaluate(() => window.__counter)).toBe(1);
260-
});

0 commit comments

Comments
 (0)