mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 06:49:37 +00:00
## Summary Adds additional test coverage for empty state/welcome screen/connect outputs/vue nodes auto switch ## Changes - **What**: - add tests ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11194-test-App-mode-additional-app-mode-coverage-3416d73d365081ca91d0ed61de19f840) by [Unito](https://www.unito.io)
43 lines
1001 B
TypeScript
43 lines
1001 B
TypeScript
import type { Locator, Page } from '@playwright/test'
|
|
|
|
import type { ComfyPage } from '@e2e/fixtures/ComfyPage'
|
|
|
|
export class BuilderStepsHelper {
|
|
public readonly toolbar: Locator
|
|
|
|
constructor(private readonly comfyPage: ComfyPage) {
|
|
this.toolbar = this.page.getByRole('navigation', { name: 'App Builder' })
|
|
}
|
|
|
|
private get page(): Page {
|
|
return this.comfyPage.page
|
|
}
|
|
|
|
get inputsButton(): Locator {
|
|
return this.toolbar.getByRole('button', { name: 'Inputs' })
|
|
}
|
|
|
|
get outputsButton(): Locator {
|
|
return this.toolbar.getByRole('button', { name: 'Outputs' })
|
|
}
|
|
|
|
get previewButton(): Locator {
|
|
return this.toolbar.getByRole('button', { name: 'Preview' })
|
|
}
|
|
|
|
async goToInputs() {
|
|
await this.inputsButton.click()
|
|
await this.comfyPage.nextFrame()
|
|
}
|
|
|
|
async goToOutputs() {
|
|
await this.outputsButton.click()
|
|
await this.comfyPage.nextFrame()
|
|
}
|
|
|
|
async goToPreview() {
|
|
await this.previewButton.click()
|
|
await this.comfyPage.nextFrame()
|
|
}
|
|
}
|