Files
tolaria/tests/smoke/testBridge.ts
2026-04-11 10:39:08 +02:00

11 lines
376 B
TypeScript

import { type Page } from '@playwright/test'
export async function triggerMenuCommand(page: Page, id: string): Promise<void> {
await page.evaluate(async (commandId) => {
if (!window.__laputaTest?.triggerMenuCommand) {
throw new Error('Laputa test bridge is missing triggerMenuCommand')
}
await window.__laputaTest.triggerMenuCommand(commandId)
}, id)
}