mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-25 09:14:25 +00:00
- Rename dragAndDrop to dragDrop (7 occurrences) - Add override modifiers in SidebarTab.ts (4 fixes) - Remove .ts import extensions in actionbar.spec.ts - Prefix unused variables with underscore (9 files) - Fix ESLint import() type annotation in globals.d.ts Reduces typecheck:browser errors from 229 to 215 Amp-Thread-ID: https://ampcode.com/threads/T-019c1787-c781-761d-b95a-4844e909e64c Co-authored-by: Amp <amp@ampcode.com>
56 lines
1.9 KiB
TypeScript
56 lines
1.9 KiB
TypeScript
import { expect } from '@playwright/test'
|
|
|
|
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
|
|
import { DefaultGraphPositions } from '../fixtures/constants/defaultGraphPositions'
|
|
|
|
test.describe('Browser tab title', { tag: '@smoke' }, () => {
|
|
test.describe('Beta Menu', () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top')
|
|
})
|
|
|
|
test('Can display workflow name', async ({ comfyPage }) => {
|
|
const workflowName = await comfyPage.page.evaluate(async () => {
|
|
return window.app!.extensionManager.workflow.activeWorkflow.filename
|
|
})
|
|
expect(await comfyPage.page.title()).toBe(`*${workflowName} - ComfyUI`)
|
|
})
|
|
|
|
// Failing on CI
|
|
// Cannot reproduce locally
|
|
test.skip('Can display workflow name with unsaved changes', async ({
|
|
comfyPage
|
|
}) => {
|
|
const workflowName = await comfyPage.page.evaluate(async () => {
|
|
return window.app!.extensionManager.workflow.activeWorkflow.filename
|
|
})
|
|
expect(await comfyPage.page.title()).toBe(`${workflowName} - ComfyUI`)
|
|
|
|
await comfyPage.menu.topbar.saveWorkflow('test')
|
|
expect(await comfyPage.page.title()).toBe('test - ComfyUI')
|
|
|
|
const textBox = comfyPage.widgetTextBox
|
|
await textBox.fill('Hello World')
|
|
await comfyPage.canvasOps.clickEmptySpace(
|
|
DefaultGraphPositions.emptySpaceClick
|
|
)
|
|
expect(await comfyPage.page.title()).toBe(`*test - ComfyUI`)
|
|
|
|
// Delete the saved workflow for cleanup.
|
|
await comfyPage.page.evaluate(async () => {
|
|
return window.app!.extensionManager.workflow.activeWorkflow.delete()
|
|
})
|
|
})
|
|
})
|
|
|
|
test.describe('Legacy Menu', () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Disabled')
|
|
})
|
|
|
|
test('Can display default title', async ({ comfyPage }) => {
|
|
expect(await comfyPage.page.title()).toBe('ComfyUI')
|
|
})
|
|
})
|
|
})
|