MCPcopy Create free account
hub / github.com/Rello/analytics / openMenu

Function openMenu

tests/playwright/common.js:269–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

267 }
268
269 const openMenu = async () => {
270 await button.hover().catch(() => {});
271 await button.click().catch(() => {});
272 const visibleAfterClick = await menu.isVisible().catch(() => false);
273 if (visibleAfterClick) {
274 return true;
275 }
276
277 await button.evaluate((element) => element.click()).catch(() => {});
278 return page.waitForFunction((target) => {
279 return target instanceof HTMLElement &&
280 target.classList.contains('open') &&
281 window.getComputedStyle(target).display !== 'none' &&
282 window.getComputedStyle(target).visibility !== 'hidden';
283 }, await menu.elementHandle(), { timeout: 3000 }).then(() => true).catch(() => false);
284 };
285
286 const opened = await openMenu();
287 if (!opened) {

Callers 1

openNavigationEntryMenuFunction · 0.85

Calls 3

isVisibleMethod · 0.80
evaluateMethod · 0.80
containsMethod · 0.80

Tested by

no test coverage detected