Files
ComfyUI_frontend/browser_tests/fixtures/UserSelectPage.ts
Alexander Brown a82fcd8ec6 Knip: Enable more rules (#5309)
* knip: Simplify config

* knip: enable unlisted, fix issues

* knip: Add ignore for build dependencies (Vite plugin indirect reference)

* knip: Prune dependencies

* knip: One more Unused dep

* git: Standard line end for yaml

* [auto-fix] Apply ESLint and Prettier fixes

* knip: Add exceptions for tailwindcss post-rebase.
Not sure why we need to except it.

* Update test expectations [skip ci]

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: github-actions <github-actions@github.com>
2025-09-03 22:57:53 -07:00

41 lines
863 B
TypeScript

import { Page, 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)
}
})