mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +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)
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import type { Locator, Page } from '@playwright/test'
|
|
|
|
export class ManageGroupNode {
|
|
footer: Locator
|
|
header: Locator
|
|
|
|
constructor(
|
|
readonly page: Page,
|
|
readonly root: Locator
|
|
) {
|
|
this.footer = root.locator('footer')
|
|
this.header = root.locator('header')
|
|
}
|
|
|
|
async setLabel(name: string, label: string) {
|
|
const active = this.root.locator('.comfy-group-manage-node-page.active')
|
|
const input = active.getByPlaceholder(name)
|
|
await input.fill(label)
|
|
}
|
|
|
|
async save() {
|
|
await this.footer.getByText('Save').click()
|
|
}
|
|
|
|
async close() {
|
|
await this.footer.getByText('Close').click()
|
|
}
|
|
|
|
async getSelectedNodeType() {
|
|
const select = this.header.locator('select').first()
|
|
return await select.inputValue()
|
|
}
|
|
|
|
async selectNode(name: string) {
|
|
const list = this.root.locator('.comfy-group-manage-list-items')
|
|
const item = list.getByText(name)
|
|
await item.click()
|
|
}
|
|
|
|
async changeTab(name: 'Inputs' | 'Widgets' | 'Outputs') {
|
|
const header = this.root.locator('.comfy-group-manage-node header')
|
|
const tab = header.getByText(name)
|
|
await tab.click()
|
|
}
|
|
}
|