MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / testMenu

Function testMenu

core/src/components/menu/test/basic/menu.e2e.ts:234–249  ·  view source on GitHub ↗
(page: E2EPage, menu: Locator, menuId: string, screenshot: ScreenshotFn)

Source from the content-addressed store, hash-verified

232});
233
234async function testMenu(page: E2EPage, menu: Locator, menuId: string, screenshot: ScreenshotFn) {
235 const ionDidOpen = await page.spyOnEvent('ionDidOpen');
236 const ionDidClose = await page.spyOnEvent('ionDidClose');
237
238 await page.click(`#open-${menuId}`);
239 await ionDidOpen.next();
240
241 await expect(menu).toHaveClass(/show-menu/);
242
243 await expect(page).toHaveScreenshot(screenshot(`menu-basic-${menuId}`));
244
245 await menu.evaluate(async (el: HTMLIonMenuElement) => {
246 await el.close();
247 });
248 await ionDidClose.next();
249}

Callers 1

menu.e2e.tsFile · 0.70

Calls 2

closeMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected