mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 15:24:09 +00:00
## Summary Redesigned node search with categories ## Changes - **What**: Adds a v2 search component, leaving the existing implementation untouched - It also brings onboard the incomplete node library & preview changes, disabled and behind a hidden setting - **Breaking**: Changes the 'default' value of the node search setting to v2, adding v1 (legacy) as an option ## Screenshots (if applicable) https://github.com/user-attachments/assets/2ab797df-58f0-48e8-8b20-2a1809e3735f ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8987-V2-Node-Search-hidden-Node-Library-changes-30c6d73d36508160902bcb92553f147c) by [Unito](https://www.unito.io) --------- Co-authored-by: Yourz <crazilou@vip.qq.com> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
30 lines
860 B
TypeScript
30 lines
860 B
TypeScript
import type { Locator, Page } from '@playwright/test'
|
|
|
|
import type { ComfyPage } from '../ComfyPage'
|
|
|
|
export class ComfyNodeSearchBoxV2 {
|
|
readonly dialog: Locator
|
|
readonly input: Locator
|
|
readonly results: Locator
|
|
readonly filterOptions: Locator
|
|
|
|
constructor(readonly page: Page) {
|
|
this.dialog = page.getByRole('search')
|
|
this.input = this.dialog.locator('input[type="text"]')
|
|
this.results = this.dialog.getByTestId('result-item')
|
|
this.filterOptions = this.dialog.getByTestId('filter-option')
|
|
}
|
|
|
|
categoryButton(categoryId: string): Locator {
|
|
return this.dialog.getByTestId(`category-${categoryId}`)
|
|
}
|
|
|
|
filterBarButton(name: string): Locator {
|
|
return this.dialog.getByRole('button', { name })
|
|
}
|
|
|
|
async reload(comfyPage: ComfyPage) {
|
|
await comfyPage.settings.setSetting('Comfy.NodeSearchBoxImpl', 'default')
|
|
}
|
|
}
|