2dbfda1285
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
21 lines
490 B
TypeScript
21 lines
490 B
TypeScript
import { wd } from './app'
|
|
|
|
export function $element() {
|
|
return $(wd('tools'))
|
|
}
|
|
|
|
export async function click(toolName: string) {
|
|
// Check if `tools.mobile-more` exists
|
|
// Check ifisExisting()
|
|
const toolSelector = wd(`tools.${toolName}`)
|
|
const moreSelector = wd(`tools.more`)
|
|
|
|
if (await $(toolSelector).isExisting()) {
|
|
await $(toolSelector).click()
|
|
} else if (await $(moreSelector).isExisting()) {
|
|
await $(moreSelector).click()
|
|
await $(toolSelector).click()
|
|
}
|
|
|
|
return this
|
|
}
|