mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
More fixture migration
This commit is contained in:
@@ -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()) ?? ''
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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 }) => {
|
||||
|
||||
Reference in New Issue
Block a user