mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
## Summary Adds e2e Save As tests for #10679. Refactors tests to remove getByX and other locators in tests to instead be in fixtures. ## Changes - **What**: - extract app mode fixtures - add test ids where required - add new tests ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10680-test-refactor-App-mode-Refactor-Save-As-tests-3316d73d3650815b9d49ccfbb6d54416) by [Unito](https://www.unito.io)
31 lines
773 B
TypeScript
31 lines
773 B
TypeScript
import type { Locator, Page } from '@playwright/test'
|
|
|
|
import type { ComfyPage } from '../ComfyPage'
|
|
|
|
export class BuilderStepsHelper {
|
|
constructor(private readonly comfyPage: ComfyPage) {}
|
|
|
|
private get page(): Page {
|
|
return this.comfyPage.page
|
|
}
|
|
|
|
get toolbar(): Locator {
|
|
return this.page.getByRole('navigation', { name: 'App Builder' })
|
|
}
|
|
|
|
async goToInputs() {
|
|
await this.toolbar.getByRole('button', { name: 'Inputs' }).click()
|
|
await this.comfyPage.nextFrame()
|
|
}
|
|
|
|
async goToOutputs() {
|
|
await this.toolbar.getByRole('button', { name: 'Outputs' }).click()
|
|
await this.comfyPage.nextFrame()
|
|
}
|
|
|
|
async goToPreview() {
|
|
await this.toolbar.getByRole('button', { name: 'Preview' }).click()
|
|
await this.comfyPage.nextFrame()
|
|
}
|
|
}
|