mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +00:00
Move ComfyPage to fixtures folder (#1304)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import type { Response } from '@playwright/test'
|
import type { Response } from '@playwright/test'
|
||||||
import type { StatusWsMessage } from '../src/types/apiTypes.ts'
|
import type { StatusWsMessage } from '../src/types/apiTypes.ts'
|
||||||
import { expect, mergeTests } from '@playwright/test'
|
import { expect, mergeTests } from '@playwright/test'
|
||||||
import { comfyPageFixture } from './ComfyPage'
|
import { comfyPageFixture } from './fixtures/ComfyPage'
|
||||||
import { webSocketFixture } from './fixtures/ws.ts'
|
import { webSocketFixture } from './fixtures/ws.ts'
|
||||||
|
|
||||||
const test = mergeTests(comfyPageFixture, webSocketFixture)
|
const test = mergeTests(comfyPageFixture, webSocketFixture)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Browser tab title', () => {
|
test.describe('Browser tab title', () => {
|
||||||
test.describe('Beta Menu', () => {
|
test.describe('Beta Menu', () => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
ComfyPage,
|
ComfyPage,
|
||||||
comfyPageFixture as test,
|
comfyPageFixture as test,
|
||||||
comfyExpect as expect
|
comfyExpect as expect
|
||||||
} from './ComfyPage'
|
} from './fixtures/ComfyPage'
|
||||||
|
|
||||||
async function beforeChange(comfyPage: ComfyPage) {
|
async function beforeChange(comfyPage: ComfyPage) {
|
||||||
await comfyPage.page.evaluate(() => {
|
await comfyPage.page.evaluate(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
const customColorPalettes = {
|
const customColorPalettes = {
|
||||||
obsidian: {
|
obsidian: {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Keybindings', () => {
|
test.describe('Keybindings', () => {
|
||||||
test('Should execute command', async ({ comfyPage }) => {
|
test('Should execute command', async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Copy Paste', () => {
|
test.describe('Copy Paste', () => {
|
||||||
test('Can copy and paste node', async ({ comfyPage }) => {
|
test('Can copy and paste node', async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Load workflow warning', () => {
|
test.describe('Load workflow warning', () => {
|
||||||
test('Should display a warning when loading a workflow with missing nodes', async ({
|
test('Should display a warning when loading a workflow with missing nodes', async ({
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect, Locator } from '@playwright/test'
|
import { expect, Locator } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Topbar commands', () => {
|
test.describe('Topbar commands', () => {
|
||||||
test.beforeEach(async ({ comfyPage }) => {
|
test.beforeEach(async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import type { Page, Locator, APIRequestContext } from '@playwright/test'
|
import type { Page, Locator, APIRequestContext } from '@playwright/test'
|
||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { test as base } from '@playwright/test'
|
import { test as base } from '@playwright/test'
|
||||||
import { ComfyActionbar } from './helpers/actionbar'
|
import { ComfyActionbar } from '../helpers/actionbar'
|
||||||
import dotenv from 'dotenv'
|
import dotenv from 'dotenv'
|
||||||
dotenv.config()
|
dotenv.config()
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import { NodeBadgeMode } from '../src/types/nodeSource'
|
import { NodeBadgeMode } from '../../src/types/nodeSource'
|
||||||
import type { NodeId } from '../src/types/comfyWorkflow'
|
import type { NodeId } from '../../src/types/comfyWorkflow'
|
||||||
import type { KeyCombo } from '../src/types/keyBindingTypes'
|
import type { KeyCombo } from '../../src/types/keyBindingTypes'
|
||||||
import { ManageGroupNode } from './helpers/manageGroupNode'
|
import { ManageGroupNode } from '../helpers/manageGroupNode'
|
||||||
import { ComfyTemplates } from './helpers/templates'
|
import { ComfyTemplates } from '../helpers/templates'
|
||||||
|
|
||||||
interface Position {
|
interface Position {
|
||||||
x: number
|
x: number
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Graph Canvas Menu', () => {
|
test.describe('Graph Canvas Menu', () => {
|
||||||
test.beforeEach(async ({ comfyPage }) => {
|
test.beforeEach(async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { ComfyPage, NodeReference, comfyPageFixture as test } from './ComfyPage'
|
import {
|
||||||
|
ComfyPage,
|
||||||
|
NodeReference,
|
||||||
|
comfyPageFixture as test
|
||||||
|
} from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Group Node', () => {
|
test.describe('Group Node', () => {
|
||||||
test.afterEach(async ({ comfyPage }) => {
|
test.afterEach(async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Node Interaction', () => {
|
test.describe('Node Interaction', () => {
|
||||||
test('Can enter prompt', async ({ comfyPage }) => {
|
test('Can enter prompt', async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Keybindings', () => {
|
test.describe('Keybindings', () => {
|
||||||
test('Should not trigger non-modifier keybinding when typing in input fields', async ({
|
test('Should not trigger non-modifier keybinding when typing in input fields', async ({
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
function listenForEvent(): Promise<Event> {
|
function listenForEvent(): Promise<Event> {
|
||||||
return new Promise<Event>((resolve) => {
|
return new Promise<Event>((resolve) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Load Workflow in Media', () => {
|
test.describe('Load Workflow in Media', () => {
|
||||||
;[
|
;[
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Menu', () => {
|
test.describe('Menu', () => {
|
||||||
test.beforeEach(async ({ comfyPage }) => {
|
test.beforeEach(async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
import type { ComfyApp } from '../src/scripts/app'
|
import type { ComfyApp } from '../src/scripts/app'
|
||||||
import { NodeBadgeMode } from '../src/types/nodeSource'
|
import { NodeBadgeMode } from '../src/types/nodeSource'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
// If an input is optional by node definition, it should be shown as
|
// If an input is optional by node definition, it should be shown as
|
||||||
// a hollow circle no matter what shape it was defined in the workflow JSON.
|
// a hollow circle no matter what shape it was defined in the workflow JSON.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Node search box', () => {
|
test.describe('Node search box', () => {
|
||||||
test.beforeEach(async ({ comfyPage }) => {
|
test.beforeEach(async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { type NodeReference, comfyPageFixture as test } from './ComfyPage'
|
import {
|
||||||
|
type NodeReference,
|
||||||
|
comfyPageFixture as test
|
||||||
|
} from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Primitive Node', () => {
|
test.describe('Primitive Node', () => {
|
||||||
test('Can load with correct size', async ({ comfyPage }) => {
|
test('Can load with correct size', async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Properties Panel', () => {
|
test.describe('Properties Panel', () => {
|
||||||
test.beforeEach(async ({ comfyPage }) => {
|
test.beforeEach(async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
import { NodeBadgeMode } from '../src/types/nodeSource'
|
import { NodeBadgeMode } from '../src/types/nodeSource'
|
||||||
|
|
||||||
test.describe('Canvas Right Click Menu', () => {
|
test.describe('Canvas Right Click Menu', () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Templates', () => {
|
test.describe('Templates', () => {
|
||||||
test.beforeEach(async ({ comfyPage }) => {
|
test.beforeEach(async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from '@playwright/test'
|
import { expect } from '@playwright/test'
|
||||||
import { comfyPageFixture as test } from './ComfyPage'
|
import { comfyPageFixture as test } from './fixtures/ComfyPage'
|
||||||
|
|
||||||
test.describe('Combo text widget', () => {
|
test.describe('Combo text widget', () => {
|
||||||
test('Truncates text when resized', async ({ comfyPage }) => {
|
test('Truncates text when resized', async ({ comfyPage }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user