mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-27 03:19:56 +00:00
## Summary See https://typescript-eslint.io/blog/project-service/ for context. Creates a browser_tests specific tsconfig so that they can be linted. Does not add a package.json script to do the linting yet, but `pnpm exec eslint browser_tests` should work for now. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5633-lint-add-tsconfig-for-browser_tests-fix-existing-violations-2726d73d3650819d8ef2c4b0abc31e14) by [Unito](https://www.unito.io)
42 lines
902 B
TypeScript
42 lines
902 B
TypeScript
import type { Page } from '@playwright/test'
|
|
import { test as base } from '@playwright/test'
|
|
|
|
export class UserSelectPage {
|
|
constructor(
|
|
public readonly url: string,
|
|
public readonly page: Page
|
|
) {}
|
|
|
|
get selectionUrl() {
|
|
return this.url + '/user-select'
|
|
}
|
|
|
|
get container() {
|
|
return this.page.locator('#comfy-user-selection')
|
|
}
|
|
|
|
get newUserInput() {
|
|
return this.container.locator('#new-user-input')
|
|
}
|
|
|
|
get existingUserSelect() {
|
|
return this.container.locator('#existing-user-select')
|
|
}
|
|
|
|
get nextButton() {
|
|
return this.container.getByText('Next')
|
|
}
|
|
}
|
|
|
|
export const userSelectPageFixture = base.extend<{
|
|
userSelectPage: UserSelectPage
|
|
}>({
|
|
userSelectPage: async ({ page }, use) => {
|
|
const userSelectPage = new UserSelectPage(
|
|
process.env.PLAYWRIGHT_TEST_URL || 'http://localhost:8188',
|
|
page
|
|
)
|
|
await use(userSelectPage)
|
|
}
|
|
})
|