More fixture migration

This commit is contained in:
Austin Mroz
2026-03-30 16:29:37 -07:00
committed by Austin
parent 3c95925507
commit d6bca2af3c
3 changed files with 13 additions and 14 deletions

View File

@@ -24,6 +24,10 @@ export class VueNodeFixture {
this.root = locator
}
get widgets(): Locator {
return this.locator.locator('.lg-node-widget')
}
async getTitle(): Promise<string> {
return (await this.title.textContent()) ?? ''
}

View File

@@ -2,7 +2,6 @@ import {
comfyPageFixture as test,
comfyExpect as expect
} from '../fixtures/ComfyPage'
import { TestIds } from '../fixtures/selectors'
test.describe('App mode usage', () => {
test('Drag and Drop', async ({ comfyPage }) => {
@@ -49,8 +48,7 @@ test.describe('App mode usage', () => {
await expect(panel).toContainClass('left-[100vw]')
await comfyPage.appMode.mobileNavigateTab('run')
const widgets = mobileView.getByTestId(TestIds.linear.widgetContainer)
await expect(widgets).toBeInViewport({ ratio: 1 })
await expect(comfyPage.appMode.linearWidgets).toBeInViewport({ ratio: 1 })
const steps = comfyPage.page.getByRole('spinbutton')
await expect(steps).toHaveValue('20')

View File

@@ -2,6 +2,7 @@ import {
comfyPageFixture as test,
comfyExpect as expect
} from '../fixtures/ComfyPage'
import { VueNodeFixture } from '../fixtures/utils/vueNodeFixtures'
test.describe('App mode builder selection', () => {
test.beforeEach(async ({ comfyPage }) => {
@@ -67,23 +68,19 @@ test.describe('App mode builder selection', () => {
await expect(items).toHaveCount(0)
await comfyPage.vueNodes
.getNodeLocator('4')
.locator('.lg-node-widget')
.click()
.getFixtureByTitle('Load Checkpoint')
.then((node) => node.widgets.click())
await expect.soft(items).toHaveCount(0)
await comfyPage.workflow.loadWorkflow('nodes/note_nodes')
await comfyPage.appMode.enterBuilder()
await comfyPage.appMode.steps.goToInputs()
await expect(items).toHaveCount(0)
await comfyPage.vueNodes
.getNodeLocator('1')
.locator('.lg-node-widget')
.click({ force: true })
await comfyPage.vueNodes
.getNodeLocator('2')
.locator('.lg-node-widget')
.click({ force: true })
for (const locator of await comfyPage.vueNodes.getNodeByTitle('Note').all())
await new VueNodeFixture(locator).widgets.click({ force: true })
await expect(items).toHaveCount(0)
})
test('Marks canvas readOnly', async ({ comfyPage }) => {