tldraw/e2e/test/helpers/ui/main.ts
Orange Mug 2dbfda1285
Added initial webdriver tests (#1337)
Adds webdriver tests for testing from a users perspective via browser
actions. We currently support local test runners for a bunch of actions
on desktop `chrome`/`firefox`/`edge`/`safari` on macos.

We also have a browserstack runner which we'll enable in another PR.

### Release Note

- Adds initial webdriver tests
2023-05-09 20:21:45 +00:00

21 lines
438 B
TypeScript

import { wd } from './app'
export async function menu(path = []) {
await $(wd('main.menu')).click()
for await (const item of path) {
await $(wd(`menu-item.${item}`)).click()
}
}
export async function actionMenu(path = []) {
await $(wd('main.action-menu')).click()
for await (const item of path) {
await $(wd(`menu-item.${item}`)).click()
}
}
export async function click(key: string) {
await $(wd(`main.${key}`)).click()
}