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

Function openMenu

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

Source from the content-addressed store, hash-verified

259 }
260
261 const openMenu = async () => {
262 await button.hover().catch(() => {});
263 await button.click().catch(() => {});
264 const visibleAfterClick = await menu.isVisible().catch(() => false);
265 if (visibleAfterClick) {
266 return true;
267 }
268
269 await button.evaluate((element) => element.click()).catch(() => {});
270 return page.waitForFunction((target) => {
271 return target instanceof HTMLElement &&
272 target.classList.contains('open') &&
273 window.getComputedStyle(target).display !== 'none' &&
274 window.getComputedStyle(target).visibility !== 'hidden';
275 }, await menu.elementHandle(), { timeout: 3000 }).then(() => true).catch(() => false);
276 };
277
278 const opened = await openMenu();
279 if (!opened) {

Callers 1

openNavigationEntryMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected