mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
Post rebase lint fixes
This commit is contained in:
@@ -9,6 +9,7 @@ import { BuilderFooterHelper } from '@e2e/fixtures/helpers/BuilderFooterHelper'
|
||||
import { BuilderSaveAsHelper } from '@e2e/fixtures/helpers/BuilderSaveAsHelper'
|
||||
import { BuilderSelectHelper } from '@e2e/fixtures/helpers/BuilderSelectHelper'
|
||||
import { BuilderStepsHelper } from '@e2e/fixtures/helpers/BuilderStepsHelper'
|
||||
import { MobileAppHelper } from '@e2e/fixtures/helpers/MobileAppHelper'
|
||||
|
||||
export class AppModeHelper {
|
||||
readonly footer: BuilderFooterHelper
|
||||
@@ -152,20 +153,6 @@ export class AppModeHelper {
|
||||
return this.page.getByTestId(TestIds.linear.centerPanel)
|
||||
}
|
||||
|
||||
get mobileWorkflows() {
|
||||
return this.mobileView.getByTestId(TestIds.linear.mobileWorkflows)
|
||||
}
|
||||
get mobileActionmenu() {
|
||||
return this.mobileView.getByTestId(TestIds.linear.mobileActionMenu)
|
||||
}
|
||||
async switchMobileWorkflow(workflowName: string) {
|
||||
await this.mobileWorkflows.click()
|
||||
await this.page.getByRole('menu').getByText(workflowName).click()
|
||||
}
|
||||
async mobileNavigateTab(name: 'run' | 'outputs' | 'assets') {
|
||||
await this.mobileNavigation.getByRole('tab', { name }).click()
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the actions menu trigger for a widget in the app mode widget list.
|
||||
* @param widgetName Text shown in the widget label (e.g. "seed").
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
comfyPageFixture as test,
|
||||
comfyExpect as expect
|
||||
} from '../fixtures/ComfyPage'
|
||||
} from '@e2e/fixtures/ComfyPage'
|
||||
|
||||
test.describe('App mode usage', () => {
|
||||
test('Drag and Drop', async ({ comfyPage }) => {
|
||||
@@ -11,7 +11,7 @@ test.describe('App mode usage', () => {
|
||||
await expect(centerPanel).toBeVisible()
|
||||
//an app without an image input will load the workflow
|
||||
await comfyPage.dragDrop.dragAndDropFile('workflowInMedia/workflow.webp')
|
||||
await expect(centerPanel).not.toBeVisible()
|
||||
await expect(centerPanel).toBeHidden()
|
||||
|
||||
//prep a load image
|
||||
await comfyPage.workflow.loadWorkflow('default')
|
||||
@@ -28,6 +28,7 @@ test.describe('App mode usage', () => {
|
||||
await comfyPage.dragDrop.dragAndDropURL('/assets/images/og-image.png')
|
||||
await expect(centerPanel).toBeVisible()
|
||||
})
|
||||
|
||||
test('Widet Interaction', async ({ comfyPage }) => {
|
||||
await comfyPage.appMode.enterAppModeWithInputs([
|
||||
['3', 'seed'],
|
||||
@@ -43,11 +44,11 @@ test.describe('App mode usage', () => {
|
||||
|
||||
await seed.dragTo(incrementButton, { steps: 5 })
|
||||
const intermediateValue = Number(await input.inputValue())
|
||||
await expect(intermediateValue).toBeGreaterThan(initialValue)
|
||||
expect(intermediateValue).toBeGreaterThan(initialValue)
|
||||
|
||||
await seed.dragTo(decrementButton, { steps: 5 })
|
||||
const endValue = Number(await input.inputValue())
|
||||
await expect(endValue).toBeLessThan(intermediateValue)
|
||||
expect(endValue).toBeLessThan(intermediateValue)
|
||||
|
||||
const sampler = comfyPage.appMode.linearWidgets.getByLabel('sampler_name', {
|
||||
exact: true
|
||||
@@ -61,6 +62,7 @@ test.describe('App mode usage', () => {
|
||||
|
||||
//verify values are consistent with litegraph
|
||||
})
|
||||
|
||||
test.describe('Mobile', { tag: ['@mobile'] }, () => {
|
||||
test('panel navigation', async ({ comfyPage }) => {
|
||||
const { mobile } = comfyPage.appMode
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import {
|
||||
comfyPageFixture as test,
|
||||
comfyExpect as expect
|
||||
} from '../fixtures/ComfyPage'
|
||||
import { VueNodeFixture } from '../fixtures/utils/vueNodeFixtures'
|
||||
} from '@e2e/fixtures/ComfyPage'
|
||||
|
||||
test.describe('App mode builder selection', () => {
|
||||
test.beforeEach(async ({ comfyPage }) => {
|
||||
@@ -21,7 +20,7 @@ test.describe('App mode builder selection', () => {
|
||||
await comfyPage.appMode.steps.goToInputs()
|
||||
await expect(items).toHaveCount(0)
|
||||
|
||||
const prompts = await comfyPage.vueNodes
|
||||
const prompts = comfyPage.vueNodes
|
||||
.getNodeByTitle('New Subgraph')
|
||||
.locator('.lg-node-widget')
|
||||
const count = await prompts.count()
|
||||
@@ -31,6 +30,7 @@ test.describe('App mode builder selection', () => {
|
||||
await expect(items).toHaveCount(i + 1)
|
||||
}
|
||||
})
|
||||
|
||||
test('Can drag and drop inputs', async ({ comfyPage }) => {
|
||||
const items = comfyPage.appMode.select.selectedItems
|
||||
await comfyPage.appMode.enterBuilder()
|
||||
@@ -47,6 +47,7 @@ test.describe('App mode builder selection', () => {
|
||||
//dragTo doesn't cross the center point, so denoise is moved to position 2
|
||||
await expect(items.nth(1)).toContainText('denoise')
|
||||
})
|
||||
|
||||
test('Can select outputs', async ({ comfyPage }) => {
|
||||
await comfyPage.appMode.enterBuilder()
|
||||
await comfyPage.appMode.steps.goToOutputs()
|
||||
@@ -60,28 +61,31 @@ test.describe('App mode builder selection', () => {
|
||||
const items = comfyPage.appMode.select.selectedItems
|
||||
await expect(items).toHaveCount(1)
|
||||
})
|
||||
|
||||
test('Can not select nodes with errors or notes', async ({ comfyPage }) => {
|
||||
await comfyPage.settings.setSetting('Comfy.VueNodes.Enabled', true)
|
||||
const items = comfyPage.appMode.select.selectedItems
|
||||
await comfyPage.appMode.enterBuilder()
|
||||
await comfyPage.appMode.steps.goToInputs()
|
||||
await expect(items).toHaveCount(0)
|
||||
|
||||
await comfyPage.vueNodes
|
||||
.getFixtureByTitle('Load Checkpoint')
|
||||
.then((node) => node.widgets.click())
|
||||
|
||||
await expect.soft(items).toHaveCount(0)
|
||||
await comfyPage.appMode.select.selectInputWidget(
|
||||
'Load Checkpoint',
|
||||
'ckpt_name'
|
||||
)
|
||||
//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)
|
||||
|
||||
for (const locator of await comfyPage.vueNodes.getNodeByTitle('Note').all())
|
||||
await new VueNodeFixture(locator).widgets.click({ force: true })
|
||||
await comfyPage.appMode.select.selectInputWidget('Note', 'text')
|
||||
await comfyPage.appMode.select.selectInputWidget('Markdown Note', 'text')
|
||||
|
||||
await expect(items).toHaveCount(0)
|
||||
})
|
||||
|
||||
test('Marks canvas readOnly', async ({ comfyPage }) => {
|
||||
await comfyPage.settings.setSetting(
|
||||
'Comfy.NodeSearchBoxImpl',
|
||||
@@ -104,8 +108,9 @@ test.describe('App mode builder selection', () => {
|
||||
await expect(comfyPage.searchBox.input).toHaveCount(0)
|
||||
|
||||
const ksampler = await comfyPage.vueNodes.getFixtureByTitle('KSampler')
|
||||
// oxlint-disable-next-line playwright/no-force-option -- Node container has conditional pointer-events:none that blocks actionability
|
||||
await ksampler.header.dblclick({ force: true })
|
||||
await expect(ksampler.titleInput).not.toBeVisible()
|
||||
await expect(ksampler.titleInput).toBeHidden()
|
||||
|
||||
await comfyPage.page.keyboard.press('Escape')
|
||||
await comfyPage.page.mouse.dblclick(100, 100, { delay: 5 })
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<template>
|
||||
<div class="widget-markdown relative w-full" @dblclick="startEditing">
|
||||
<div
|
||||
:aria-label="widget.name"
|
||||
class="widget-markdown relative w-full"
|
||||
@dblclick="startEditing"
|
||||
>
|
||||
<!-- Display mode: Rendered markdown -->
|
||||
<div
|
||||
class="comfy-markdown-content size-full min-h-[60px] overflow-y-auto rounded-lg text-sm"
|
||||
|
||||
Reference in New Issue
Block a user