mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
* Fix type error in first user setup * Save auth state * Add template creation - wip Remove saved auth state because it wasn't working * Try adding the rest of the tests Can't see if they work yet, waiting on a release * Update playwright * Update gitignore * Write tests * Format * Update ignores * Check that start worked Co-authored-by: Ben Potter <ben@coder.com> Co-authored-by: Ben Potter <ben@coder.com>
25 lines
647 B
TypeScript
25 lines
647 B
TypeScript
import { Page } from "@playwright/test"
|
|
|
|
export const buttons = {
|
|
starterTemplates: "Starter templates",
|
|
dockerTemplate: "Develop in Docker",
|
|
useTemplate: "Use template",
|
|
createTemplate: "Create template",
|
|
createWorkspace: "Create workspace",
|
|
submitCreateWorkspace: "Create workspace",
|
|
stopWorkspace: "Stop",
|
|
startWorkspace: "Start",
|
|
}
|
|
|
|
export const clickButton = async (page: Page, name: string): Promise<void> => {
|
|
await page.getByRole("button", { name, exact: true }).click()
|
|
}
|
|
|
|
export const fillInput = async (
|
|
page: Page,
|
|
label: string,
|
|
value: string,
|
|
): Promise<void> => {
|
|
await page.fill(`text=${label}`, value)
|
|
}
|