From ae1617874f8d1e2dfb33d410aeb5854bc99f23a1 Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 6 Nov 2025 16:23:00 -0700 Subject: [PATCH 01/13] feat: Add cloud E2E testing infrastructure Adds Playwright tests for cloud environment with Firebase auth. Changes: - Refactor ComfyPage to abstract base class - Add LocalhostComfyPage (existing devtools implementation) - Add CloudComfyPage (cloud settings API, Firebase auth) - Add cloud fixture with auth state persistence - Add globalSetupCloud for Firebase login - Add playwright.cloud.config with 5x timeout - Add basic cloud tests (load app, canvas interaction, settings) - Update .gitignore for auth state files - Update tsconfig to include playwright.cloud.config Architecture: - ComfyPage abstract with 3 backend-specific methods - LocalhostComfyPage uses /api/devtools + multi-user - CloudComfyPage uses /api/settings + Firebase localStorage - No code duplication (95% shared) Setup: - Requires CLOUD_TEST_EMAIL and CLOUD_TEST_PASSWORD env vars - globalSetup logs in once, saves auth to browser_tests/.auth/ - Tests reuse saved auth state (no login per test) --- .gitignore | 1 + browser_tests/fixtures/CloudComfyPage.ts | 40 +++++++++ browser_tests/fixtures/ComfyPage.ts | 88 ++++++-------------- browser_tests/fixtures/ComfyPageCloud.ts | 48 +++++++++++ browser_tests/fixtures/LocalhostComfyPage.ts | 74 ++++++++++++++++ browser_tests/globalSetupCloud.ts | 66 +++++++++++++++ browser_tests/tests/cloud.spec.ts | 49 +++++++++++ playwright.cloud.config.ts | 34 ++++++++ tsconfig.json | 1 + 9 files changed, 340 insertions(+), 61 deletions(-) create mode 100644 browser_tests/fixtures/CloudComfyPage.ts create mode 100644 browser_tests/fixtures/ComfyPageCloud.ts create mode 100644 browser_tests/fixtures/LocalhostComfyPage.ts create mode 100644 browser_tests/globalSetupCloud.ts create mode 100644 browser_tests/tests/cloud.spec.ts create mode 100644 playwright.cloud.config.ts diff --git a/.gitignore b/.gitignore index 3e400ba39c..6592721b7d 100644 --- a/.gitignore +++ b/.gitignore @@ -58,6 +58,7 @@ coverage/ /playwright/.cache/ browser_tests/**/*-win32.png browser_tests/local/ +browser_tests/.auth/ .env diff --git a/browser_tests/fixtures/CloudComfyPage.ts b/browser_tests/fixtures/CloudComfyPage.ts new file mode 100644 index 0000000000..8df51081f7 --- /dev/null +++ b/browser_tests/fixtures/CloudComfyPage.ts @@ -0,0 +1,40 @@ +import type { APIRequestContext, Page } from '@playwright/test' + +import { ComfyPage } from './ComfyPage' +import type { FolderStructure } from './ComfyPage' + +/** + * Cloud-specific implementation of ComfyPage. + * Uses Firebase auth persistence and cloud API for settings. + */ +export class CloudComfyPage extends ComfyPage { + constructor(page: Page, request: APIRequestContext) { + super(page, request) + } + + async setupUser(username: string): Promise { + // No-op for cloud - user already authenticated via Firebase in globalSetup + // Firebase auth is persisted via storageState in the fixture + return null + } + + async setupSettings(settings: Record): Promise { + // Cloud uses batch settings API (not devtools) + // Firebase auth token is automatically included from restored localStorage + const resp = await this.request.post(`${this.url}/api/settings`, { + data: settings + }) + + if (!resp.ok()) { + throw new Error(`Failed to setup cloud settings: ${await resp.text()}`) + } + } + + async setupWorkflowsDirectory(structure: FolderStructure): Promise { + // Cloud workflow API not yet implemented + // For initial smoke tests, we can skip this functionality + console.warn( + 'setupWorkflowsDirectory: not yet implemented for cloud mode - skipping' + ) + } +} diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index 8059fb4cb4..5c5e3364d8 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -11,6 +11,7 @@ import { NodeBadgeMode } from '../../src/types/nodeSource' import { ComfyActionbar } from '../helpers/actionbar' import { ComfyTemplates } from '../helpers/templates' import { ComfyMouse } from './ComfyMouse' +import { LocalhostComfyPage } from './LocalhostComfyPage' import { VueNodeHelpers } from './VueNodeHelpers' import { ComfyNodeSearchBox } from './components/ComfyNodeSearchBox' import { SettingDialog } from './components/SettingDialog' @@ -94,7 +95,7 @@ class ComfyMenu { } } -type FolderStructure = { +export type FolderStructure = { [key: string]: FolderStructure | string } @@ -122,7 +123,11 @@ class ConfirmDialog { } } -export class ComfyPage { +/** + * Abstract base class for ComfyUI page objects. + * Subclasses must implement backend-specific methods for different environments (localhost, cloud, etc.) + */ +export abstract class ComfyPage { private _history: TaskHistory | null = null public readonly url: string @@ -215,65 +220,24 @@ export class ComfyPage { }) } - async setupWorkflowsDirectory(structure: FolderStructure) { - const resp = await this.request.post( - `${this.url}/api/devtools/setup_folder_structure`, - { - data: { - tree_structure: this.convertLeafToContent(structure), - base_path: `user/${this.id}/workflows` - } - } - ) - - if (resp.status() !== 200) { - throw new Error( - `Failed to setup workflows directory: ${await resp.text()}` - ) - } - - await this.page.evaluate(async () => { - await window['app'].extensionManager.workflow.syncWorkflows() - }) - } - - async setupUser(username: string) { - const res = await this.request.get(`${this.url}/api/users`) - if (res.status() !== 200) - throw new Error(`Failed to retrieve users: ${await res.text()}`) - - const apiRes = await res.json() - const user = Object.entries(apiRes?.users ?? {}).find( - ([, name]) => name === username - ) - const id = user?.[0] - - return id ? id : await this.createUser(username) - } - - async createUser(username: string) { - const resp = await this.request.post(`${this.url}/api/users`, { - data: { username } - }) - - if (resp.status() !== 200) - throw new Error(`Failed to create user: ${await resp.text()}`) - - return await resp.json() - } + /** + * Setup workflows directory structure. Implementation varies by environment. + * @param structure - Folder structure to create + */ + abstract setupWorkflowsDirectory(structure: FolderStructure): Promise - async setupSettings(settings: Record) { - const resp = await this.request.post( - `${this.url}/api/devtools/set_settings`, - { - data: settings - } - ) + /** + * Setup user for testing. Implementation varies by environment. + * @param username - Username to setup + * @returns User ID or null if not applicable + */ + abstract setupUser(username: string): Promise - if (resp.status() !== 200) { - throw new Error(`Failed to setup settings: ${await resp.text()}`) - } - } + /** + * Setup settings for testing. Implementation varies by environment. + * @param settings - Settings object to apply + */ + abstract setupSettings(settings: Record): Promise setupHistory(): TaskHistory { this._history ??= new TaskHistory(this) @@ -1635,12 +1599,14 @@ export const comfyPageFixture = base.extend<{ comfyMouse: ComfyMouse }>({ comfyPage: async ({ page, request }, use, testInfo) => { - const comfyPage = new ComfyPage(page, request) + const comfyPage = new LocalhostComfyPage(page, request) const { parallelIndex } = testInfo const username = `playwright-test-${parallelIndex}` const userId = await comfyPage.setupUser(username) - comfyPage.userIds[parallelIndex] = userId + if (userId) { + comfyPage.userIds[parallelIndex] = userId + } try { await comfyPage.setupSettings({ diff --git a/browser_tests/fixtures/ComfyPageCloud.ts b/browser_tests/fixtures/ComfyPageCloud.ts new file mode 100644 index 0000000000..cce53ae0d2 --- /dev/null +++ b/browser_tests/fixtures/ComfyPageCloud.ts @@ -0,0 +1,48 @@ +import { test as base } from '@playwright/test' + +import { CloudComfyPage } from './CloudComfyPage' +import { ComfyMouse } from './ComfyMouse' +import type { ComfyPage } from './ComfyPage' + +/** + * Cloud-specific fixture for ComfyPage. + * Uses Firebase auth persisted from globalSetupCloud.ts. + */ +export const comfyPageCloudFixture = base.extend<{ + comfyPage: ComfyPage + comfyMouse: ComfyMouse +}>({ + // Use the storageState saved by globalSetupCloud + storageState: 'browser_tests/.auth/cloudUser.json', + + comfyPage: async ({ page, request }, use) => { + const comfyPage = new CloudComfyPage(page, request) + + // Note: No setupUser needed - Firebase auth persisted via storageState + // Setup cloud-specific settings (optional - can customize per test) + try { + await comfyPage.setupSettings({ + 'Comfy.UseNewMenu': 'Top', + // Hide canvas menu/info/selection toolbox by default. + 'Comfy.Graph.CanvasInfo': false, + 'Comfy.Graph.CanvasMenu': false, + 'Comfy.Canvas.SelectionToolbox': false, + // Disable tooltips by default to avoid flakiness. + 'Comfy.EnableTooltips': false, + // Set tutorial completed to true to avoid loading the tutorial workflow. + 'Comfy.TutorialCompleted': true + }) + } catch (e) { + console.error('Failed to setup cloud settings:', e) + } + + // Don't mock releases for cloud - cloud handles its own releases + await comfyPage.setup({ mockReleases: false }) + await use(comfyPage) + }, + + comfyMouse: async ({ comfyPage }, use) => { + const comfyMouse = new ComfyMouse(comfyPage) + await use(comfyMouse) + } +}) diff --git a/browser_tests/fixtures/LocalhostComfyPage.ts b/browser_tests/fixtures/LocalhostComfyPage.ts new file mode 100644 index 0000000000..30807ca9e3 --- /dev/null +++ b/browser_tests/fixtures/LocalhostComfyPage.ts @@ -0,0 +1,74 @@ +import type { APIRequestContext, Page } from '@playwright/test' + +import { ComfyPage } from './ComfyPage' +import type { FolderStructure } from './ComfyPage' + +/** + * Localhost-specific implementation of ComfyPage. + * Uses devtools API and multi-user mode for test isolation. + */ +export class LocalhostComfyPage extends ComfyPage { + constructor(page: Page, request: APIRequestContext) { + super(page, request) + } + + async setupWorkflowsDirectory(structure: FolderStructure): Promise { + const resp = await this.request.post( + `${this.url}/api/devtools/setup_folder_structure`, + { + data: { + tree_structure: this.convertLeafToContent(structure), + base_path: `user/${this.id}/workflows` + } + } + ) + + if (resp.status() !== 200) { + throw new Error( + `Failed to setup workflows directory: ${await resp.text()}` + ) + } + + await this.page.evaluate(async () => { + await window['app'].extensionManager.workflow.syncWorkflows() + }) + } + + async setupUser(username: string): Promise { + const res = await this.request.get(`${this.url}/api/users`) + if (res.status() !== 200) + throw new Error(`Failed to retrieve users: ${await res.text()}`) + + const apiRes = await res.json() + const user = Object.entries(apiRes?.users ?? {}).find( + ([, name]) => name === username + ) + const id = user?.[0] + + return id ? id : await this.createUser(username) + } + + private async createUser(username: string): Promise { + const resp = await this.request.post(`${this.url}/api/users`, { + data: { username } + }) + + if (resp.status() !== 200) + throw new Error(`Failed to create user: ${await resp.text()}`) + + return await resp.json() + } + + async setupSettings(settings: Record): Promise { + const resp = await this.request.post( + `${this.url}/api/devtools/set_settings`, + { + data: settings + } + ) + + if (resp.status() !== 200) { + throw new Error(`Failed to setup settings: ${await resp.text()}`) + } + } +} diff --git a/browser_tests/globalSetupCloud.ts b/browser_tests/globalSetupCloud.ts new file mode 100644 index 0000000000..02ff6be23f --- /dev/null +++ b/browser_tests/globalSetupCloud.ts @@ -0,0 +1,66 @@ +import { chromium } from '@playwright/test' +import type { FullConfig } from '@playwright/test' +import dotenv from 'dotenv' +import * as fs from 'fs' +import * as path from 'path' + +dotenv.config() + +/** + * Global setup for cloud tests. + * Authenticates with Firebase and saves auth state for test reuse. + */ +export default async function globalSetupCloud(config: FullConfig) { + const CLOUD_TEST_EMAIL = process.env.CLOUD_TEST_EMAIL + const CLOUD_TEST_PASSWORD = process.env.CLOUD_TEST_PASSWORD + + if (!CLOUD_TEST_EMAIL || !CLOUD_TEST_PASSWORD) { + throw new Error( + 'CLOUD_TEST_EMAIL and CLOUD_TEST_PASSWORD must be set in environment variables' + ) + } + + const browser = await chromium.launch() + const context = await browser.newContext() + const page = await context.newPage() + + try { + // Navigate to cloud login page + await page.goto('https://stagingcloud.comfy.org/cloud/login', { + waitUntil: 'networkidle', + timeout: 30000 + }) + + // Fill in email and password + await page.fill('input[type="email"]', CLOUD_TEST_EMAIL) + await page.fill('input[type="password"]', CLOUD_TEST_PASSWORD) + + // Click login button + await page.click('button[type="submit"]') + + // Wait for redirect to main app (adjust selector as needed) + await page.waitForURL('**/', { timeout: 30000 }) + + // Wait for app to be fully loaded + await page.waitForFunction( + () => window['app'] && window['app'].extensionManager, + { timeout: 30000 } + ) + + // Ensure .auth directory exists + const authDir = path.join(__dirname, '.auth') + if (!fs.existsSync(authDir)) { + fs.mkdirSync(authDir, { recursive: true }) + } + + // Save authentication state (includes localStorage with Firebase tokens) + await context.storageState({ + path: 'browser_tests/.auth/cloudUser.json' + }) + } catch (error) { + console.error('❌ Failed to authenticate:', error) + throw error + } finally { + await browser.close() + } +} diff --git a/browser_tests/tests/cloud.spec.ts b/browser_tests/tests/cloud.spec.ts new file mode 100644 index 0000000000..88b833d1a4 --- /dev/null +++ b/browser_tests/tests/cloud.spec.ts @@ -0,0 +1,49 @@ +/** + * @cloud + * Cloud E2E tests. + * Tests run against stagingcloud.comfy.org with authenticated user. + */ + +import { expect } from '@playwright/test' + +import { comfyPageCloudFixture as test } from '../fixtures/ComfyPageCloud' + +test.describe('Cloud E2E @cloud', () => { + test('loads app with authentication', async ({ comfyPage }) => { + // App should be loaded from setup() + await expect(comfyPage.canvas).toBeVisible() + + // Verify we're authenticated (cloud-specific check) + const isAuthenticated = await comfyPage.page.evaluate(() => { + // Check for Firebase auth in localStorage + const keys = Object.keys(localStorage) + return keys.some( + (key) => key.startsWith('firebase:') || key.includes('authUser') + ) + }) + expect(isAuthenticated).toBe(true) + }) + + test('can interact with canvas', async ({ comfyPage }) => { + // Basic canvas interaction + await comfyPage.doubleClickCanvas() + await expect(comfyPage.searchBox.input).toBeVisible() + + // Close search box + await comfyPage.page.keyboard.press('Escape') + await expect(comfyPage.searchBox.input).not.toBeVisible() + }) + + test('can access settings dialog', async ({ comfyPage }) => { + // Open settings dialog + await comfyPage.page.click('button[data-testid="settings-button"]', { + timeout: 10000 + }) + + // Settings dialog should be visible + await expect(comfyPage.page.locator('.p-dialog')).toBeVisible() + + // Close settings + await comfyPage.closeDialog() + }) +}) diff --git a/playwright.cloud.config.ts b/playwright.cloud.config.ts new file mode 100644 index 0000000000..643c7a32c0 --- /dev/null +++ b/playwright.cloud.config.ts @@ -0,0 +1,34 @@ +import { defineConfig, devices } from '@playwright/test' + +/** + * Playwright configuration for cloud E2E tests. + * Tests run against stagingcloud.comfy.org with authenticated user. + */ +export default defineConfig({ + testDir: './browser_tests/tests', + fullyParallel: true, + forbidOnly: !!process.env.CI, + reporter: 'html', + + // Cloud tests need more time due to network latency + timeout: 75000, // 5x the default 15000ms + retries: process.env.CI ? 2 : 0, + + use: { + trace: 'on-first-retry', + // Cloud URL - can override with PLAYWRIGHT_TEST_URL env var + baseURL: process.env.PLAYWRIGHT_TEST_URL || 'https://stagingcloud.comfy.org' + }, + + // Authenticate once before all tests + globalSetup: './browser_tests/globalSetupCloud.ts', + + projects: [ + { + name: 'chromium', + use: { ...devices['Desktop Chrome'] }, + timeout: 75000, + grep: /@cloud/ // Only run tests tagged with @cloud + } + ] +}) diff --git a/tsconfig.json b/tsconfig.json index 8319194dad..eeb5660a0c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -55,6 +55,7 @@ "eslint.config.ts", "global.d.ts", "knip.config.ts", + "playwright.cloud.config.ts", "src/**/*.vue", "src/**/*", "src/types/**/*.d.ts", From f306cc9bcbd41446633d7f1ad82726a0a436f48e Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 6 Nov 2025 19:49:48 -0700 Subject: [PATCH 02/13] refactor: Extract comfyPageFixture to separate file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes circular dependency between ComfyPage and LocalhostComfyPage. Changes: - Create browser_tests/fixtures/comfyPageFixture.ts with fixture - Remove fixture from ComfyPage.ts (keep abstract class only) - Re-export fixture from ComfyPage.ts for backward compatibility Now properly follows dependency hierarchy: - ComfyPage.ts (abstract) - no implementation imports - LocalhostComfyPage.ts → imports ComfyPage - comfyPageFixture.ts → imports both - Tests import from ComfyPage.ts (re-exported) --- browser_tests/fixtures/ComfyPage.ts | 51 ++------------------ browser_tests/fixtures/comfyPageFixture.ts | 56 ++++++++++++++++++++++ 2 files changed, 59 insertions(+), 48 deletions(-) create mode 100644 browser_tests/fixtures/comfyPageFixture.ts diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index 5c5e3364d8..868cde55d2 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -1,5 +1,5 @@ import type { APIRequestContext, Locator, Page } from '@playwright/test' -import { test as base, expect } from '@playwright/test' +import { expect } from '@playwright/test' import dotenv from 'dotenv' import * as fs from 'fs' @@ -7,11 +7,8 @@ import type { LGraphNode } from '../../src/lib/litegraph/src/litegraph' import type { NodeId } from '../../src/platform/workflow/validation/schemas/workflowSchema' import type { KeyCombo } from '../../src/schemas/keyBindingSchema' import type { useWorkspaceStore } from '../../src/stores/workspaceStore' -import { NodeBadgeMode } from '../../src/types/nodeSource' import { ComfyActionbar } from '../helpers/actionbar' import { ComfyTemplates } from '../helpers/templates' -import { ComfyMouse } from './ComfyMouse' -import { LocalhostComfyPage } from './LocalhostComfyPage' import { VueNodeHelpers } from './VueNodeHelpers' import { ComfyNodeSearchBox } from './components/ComfyNodeSearchBox' import { SettingDialog } from './components/SettingDialog' @@ -1594,50 +1591,8 @@ export abstract class ComfyPage { export const testComfySnapToGridGridSize = 50 -export const comfyPageFixture = base.extend<{ - comfyPage: ComfyPage - comfyMouse: ComfyMouse -}>({ - comfyPage: async ({ page, request }, use, testInfo) => { - const comfyPage = new LocalhostComfyPage(page, request) - - const { parallelIndex } = testInfo - const username = `playwright-test-${parallelIndex}` - const userId = await comfyPage.setupUser(username) - if (userId) { - comfyPage.userIds[parallelIndex] = userId - } - - try { - await comfyPage.setupSettings({ - 'Comfy.UseNewMenu': 'Top', - // Hide canvas menu/info/selection toolbox by default. - 'Comfy.Graph.CanvasInfo': false, - 'Comfy.Graph.CanvasMenu': false, - 'Comfy.Canvas.SelectionToolbox': false, - // Hide all badges by default. - 'Comfy.NodeBadge.NodeIdBadgeMode': NodeBadgeMode.None, - 'Comfy.NodeBadge.NodeSourceBadgeMode': NodeBadgeMode.None, - // Disable tooltips by default to avoid flakiness. - 'Comfy.EnableTooltips': false, - 'Comfy.userId': userId, - // Set tutorial completed to true to avoid loading the tutorial workflow. - 'Comfy.TutorialCompleted': true, - 'Comfy.SnapToGrid.GridSize': testComfySnapToGridGridSize, - 'Comfy.VueNodes.AutoScaleLayout': false - }) - } catch (e) { - console.error(e) - } - - await comfyPage.setup() - await use(comfyPage) - }, - comfyMouse: async ({ comfyPage }, use) => { - const comfyMouse = new ComfyMouse(comfyPage) - await use(comfyMouse) - } -}) +// Re-export fixture from separate file to avoid circular dependencies +export { comfyPageFixture } from './comfyPageFixture' const makeMatcher = function ( getValue: (node: NodeReference) => Promise | T, diff --git a/browser_tests/fixtures/comfyPageFixture.ts b/browser_tests/fixtures/comfyPageFixture.ts new file mode 100644 index 0000000000..bb74c42145 --- /dev/null +++ b/browser_tests/fixtures/comfyPageFixture.ts @@ -0,0 +1,56 @@ +import { test as base } from '@playwright/test' + +import { NodeBadgeMode } from '../../src/types/nodeSource' +import type { ComfyPage } from './ComfyPage' +import { testComfySnapToGridGridSize } from './ComfyPage' +import { ComfyMouse } from './ComfyMouse' +import { LocalhostComfyPage } from './LocalhostComfyPage' + +/** + * Localhost fixture for ComfyPage. + * Creates a test user and sets up default settings for stable testing. + */ +export const comfyPageFixture = base.extend<{ + comfyPage: ComfyPage + comfyMouse: ComfyMouse +}>({ + comfyPage: async ({ page, request }, use, testInfo) => { + const comfyPage = new LocalhostComfyPage(page, request) + + const { parallelIndex } = testInfo + const username = `playwright-test-${parallelIndex}` + const userId = await comfyPage.setupUser(username) + if (userId) { + comfyPage.userIds[parallelIndex] = userId + } + + try { + await comfyPage.setupSettings({ + 'Comfy.UseNewMenu': 'Top', + // Hide canvas menu/info/selection toolbox by default. + 'Comfy.Graph.CanvasInfo': false, + 'Comfy.Graph.CanvasMenu': false, + 'Comfy.Canvas.SelectionToolbox': false, + // Hide all badges by default. + 'Comfy.NodeBadge.NodeIdBadgeMode': NodeBadgeMode.None, + 'Comfy.NodeBadge.NodeSourceBadgeMode': NodeBadgeMode.None, + // Disable tooltips by default to avoid flakiness. + 'Comfy.EnableTooltips': false, + 'Comfy.userId': userId, + // Set tutorial completed to true to avoid loading the tutorial workflow. + 'Comfy.TutorialCompleted': true, + 'Comfy.SnapToGrid.GridSize': testComfySnapToGridGridSize, + 'Comfy.VueNodes.AutoScaleLayout': false + }) + } catch (e) { + console.error(e) + } + + await comfyPage.setup() + await use(comfyPage) + }, + comfyMouse: async ({ comfyPage }, use) => { + const comfyMouse = new ComfyMouse(comfyPage) + await use(comfyMouse) + } +}) From c44c3088c0efd7971875c642780cc65c5986de84 Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 6 Nov 2025 21:28:41 -0700 Subject: [PATCH 03/13] fix: Break circular dependency with shared constants file Circular dependency was caused by: - comfyPageFixture.ts importing testComfySnapToGridGridSize from ComfyPage.ts - ComfyPage.ts re-exporting comfyPageFixture Solution: - Extract testComfySnapToGridGridSize to constants.ts - Both files import from constants.ts - Only type-import ComfyPage in comfyPageFixture.ts Now clean dependency graph with no cycles. --- browser_tests/fixtures/ComfyPage.ts | 5 ++--- browser_tests/fixtures/comfyPageFixture.ts | 2 +- browser_tests/fixtures/constants.ts | 4 ++++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 browser_tests/fixtures/constants.ts diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index 868cde55d2..2febae8149 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -1589,9 +1589,8 @@ export abstract class ComfyPage { } } -export const testComfySnapToGridGridSize = 50 - -// Re-export fixture from separate file to avoid circular dependencies +// Re-export shared constants and fixture +export { testComfySnapToGridGridSize } from './constants' export { comfyPageFixture } from './comfyPageFixture' const makeMatcher = function ( diff --git a/browser_tests/fixtures/comfyPageFixture.ts b/browser_tests/fixtures/comfyPageFixture.ts index bb74c42145..956fca3866 100644 --- a/browser_tests/fixtures/comfyPageFixture.ts +++ b/browser_tests/fixtures/comfyPageFixture.ts @@ -2,8 +2,8 @@ import { test as base } from '@playwright/test' import { NodeBadgeMode } from '../../src/types/nodeSource' import type { ComfyPage } from './ComfyPage' -import { testComfySnapToGridGridSize } from './ComfyPage' import { ComfyMouse } from './ComfyMouse' +import { testComfySnapToGridGridSize } from './constants' import { LocalhostComfyPage } from './LocalhostComfyPage' /** diff --git a/browser_tests/fixtures/constants.ts b/browser_tests/fixtures/constants.ts new file mode 100644 index 0000000000..3da3cd5a0b --- /dev/null +++ b/browser_tests/fixtures/constants.ts @@ -0,0 +1,4 @@ +/** + * Shared constants for browser tests + */ +export const testComfySnapToGridGridSize = 50 From 24be8d123b05f192730ad4e714e842c962d74c61 Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 6 Nov 2025 22:55:25 -0700 Subject: [PATCH 04/13] fix: resolve circular dependency by removing comfyPageFixture re-export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove comfyPageFixture re-export from ComfyPage.ts - Update all test imports to use comfyPageFixture from its own file - Update README.md example to show correct import path - Fixes: comfyPageFixture → LocalhostComfyPage → ComfyPage circular import --- browser_tests/README.md | 2 +- browser_tests/fixtures/ComfyPage.ts | 1 - browser_tests/tests/actionbar.spec.ts | 2 +- browser_tests/tests/backgroundImageUpload.spec.ts | 2 +- browser_tests/tests/bottomPanelShortcuts.spec.ts | 2 +- browser_tests/tests/browserTabTitle.spec.ts | 2 +- browser_tests/tests/changeTracker.spec.ts | 6 ++---- browser_tests/tests/chatHistory.spec.ts | 2 +- browser_tests/tests/colorPalette.spec.ts | 2 +- browser_tests/tests/commands.spec.ts | 2 +- browser_tests/tests/copyPaste.spec.ts | 2 +- browser_tests/tests/customIcons.spec.ts | 2 +- browser_tests/tests/dialog.spec.ts | 2 +- browser_tests/tests/domWidget.spec.ts | 2 +- browser_tests/tests/execution.spec.ts | 2 +- browser_tests/tests/extensionAPI.spec.ts | 2 +- browser_tests/tests/featureFlags.spec.ts | 2 +- browser_tests/tests/graph.spec.ts | 2 +- browser_tests/tests/graphCanvasMenu.spec.ts | 2 +- browser_tests/tests/groupNode.spec.ts | 2 +- browser_tests/tests/interaction.spec.ts | 6 ++---- browser_tests/tests/keybindings.spec.ts | 2 +- browser_tests/tests/litegraphEvent.spec.ts | 2 +- browser_tests/tests/loadWorkflowInMedia.spec.ts | 2 +- browser_tests/tests/lodThreshold.spec.ts | 2 +- browser_tests/tests/menu.spec.ts | 2 +- browser_tests/tests/minimap.spec.ts | 2 +- browser_tests/tests/nodeBadge.spec.ts | 2 +- browser_tests/tests/nodeDisplay.spec.ts | 2 +- browser_tests/tests/nodeHelp.spec.ts | 2 +- browser_tests/tests/nodeSearchBox.spec.ts | 2 +- browser_tests/tests/noteNode.spec.ts | 2 +- browser_tests/tests/primitiveNode.spec.ts | 2 +- browser_tests/tests/recordAudio.spec.ts | 2 +- browser_tests/tests/releaseNotifications.spec.ts | 2 +- browser_tests/tests/remoteWidgets.spec.ts | 2 +- browser_tests/tests/rerouteNode.spec.ts | 2 +- browser_tests/tests/rightClickMenu.spec.ts | 2 +- browser_tests/tests/selectionToolbox.spec.ts | 2 +- browser_tests/tests/selectionToolboxSubmenus.spec.ts | 2 +- browser_tests/tests/sidebar/nodeLibrary.spec.ts | 2 +- browser_tests/tests/sidebar/queue.spec.ts | 2 +- browser_tests/tests/sidebar/workflows.spec.ts | 2 +- browser_tests/tests/subgraph-rename-dialog.spec.ts | 2 +- browser_tests/tests/subgraph.spec.ts | 2 +- browser_tests/tests/templates.spec.ts | 2 +- browser_tests/tests/useSettingSearch.spec.ts | 2 +- browser_tests/tests/versionMismatchWarnings.spec.ts | 2 +- browser_tests/tests/vueNodes/groups/groups.spec.ts | 2 +- .../tests/vueNodes/interactions/canvas/pan.spec.ts | 2 +- .../tests/vueNodes/interactions/canvas/zoom.spec.ts | 2 +- .../vueNodes/interactions/links/linkInteraction.spec.ts | 2 +- browser_tests/tests/vueNodes/interactions/node/move.spec.ts | 4 ++-- .../tests/vueNodes/interactions/node/remove.spec.ts | 2 +- .../tests/vueNodes/interactions/node/rename.spec.ts | 2 +- .../tests/vueNodes/interactions/node/select.spec.ts | 2 +- browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts | 2 +- browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts | 2 +- browser_tests/tests/vueNodes/nodeStates/colors.spec.ts | 2 +- browser_tests/tests/vueNodes/nodeStates/error.spec.ts | 2 +- browser_tests/tests/vueNodes/nodeStates/lod.spec.ts | 2 +- browser_tests/tests/vueNodes/nodeStates/mute.spec.ts | 2 +- browser_tests/tests/vueNodes/nodeStates/pin.spec.ts | 2 +- .../tests/vueNodes/widgets/int/integerWidget.spec.ts | 2 +- .../tests/vueNodes/widgets/load/uploadWidgets.spec.ts | 2 +- .../vueNodes/widgets/text/multilineStringWidget.spec.ts | 4 ++-- .../tests/vueNodes/widgets/widgetReactivity.spec.ts | 2 +- browser_tests/tests/widget.spec.ts | 2 +- browser_tests/tests/workflowTabThumbnail.spec.ts | 3 ++- 69 files changed, 73 insertions(+), 77 deletions(-) diff --git a/browser_tests/README.md b/browser_tests/README.md index 500d665c29..c673fae128 100644 --- a/browser_tests/README.md +++ b/browser_tests/README.md @@ -140,7 +140,7 @@ When writing new tests, follow these patterns: ```typescript // Import the test fixture -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.describe('Feature Name', () => { // Set up test environment if needed diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index 2febae8149..60667ee758 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -1591,7 +1591,6 @@ export abstract class ComfyPage { // Re-export shared constants and fixture export { testComfySnapToGridGridSize } from './constants' -export { comfyPageFixture } from './comfyPageFixture' const makeMatcher = function ( getValue: (node: NodeReference) => Promise | T, diff --git a/browser_tests/tests/actionbar.spec.ts b/browser_tests/tests/actionbar.spec.ts index bd086b4610..c411d2484e 100644 --- a/browser_tests/tests/actionbar.spec.ts +++ b/browser_tests/tests/actionbar.spec.ts @@ -2,7 +2,7 @@ import type { Response } from '@playwright/test' import { expect, mergeTests } from '@playwright/test' import type { StatusWsMessage } from '../../src/schemas/apiSchema.ts' -import { comfyPageFixture } from '../fixtures/ComfyPage.ts' +import { comfyPageFixture } from '../fixtures/comfyPageFixture.ts' import { webSocketFixture } from '../fixtures/ws.ts' const test = mergeTests(comfyPageFixture, webSocketFixture) diff --git a/browser_tests/tests/backgroundImageUpload.spec.ts b/browser_tests/tests/backgroundImageUpload.spec.ts index 7f3ed6a3d4..f12795ecc4 100644 --- a/browser_tests/tests/backgroundImageUpload.spec.ts +++ b/browser_tests/tests/backgroundImageUpload.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/bottomPanelShortcuts.spec.ts b/browser_tests/tests/bottomPanelShortcuts.spec.ts index 67a3670c53..653f4970db 100644 --- a/browser_tests/tests/bottomPanelShortcuts.spec.ts +++ b/browser_tests/tests/bottomPanelShortcuts.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.describe('Bottom Panel Shortcuts', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/browserTabTitle.spec.ts b/browser_tests/tests/browserTabTitle.spec.ts index fd855ea4af..e5ca85f1f3 100644 --- a/browser_tests/tests/browserTabTitle.spec.ts +++ b/browser_tests/tests/browserTabTitle.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.describe('Browser tab title', () => { test.describe('Beta Menu', () => { diff --git a/browser_tests/tests/changeTracker.spec.ts b/browser_tests/tests/changeTracker.spec.ts index 8e39154f15..e81c59b5eb 100644 --- a/browser_tests/tests/changeTracker.spec.ts +++ b/browser_tests/tests/changeTracker.spec.ts @@ -1,8 +1,6 @@ import type { ComfyPage } from '../fixtures/ComfyPage' -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../fixtures/ComfyPage' async function beforeChange(comfyPage: ComfyPage) { await comfyPage.page.evaluate(() => { diff --git a/browser_tests/tests/chatHistory.spec.ts b/browser_tests/tests/chatHistory.spec.ts index c47a4d19b0..ee5bacdbe5 100644 --- a/browser_tests/tests/chatHistory.spec.ts +++ b/browser_tests/tests/chatHistory.spec.ts @@ -1,7 +1,7 @@ import type { Page } from '@playwright/test' import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/colorPalette.spec.ts b/browser_tests/tests/colorPalette.spec.ts index 6dd53c194f..66c1964a58 100644 --- a/browser_tests/tests/colorPalette.spec.ts +++ b/browser_tests/tests/colorPalette.spec.ts @@ -1,7 +1,7 @@ import { expect } from '@playwright/test' import type { Palette } from '../../src/schemas/colorPaletteSchema' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/commands.spec.ts b/browser_tests/tests/commands.spec.ts index e271f2e15c..a6fd02a0ad 100644 --- a/browser_tests/tests/commands.spec.ts +++ b/browser_tests/tests/commands.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/copyPaste.spec.ts b/browser_tests/tests/copyPaste.spec.ts index cabb849e80..7bc0f1070d 100644 --- a/browser_tests/tests/copyPaste.spec.ts +++ b/browser_tests/tests/copyPaste.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/customIcons.spec.ts b/browser_tests/tests/customIcons.spec.ts index da640fd895..786da0ce76 100644 --- a/browser_tests/tests/customIcons.spec.ts +++ b/browser_tests/tests/customIcons.spec.ts @@ -1,7 +1,7 @@ import { expect } from '@playwright/test' import type { Locator } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' async function verifyCustomIconSvg(iconElement: Locator) { const svgVariable = await iconElement.evaluate((element) => { diff --git a/browser_tests/tests/dialog.spec.ts b/browser_tests/tests/dialog.spec.ts index 9ccd4cd67a..bedf7cf83d 100644 --- a/browser_tests/tests/dialog.spec.ts +++ b/browser_tests/tests/dialog.spec.ts @@ -2,7 +2,7 @@ import type { Locator } from '@playwright/test' import { expect } from '@playwright/test' import type { Keybinding } from '../../src/schemas/keyBindingSchema' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/domWidget.spec.ts b/browser_tests/tests/domWidget.spec.ts index 02392f51d5..1c5f6199d4 100644 --- a/browser_tests/tests/domWidget.spec.ts +++ b/browser_tests/tests/domWidget.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/execution.spec.ts b/browser_tests/tests/execution.spec.ts index 075025a3ab..8196f8a994 100644 --- a/browser_tests/tests/execution.spec.ts +++ b/browser_tests/tests/execution.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/extensionAPI.spec.ts b/browser_tests/tests/extensionAPI.spec.ts index 38f4a6c1de..6b440aeb30 100644 --- a/browser_tests/tests/extensionAPI.spec.ts +++ b/browser_tests/tests/extensionAPI.spec.ts @@ -1,7 +1,7 @@ import { expect } from '@playwright/test' import type { SettingParams } from '../../src/platform/settings/types' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.describe('Topbar commands', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/featureFlags.spec.ts b/browser_tests/tests/featureFlags.spec.ts index 38286b3990..c1dd2508b2 100644 --- a/browser_tests/tests/featureFlags.spec.ts +++ b/browser_tests/tests/featureFlags.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/graph.spec.ts b/browser_tests/tests/graph.spec.ts index cd89e92d5f..32746405ea 100644 --- a/browser_tests/tests/graph.spec.ts +++ b/browser_tests/tests/graph.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/graphCanvasMenu.spec.ts b/browser_tests/tests/graphCanvasMenu.spec.ts index fc8385e497..67ef6cd884 100644 --- a/browser_tests/tests/graphCanvasMenu.spec.ts +++ b/browser_tests/tests/graphCanvasMenu.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/groupNode.spec.ts b/browser_tests/tests/groupNode.spec.ts index 5bbda7b03b..5efb45fa08 100644 --- a/browser_tests/tests/groupNode.spec.ts +++ b/browser_tests/tests/groupNode.spec.ts @@ -1,7 +1,7 @@ import { expect } from '@playwright/test' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' import type { ComfyPage } from '../fixtures/ComfyPage' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' import type { NodeReference } from '../fixtures/utils/litegraphUtils' test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/interaction.spec.ts b/browser_tests/tests/interaction.spec.ts index 454b56ccf8..3a5c699bd6 100644 --- a/browser_tests/tests/interaction.spec.ts +++ b/browser_tests/tests/interaction.spec.ts @@ -2,11 +2,9 @@ import type { Locator } from '@playwright/test' import { expect } from '@playwright/test' import type { Position } from '@vueuse/core' -import { - comfyPageFixture as test, - testComfySnapToGridGridSize -} from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' import type { ComfyPage } from '../fixtures/ComfyPage' +import { testComfySnapToGridGridSize } from '../fixtures/ComfyPage' import type { NodeReference } from '../fixtures/utils/litegraphUtils' test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/keybindings.spec.ts b/browser_tests/tests/keybindings.spec.ts index f4244ae669..de486da34e 100644 --- a/browser_tests/tests/keybindings.spec.ts +++ b/browser_tests/tests/keybindings.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/litegraphEvent.spec.ts b/browser_tests/tests/litegraphEvent.spec.ts index 184943fe05..4bc9a01f96 100644 --- a/browser_tests/tests/litegraphEvent.spec.ts +++ b/browser_tests/tests/litegraphEvent.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/loadWorkflowInMedia.spec.ts b/browser_tests/tests/loadWorkflowInMedia.spec.ts index f091058d24..d48408c626 100644 --- a/browser_tests/tests/loadWorkflowInMedia.spec.ts +++ b/browser_tests/tests/loadWorkflowInMedia.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/lodThreshold.spec.ts b/browser_tests/tests/lodThreshold.spec.ts index 154ac3c16f..fa2d153a6d 100644 --- a/browser_tests/tests/lodThreshold.spec.ts +++ b/browser_tests/tests/lodThreshold.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/menu.spec.ts b/browser_tests/tests/menu.spec.ts index 2c3ffb3d46..13fcb5ff82 100644 --- a/browser_tests/tests/menu.spec.ts +++ b/browser_tests/tests/menu.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.describe('Menu', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/minimap.spec.ts b/browser_tests/tests/minimap.spec.ts index cea5fe9a80..6775b0ceef 100644 --- a/browser_tests/tests/minimap.spec.ts +++ b/browser_tests/tests/minimap.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.describe('Minimap', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/nodeBadge.spec.ts b/browser_tests/tests/nodeBadge.spec.ts index 111efe29cf..9ca02f64df 100644 --- a/browser_tests/tests/nodeBadge.spec.ts +++ b/browser_tests/tests/nodeBadge.spec.ts @@ -2,7 +2,7 @@ import { expect } from '@playwright/test' import type { ComfyApp } from '../../src/scripts/app' import { NodeBadgeMode } from '../../src/types/nodeSource' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/nodeDisplay.spec.ts b/browser_tests/tests/nodeDisplay.spec.ts index fdaae14bcb..76b9d756b7 100644 --- a/browser_tests/tests/nodeDisplay.spec.ts +++ b/browser_tests/tests/nodeDisplay.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/nodeHelp.spec.ts b/browser_tests/tests/nodeHelp.spec.ts index 7648492860..4d092336fd 100644 --- a/browser_tests/tests/nodeHelp.spec.ts +++ b/browser_tests/tests/nodeHelp.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../fixtures/ComfyPage' +} from '../fixtures/comfyPageFixture' // TODO: there might be a better solution for this // Helper function to pan canvas and select node diff --git a/browser_tests/tests/nodeSearchBox.spec.ts b/browser_tests/tests/nodeSearchBox.spec.ts index 98ba335836..97b4d92fe4 100644 --- a/browser_tests/tests/nodeSearchBox.spec.ts +++ b/browser_tests/tests/nodeSearchBox.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../fixtures/ComfyPage' +} from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/noteNode.spec.ts b/browser_tests/tests/noteNode.spec.ts index 52dc575423..df519e8ca2 100644 --- a/browser_tests/tests/noteNode.spec.ts +++ b/browser_tests/tests/noteNode.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/primitiveNode.spec.ts b/browser_tests/tests/primitiveNode.spec.ts index 0584a3bec2..0d91c8bd9f 100644 --- a/browser_tests/tests/primitiveNode.spec.ts +++ b/browser_tests/tests/primitiveNode.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' import type { NodeReference } from '../fixtures/utils/litegraphUtils' test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/recordAudio.spec.ts b/browser_tests/tests/recordAudio.spec.ts index cc0ac3684f..335750264a 100644 --- a/browser_tests/tests/recordAudio.spec.ts +++ b/browser_tests/tests/recordAudio.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/releaseNotifications.spec.ts b/browser_tests/tests/releaseNotifications.spec.ts index 19d09327d0..1342b6a710 100644 --- a/browser_tests/tests/releaseNotifications.spec.ts +++ b/browser_tests/tests/releaseNotifications.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.describe('Release Notifications', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/remoteWidgets.spec.ts b/browser_tests/tests/remoteWidgets.spec.ts index 7a54cae07b..7290b2a3ca 100644 --- a/browser_tests/tests/remoteWidgets.spec.ts +++ b/browser_tests/tests/remoteWidgets.spec.ts @@ -1,7 +1,7 @@ import { expect } from '@playwright/test' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' import type { ComfyPage } from '../fixtures/ComfyPage' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' test.describe('Remote COMBO Widget', () => { const mockOptions = ['d', 'c', 'b', 'a'] diff --git a/browser_tests/tests/rerouteNode.spec.ts b/browser_tests/tests/rerouteNode.spec.ts index 0b2b1e0f62..95e1102aff 100644 --- a/browser_tests/tests/rerouteNode.spec.ts +++ b/browser_tests/tests/rerouteNode.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' import { getMiddlePoint } from '../fixtures/utils/litegraphUtils' test.describe('Reroute Node', () => { diff --git a/browser_tests/tests/rightClickMenu.spec.ts b/browser_tests/tests/rightClickMenu.spec.ts index f7718122b7..e60487af25 100644 --- a/browser_tests/tests/rightClickMenu.spec.ts +++ b/browser_tests/tests/rightClickMenu.spec.ts @@ -1,7 +1,7 @@ import { expect } from '@playwright/test' import { NodeBadgeMode } from '../../src/types/nodeSource' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/selectionToolbox.spec.ts b/browser_tests/tests/selectionToolbox.spec.ts index 6b85769826..007988be02 100644 --- a/browser_tests/tests/selectionToolbox.spec.ts +++ b/browser_tests/tests/selectionToolbox.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture } from '../fixtures/ComfyPage' +import { comfyPageFixture } from '../fixtures/comfyPageFixture' const test = comfyPageFixture diff --git a/browser_tests/tests/selectionToolboxSubmenus.spec.ts b/browser_tests/tests/selectionToolboxSubmenus.spec.ts index db63261528..923e572b9d 100644 --- a/browser_tests/tests/selectionToolboxSubmenus.spec.ts +++ b/browser_tests/tests/selectionToolboxSubmenus.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/sidebar/nodeLibrary.spec.ts b/browser_tests/tests/sidebar/nodeLibrary.spec.ts index 58f2ae4484..53e8c3442d 100644 --- a/browser_tests/tests/sidebar/nodeLibrary.spec.ts +++ b/browser_tests/tests/sidebar/nodeLibrary.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../../fixtures/comfyPageFixture' test.describe('Node library sidebar', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/sidebar/queue.spec.ts b/browser_tests/tests/sidebar/queue.spec.ts index 39e2ced6e1..b69f33a84d 100644 --- a/browser_tests/tests/sidebar/queue.spec.ts +++ b/browser_tests/tests/sidebar/queue.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../../fixtures/comfyPageFixture' test.describe.skip('Queue sidebar', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/sidebar/workflows.spec.ts b/browser_tests/tests/sidebar/workflows.spec.ts index 1b3f21ff4d..a85fa4e43f 100644 --- a/browser_tests/tests/sidebar/workflows.spec.ts +++ b/browser_tests/tests/sidebar/workflows.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../../fixtures/comfyPageFixture' test.describe('Workflows sidebar', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/subgraph-rename-dialog.spec.ts b/browser_tests/tests/subgraph-rename-dialog.spec.ts index 0bdb9766df..95f17c43b3 100644 --- a/browser_tests/tests/subgraph-rename-dialog.spec.ts +++ b/browser_tests/tests/subgraph-rename-dialog.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' // Constants const INITIAL_NAME = 'initial_slot_name' diff --git a/browser_tests/tests/subgraph.spec.ts b/browser_tests/tests/subgraph.spec.ts index 87ea504bb5..3f12e971fc 100644 --- a/browser_tests/tests/subgraph.spec.ts +++ b/browser_tests/tests/subgraph.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' // Constants const RENAMED_INPUT_NAME = 'renamed_input' diff --git a/browser_tests/tests/templates.spec.ts b/browser_tests/tests/templates.spec.ts index 6252332135..e9530ecdae 100644 --- a/browser_tests/tests/templates.spec.ts +++ b/browser_tests/tests/templates.spec.ts @@ -1,7 +1,7 @@ import type { Page } from '@playwright/test' import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' async function checkTemplateFileExists( page: Page, diff --git a/browser_tests/tests/useSettingSearch.spec.ts b/browser_tests/tests/useSettingSearch.spec.ts index a817616f8b..0dd936ae93 100644 --- a/browser_tests/tests/useSettingSearch.spec.ts +++ b/browser_tests/tests/useSettingSearch.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/versionMismatchWarnings.spec.ts b/browser_tests/tests/versionMismatchWarnings.spec.ts index 4b3ff3e309..78885957fb 100644 --- a/browser_tests/tests/versionMismatchWarnings.spec.ts +++ b/browser_tests/tests/versionMismatchWarnings.spec.ts @@ -1,7 +1,7 @@ import { expect } from '@playwright/test' import type { SystemStats } from '../../src/schemas/apiSchema' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.describe('Version Mismatch Warnings', () => { const ALWAYS_AHEAD_OF_INSTALLED_VERSION = '100.100.100' diff --git a/browser_tests/tests/vueNodes/groups/groups.spec.ts b/browser_tests/tests/vueNodes/groups/groups.spec.ts index fcfb0efad5..11eef9d221 100644 --- a/browser_tests/tests/vueNodes/groups/groups.spec.ts +++ b/browser_tests/tests/vueNodes/groups/groups.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../fixtures/ComfyPage' +} from '../../../fixtures/comfyPageFixture' const CREATE_GROUP_HOTKEY = 'Control+g' diff --git a/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts b/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts index a91a9b928c..e5f3ba74cb 100644 --- a/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../../fixtures/ComfyPage' +} from '../../../../fixtures/comfyPageFixture' test.describe('Vue Nodes Canvas Pan', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts b/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts index b87309f10f..07e05353db 100644 --- a/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../../fixtures/ComfyPage' +} from '../../../../fixtures/comfyPageFixture' test.describe('Vue Nodes Zoom', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts index 2da4b11227..fc4ca5050e 100644 --- a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts @@ -5,7 +5,7 @@ import { getSlotKey } from '../../../../../src/renderer/core/layout/slots/slotId import { comfyExpect as expect, comfyPageFixture as test -} from '../../../../fixtures/ComfyPage' +} from '../../../../fixtures/comfyPageFixture' import { getMiddlePoint } from '../../../../fixtures/utils/litegraphUtils' import { fitToViewInstant } from '../../../../helpers/fitToView' diff --git a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts index ac4759934e..7f63938329 100644 --- a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts @@ -1,8 +1,8 @@ import { - type ComfyPage, comfyExpect as expect, comfyPageFixture as test -} from '../../../../fixtures/ComfyPage' +} from '../../../../fixtures/comfyPageFixture' +import type { ComfyPage } from '../../../../fixtures/comfyPageFixture' import type { Position } from '../../../../fixtures/types' test.describe('Vue Node Moving', () => { diff --git a/browser_tests/tests/vueNodes/interactions/node/remove.spec.ts b/browser_tests/tests/vueNodes/interactions/node/remove.spec.ts index e7a6106435..86a13d25c2 100644 --- a/browser_tests/tests/vueNodes/interactions/node/remove.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/remove.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../../../../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts b/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts index 5cd6b2feaa..2bf0767fa2 100644 --- a/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../../fixtures/ComfyPage' +} from '../../../../fixtures/comfyPageFixture' test.describe('Vue Nodes Renaming', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/interactions/node/select.spec.ts b/browser_tests/tests/vueNodes/interactions/node/select.spec.ts index 98b0a63f62..67456c81f4 100644 --- a/browser_tests/tests/vueNodes/interactions/node/select.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/select.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../../fixtures/ComfyPage' +} from '../../../../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts b/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts index 7074bbc2d7..a4cf8ea9fe 100644 --- a/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../fixtures/ComfyPage' +} from '../../../fixtures/comfyPageFixture' const BYPASS_HOTKEY = 'Control+b' const BYPASS_CLASS = /before:bg-bypass\/60/ diff --git a/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts b/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts index 8e8e22995a..008c06faa0 100644 --- a/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../fixtures/ComfyPage' +} from '../../../fixtures/comfyPageFixture' test.describe('Vue Node Collapse', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts b/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts index e61e3ca013..2f46596f5e 100644 --- a/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../fixtures/ComfyPage' +} from '../../../fixtures/comfyPageFixture' test.describe('Vue Node Custom Colors', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/nodeStates/error.spec.ts b/browser_tests/tests/vueNodes/nodeStates/error.spec.ts index b8c718239c..4394f5d4f8 100644 --- a/browser_tests/tests/vueNodes/nodeStates/error.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/error.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../fixtures/ComfyPage' +} from '../../../fixtures/comfyPageFixture' const ERROR_CLASS = /border-node-stroke-error/ diff --git a/browser_tests/tests/vueNodes/nodeStates/lod.spec.ts b/browser_tests/tests/vueNodes/nodeStates/lod.spec.ts index cfe0ba1b3b..4e8dfcdc26 100644 --- a/browser_tests/tests/vueNodes/nodeStates/lod.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/lod.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../../../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../../../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts b/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts index 3fe656ebc9..6eed8337df 100644 --- a/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../fixtures/ComfyPage' +} from '../../../fixtures/comfyPageFixture' const MUTE_HOTKEY = 'Control+m' const MUTE_OPACITY = '0.5' diff --git a/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts b/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts index 27f1ad1ac9..1e78dbe2d1 100644 --- a/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../fixtures/ComfyPage' +} from '../../../fixtures/comfyPageFixture' const PIN_HOTKEY = 'p' const PIN_INDICATOR = '[data-testid="node-pin-indicator"]' diff --git a/browser_tests/tests/vueNodes/widgets/int/integerWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/int/integerWidget.spec.ts index bb956e3395..f462dc7df5 100644 --- a/browser_tests/tests/vueNodes/widgets/int/integerWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/int/integerWidget.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../../fixtures/ComfyPage' +} from '../../../../fixtures/comfyPageFixture' test.describe('Vue Integer Widget', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts b/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts index 8fcc3360df..cc996ae800 100644 --- a/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../../fixtures/ComfyPage' +} from '../../../../fixtures/comfyPageFixture' test.describe('Vue Upload Widgets', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts index bb08232a29..ef36eafd29 100644 --- a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts @@ -1,8 +1,8 @@ import { - type ComfyPage, comfyExpect as expect, comfyPageFixture as test -} from '../../../../fixtures/ComfyPage' +} from '../../../../fixtures/comfyPageFixture' +import type { ComfyPage } from '../../../../fixtures/comfyPageFixture' test.describe('Vue Multiline String Widget', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts b/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts index 6f3701c127..120f86ac70 100644 --- a/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts @@ -1,7 +1,7 @@ import { comfyExpect as expect, comfyPageFixture as test -} from '../../../fixtures/ComfyPage' +} from '../../../fixtures/comfyPageFixture' test.describe('Vue Widget Reactivity', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/widget.spec.ts b/browser_tests/tests/widget.spec.ts index 3b9c057847..6145f6c59c 100644 --- a/browser_tests/tests/widget.spec.ts +++ b/browser_tests/tests/widget.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' -import { comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/workflowTabThumbnail.spec.ts b/browser_tests/tests/workflowTabThumbnail.spec.ts index 31b15067f6..d32299f401 100644 --- a/browser_tests/tests/workflowTabThumbnail.spec.ts +++ b/browser_tests/tests/workflowTabThumbnail.spec.ts @@ -1,6 +1,7 @@ import { expect } from '@playwright/test' -import { type ComfyPage, comfyPageFixture as test } from '../fixtures/ComfyPage' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' +import type { ComfyPage } from '../fixtures/ComfyPage' test.describe('Workflow Tab Thumbnails', () => { test.beforeEach(async ({ comfyPage }) => { From 54597f786e8e9942d632030ff5bf807132b248f6 Mon Sep 17 00:00:00 2001 From: bymyself Date: Fri, 7 Nov 2025 19:35:05 -0800 Subject: [PATCH 05/13] fix: import comfyExpect from ComfyPage not comfyPageFixture --- browser_tests/tests/nodeHelp.spec.ts | 6 ++---- browser_tests/tests/nodeSearchBox.spec.ts | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/browser_tests/tests/nodeHelp.spec.ts b/browser_tests/tests/nodeHelp.spec.ts index 4d092336fd..018a17dc2e 100644 --- a/browser_tests/tests/nodeHelp.spec.ts +++ b/browser_tests/tests/nodeHelp.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../fixtures/ComfyPage' // TODO: there might be a better solution for this // Helper function to pan canvas and select node diff --git a/browser_tests/tests/nodeSearchBox.spec.ts b/browser_tests/tests/nodeSearchBox.spec.ts index 97b4d92fe4..9564c06ed2 100644 --- a/browser_tests/tests/nodeSearchBox.spec.ts +++ b/browser_tests/tests/nodeSearchBox.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../fixtures/ComfyPage' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') From c5138692bf07a5364becd8e69fd68db1ba5ed580 Mon Sep 17 00:00:00 2001 From: bymyself Date: Tue, 11 Nov 2025 10:56:06 -0800 Subject: [PATCH 06/13] fix: import comfyExpect from ComfyPage in all vueNodes tests --- browser_tests/tests/vueNodes/groups/groups.spec.ts | 6 ++---- browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts | 6 ++---- browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts | 6 ++---- browser_tests/tests/vueNodes/nodeStates/colors.spec.ts | 6 ++---- browser_tests/tests/vueNodes/nodeStates/error.spec.ts | 6 ++---- browser_tests/tests/vueNodes/nodeStates/mute.spec.ts | 6 ++---- browser_tests/tests/vueNodes/nodeStates/pin.spec.ts | 6 ++---- .../tests/vueNodes/widgets/widgetReactivity.spec.ts | 6 ++---- 8 files changed, 16 insertions(+), 32 deletions(-) diff --git a/browser_tests/tests/vueNodes/groups/groups.spec.ts b/browser_tests/tests/vueNodes/groups/groups.spec.ts index 11eef9d221..4af86a4a3d 100644 --- a/browser_tests/tests/vueNodes/groups/groups.spec.ts +++ b/browser_tests/tests/vueNodes/groups/groups.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../fixtures/ComfyPage' const CREATE_GROUP_HOTKEY = 'Control+g' diff --git a/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts b/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts index a4cf8ea9fe..ba846a6dac 100644 --- a/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../fixtures/ComfyPage' const BYPASS_HOTKEY = 'Control+b' const BYPASS_CLASS = /before:bg-bypass\/60/ diff --git a/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts b/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts index 008c06faa0..cd714abf95 100644 --- a/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../fixtures/ComfyPage' test.describe('Vue Node Collapse', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts b/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts index 2f46596f5e..fa0155301f 100644 --- a/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../fixtures/ComfyPage' test.describe('Vue Node Custom Colors', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/nodeStates/error.spec.ts b/browser_tests/tests/vueNodes/nodeStates/error.spec.ts index 4394f5d4f8..d08c8b9447 100644 --- a/browser_tests/tests/vueNodes/nodeStates/error.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/error.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../fixtures/ComfyPage' const ERROR_CLASS = /border-node-stroke-error/ diff --git a/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts b/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts index 6eed8337df..1b1470f9be 100644 --- a/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../fixtures/ComfyPage' const MUTE_HOTKEY = 'Control+m' const MUTE_OPACITY = '0.5' diff --git a/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts b/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts index 1e78dbe2d1..96b995302c 100644 --- a/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../fixtures/ComfyPage' const PIN_HOTKEY = 'p' const PIN_INDICATOR = '[data-testid="node-pin-indicator"]' diff --git a/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts b/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts index 120f86ac70..ec3706ee3c 100644 --- a/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../fixtures/ComfyPage' test.describe('Vue Widget Reactivity', () => { test.beforeEach(async ({ comfyPage }) => { From 34d7f4b7df24569d445c336aa23677a61f10432f Mon Sep 17 00:00:00 2001 From: bymyself Date: Tue, 11 Nov 2025 11:47:42 -0800 Subject: [PATCH 07/13] fix: import comfyExpect from ComfyPage in 4-level vueNodes tests --- .../tests/vueNodes/interactions/canvas/pan.spec.ts | 6 ++---- .../tests/vueNodes/interactions/canvas/zoom.spec.ts | 6 ++---- .../vueNodes/interactions/links/linkInteraction.spec.ts | 6 ++---- .../tests/vueNodes/interactions/node/move.spec.ts | 8 +++----- .../tests/vueNodes/interactions/node/rename.spec.ts | 6 ++---- .../tests/vueNodes/interactions/node/select.spec.ts | 6 ++---- .../tests/vueNodes/widgets/int/integerWidget.spec.ts | 6 ++---- .../tests/vueNodes/widgets/load/uploadWidgets.spec.ts | 6 ++---- .../vueNodes/widgets/text/multilineStringWidget.spec.ts | 8 +++----- 9 files changed, 20 insertions(+), 38 deletions(-) diff --git a/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts b/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts index e5f3ba74cb..506b344181 100644 --- a/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../../fixtures/ComfyPage' test.describe('Vue Nodes Canvas Pan', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts b/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts index 07e05353db..2cbfda7f3e 100644 --- a/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../../fixtures/ComfyPage' test.describe('Vue Nodes Zoom', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts index fc4ca5050e..23606837d7 100644 --- a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts @@ -2,10 +2,8 @@ import type { Locator, Page } from '@playwright/test' import type { NodeId } from '../../../../../src/platform/workflow/validation/schemas/workflowSchema' import { getSlotKey } from '../../../../../src/renderer/core/layout/slots/slotIdentifier' -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../../fixtures/ComfyPage' import { getMiddlePoint } from '../../../../fixtures/utils/litegraphUtils' import { fitToViewInstant } from '../../../../helpers/fitToView' diff --git a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts index 7f63938329..633d14441c 100644 --- a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts @@ -1,8 +1,6 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../../fixtures/comfyPageFixture' -import type { ComfyPage } from '../../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../../fixtures/ComfyPage' +import type { ComfyPage } from '../../../../fixtures/ComfyPage' import type { Position } from '../../../../fixtures/types' test.describe('Vue Node Moving', () => { diff --git a/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts b/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts index 2bf0767fa2..5c786a3cbd 100644 --- a/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../../fixtures/ComfyPage' test.describe('Vue Nodes Renaming', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/interactions/node/select.spec.ts b/browser_tests/tests/vueNodes/interactions/node/select.spec.ts index 67456c81f4..ccf8dcdb6c 100644 --- a/browser_tests/tests/vueNodes/interactions/node/select.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/select.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../../fixtures/ComfyPage' test.beforeEach(async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') diff --git a/browser_tests/tests/vueNodes/widgets/int/integerWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/int/integerWidget.spec.ts index f462dc7df5..072f04da13 100644 --- a/browser_tests/tests/vueNodes/widgets/int/integerWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/int/integerWidget.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../../fixtures/ComfyPage' test.describe('Vue Integer Widget', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts b/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts index cc996ae800..b3ceea8308 100644 --- a/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts @@ -1,7 +1,5 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../../fixtures/ComfyPage' test.describe('Vue Upload Widgets', () => { test.beforeEach(async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts index ef36eafd29..d81c15cd45 100644 --- a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts @@ -1,8 +1,6 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../../fixtures/comfyPageFixture' -import type { ComfyPage } from '../../../../fixtures/comfyPageFixture' +import { comfyPageFixture as test } from '../../../../fixtures/comfyPageFixture' +import { comfyExpect as expect } from '../../../../fixtures/ComfyPage' +import type { ComfyPage } from '../../../../fixtures/ComfyPage' test.describe('Vue Multiline String Widget', () => { test.beforeEach(async ({ comfyPage }) => { From 730d8c229274c4267bef40c0a58dd6a955598b8c Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 13 Nov 2025 09:58:03 -0800 Subject: [PATCH 08/13] fix: pass parallelIndex to ComfyPage constructor instead of accessing fixture --- browser_tests/fixtures/CloudComfyPage.ts | 8 ++++++-- browser_tests/fixtures/ComfyPage.ts | 5 +++-- browser_tests/fixtures/LocalhostComfyPage.ts | 8 ++++++-- browser_tests/fixtures/comfyPageFixture.ts | 4 ++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/browser_tests/fixtures/CloudComfyPage.ts b/browser_tests/fixtures/CloudComfyPage.ts index 8df51081f7..3e21c3c91d 100644 --- a/browser_tests/fixtures/CloudComfyPage.ts +++ b/browser_tests/fixtures/CloudComfyPage.ts @@ -8,8 +8,12 @@ import type { FolderStructure } from './ComfyPage' * Uses Firebase auth persistence and cloud API for settings. */ export class CloudComfyPage extends ComfyPage { - constructor(page: Page, request: APIRequestContext) { - super(page, request) + constructor( + page: Page, + request: APIRequestContext, + parallelIndex: number = 0 + ) { + super(page, request, parallelIndex) } async setupUser(username: string): Promise { diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index 60667ee758..5fd8cfe233 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -158,12 +158,13 @@ export abstract class ComfyPage { /** Test user ID for the current context */ get id() { - return this.userIds[comfyPageFixture.info().parallelIndex] + return this.userIds[this.parallelIndex] } constructor( public readonly page: Page, - public readonly request: APIRequestContext + public readonly request: APIRequestContext, + public readonly parallelIndex: number = 0 ) { this.url = process.env.PLAYWRIGHT_TEST_URL || 'http://localhost:8188' this.canvas = page.locator('#graph-canvas') diff --git a/browser_tests/fixtures/LocalhostComfyPage.ts b/browser_tests/fixtures/LocalhostComfyPage.ts index 30807ca9e3..919ebb570b 100644 --- a/browser_tests/fixtures/LocalhostComfyPage.ts +++ b/browser_tests/fixtures/LocalhostComfyPage.ts @@ -8,8 +8,12 @@ import type { FolderStructure } from './ComfyPage' * Uses devtools API and multi-user mode for test isolation. */ export class LocalhostComfyPage extends ComfyPage { - constructor(page: Page, request: APIRequestContext) { - super(page, request) + constructor( + page: Page, + request: APIRequestContext, + parallelIndex: number = 0 + ) { + super(page, request, parallelIndex) } async setupWorkflowsDirectory(structure: FolderStructure): Promise { diff --git a/browser_tests/fixtures/comfyPageFixture.ts b/browser_tests/fixtures/comfyPageFixture.ts index 956fca3866..54a3f956fa 100644 --- a/browser_tests/fixtures/comfyPageFixture.ts +++ b/browser_tests/fixtures/comfyPageFixture.ts @@ -15,9 +15,9 @@ export const comfyPageFixture = base.extend<{ comfyMouse: ComfyMouse }>({ comfyPage: async ({ page, request }, use, testInfo) => { - const comfyPage = new LocalhostComfyPage(page, request) - const { parallelIndex } = testInfo + const comfyPage = new LocalhostComfyPage(page, request, parallelIndex) + const username = `playwright-test-${parallelIndex}` const userId = await comfyPage.setupUser(username) if (userId) { From 14ab045a0510acd64c21c49b94328084f03633bc Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 13 Nov 2025 14:51:42 -0800 Subject: [PATCH 09/13] fix: exclude @cloud tests from regular playwright runs, add playwright.config.ts to tsconfig --- playwright.config.ts | 2 +- tsconfig.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index b52daad7fe..ff20cee3d3 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -31,7 +31,7 @@ export default defineConfig({ name: 'chromium', use: { ...devices['Desktop Chrome'] }, timeout: 15000, - grepInvert: /@mobile/ // Run all tests except those tagged with @mobile + grepInvert: /@mobile|@cloud/ // Run all tests except those tagged with @mobile or @cloud }, { diff --git a/tsconfig.json b/tsconfig.json index eeb5660a0c..e28ffe807b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -55,6 +55,7 @@ "eslint.config.ts", "global.d.ts", "knip.config.ts", + "playwright.config.ts", "playwright.cloud.config.ts", "src/**/*.vue", "src/**/*", From d0d2789f780309a76e8d6a3ebbedbd94ce634ca9 Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 13 Nov 2025 18:25:13 -0800 Subject: [PATCH 10/13] feat: Add CI workflow for cloud E2E tests - Create ci-tests-e2e-cloud.yaml workflow - Manual trigger via workflow_dispatch - Uses CLOUD_TEST_EMAIL and CLOUD_TEST_PASSWORD secrets - Add CLOUD_TESTS.md documentation --- .github/workflows/ci-tests-e2e-cloud.yaml | 52 +++++++++++++++++++++++ browser_tests/tests/CLOUD_TESTS.md | 36 ++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 .github/workflows/ci-tests-e2e-cloud.yaml create mode 100644 browser_tests/tests/CLOUD_TESTS.md diff --git a/.github/workflows/ci-tests-e2e-cloud.yaml b/.github/workflows/ci-tests-e2e-cloud.yaml new file mode 100644 index 0000000000..1f8152b749 --- /dev/null +++ b/.github/workflows/ci-tests-e2e-cloud.yaml @@ -0,0 +1,52 @@ +name: "CI: Tests E2E Cloud" +description: "Cloud E2E testing with Playwright against stagingcloud.comfy.org" + +on: + workflow_dispatch: # Manual trigger for now + # Uncomment to enable on push/PR: + # push: + # branches: [cloud/*, main] + # pull_request: + # branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + playwright-tests-cloud: + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Setup frontend + uses: ./.github/actions/setup-frontend + with: + include_build_step: false # Cloud tests don't need build + + - name: Setup Playwright + uses: ./.github/actions/setup-playwright + + - name: Run Playwright cloud tests + id: playwright + env: + CLOUD_TEST_EMAIL: ${{ secrets.CLOUD_TEST_EMAIL }} + CLOUD_TEST_PASSWORD: ${{ secrets.CLOUD_TEST_PASSWORD }} + run: | + PLAYWRIGHT_JSON_OUTPUT_NAME=playwright-report/report.json \ + pnpm exec playwright test --config=playwright.cloud.config.ts \ + --reporter=list \ + --reporter=html \ + --reporter=json + + - name: Upload Playwright report + uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report-cloud + path: ./playwright-report/ + retention-days: 30 diff --git a/browser_tests/tests/CLOUD_TESTS.md b/browser_tests/tests/CLOUD_TESTS.md new file mode 100644 index 0000000000..a48f4504ff --- /dev/null +++ b/browser_tests/tests/CLOUD_TESTS.md @@ -0,0 +1,36 @@ +# Cloud E2E Tests + +## Setup + +Cloud tests run against `https://stagingcloud.comfy.org` with Firebase authentication. + +### Required GitHub Secrets + +Add these to repository settings → Secrets → Actions: + +- `CLOUD_TEST_EMAIL`: Firebase test account email +- `CLOUD_TEST_PASSWORD`: Firebase test account password + +### Running Locally + +```bash +# Set environment variables +export CLOUD_TEST_EMAIL="your-test-email@example.com" +export CLOUD_TEST_PASSWORD="your-password" + +# Run cloud tests +pnpm exec playwright test --config=playwright.cloud.config.ts +``` + +### Running in CI + +Workflow: `.github/workflows/ci-tests-e2e-cloud.yaml` + +Trigger manually via Actions tab → "CI: Tests E2E Cloud" → Run workflow + +### Test Structure + +- Tests tagged with `@cloud` run only in cloud config +- Auth handled once in `globalSetupCloud.ts` +- Auth state saved to `browser_tests/.auth/cloudUser.json` +- Cloud fixture in `fixtures/ComfyPageCloud.ts` From d6d79a834cae95788d2edadff9492b87dfd28734 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sat, 15 Nov 2025 13:23:33 -0800 Subject: [PATCH 11/13] feat: Enable cloud workflow on push/PR --- .github/workflows/ci-tests-e2e-cloud.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-tests-e2e-cloud.yaml b/.github/workflows/ci-tests-e2e-cloud.yaml index 1f8152b749..d83db60551 100644 --- a/.github/workflows/ci-tests-e2e-cloud.yaml +++ b/.github/workflows/ci-tests-e2e-cloud.yaml @@ -2,12 +2,11 @@ name: "CI: Tests E2E Cloud" description: "Cloud E2E testing with Playwright against stagingcloud.comfy.org" on: - workflow_dispatch: # Manual trigger for now - # Uncomment to enable on push/PR: - # push: - # branches: [cloud/*, main] - # pull_request: - # branches: [main] + workflow_dispatch: + push: + branches: [cloud/*, main] + pull_request: + branches: [main] concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 33e7c0491c0929630294995c8a99b026a6d6a703 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sat, 15 Nov 2025 23:51:18 -0800 Subject: [PATCH 12/13] fix: Use correct selectors for cloud login form --- browser_tests/globalSetupCloud.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser_tests/globalSetupCloud.ts b/browser_tests/globalSetupCloud.ts index 02ff6be23f..239bf2199b 100644 --- a/browser_tests/globalSetupCloud.ts +++ b/browser_tests/globalSetupCloud.ts @@ -32,8 +32,8 @@ export default async function globalSetupCloud(config: FullConfig) { }) // Fill in email and password - await page.fill('input[type="email"]', CLOUD_TEST_EMAIL) - await page.fill('input[type="password"]', CLOUD_TEST_PASSWORD) + await page.fill('#cloud-sign-in-email', CLOUD_TEST_EMAIL) + await page.fill('#cloud-sign-in-password', CLOUD_TEST_PASSWORD) // Click login button await page.click('button[type="submit"]') From 0f67ca7fdd4b8c227a8af56488506010157357e8 Mon Sep 17 00:00:00 2001 From: bymyself Date: Tue, 18 Nov 2025 10:58:36 -0800 Subject: [PATCH 13/13] fix: Simplify cloud auth wait logic --- browser_tests/globalSetupCloud.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/browser_tests/globalSetupCloud.ts b/browser_tests/globalSetupCloud.ts index 239bf2199b..a00a647518 100644 --- a/browser_tests/globalSetupCloud.ts +++ b/browser_tests/globalSetupCloud.ts @@ -38,14 +38,11 @@ export default async function globalSetupCloud(config: FullConfig) { // Click login button await page.click('button[type="submit"]') - // Wait for redirect to main app (adjust selector as needed) - await page.waitForURL('**/', { timeout: 30000 }) + // Wait for redirect to main app + await page.waitForURL('**/cloud', { timeout: 30000 }) - // Wait for app to be fully loaded - await page.waitForFunction( - () => window['app'] && window['app'].extensionManager, - { timeout: 30000 } - ) + // Wait a bit for auth tokens to be written to localStorage + await page.waitForTimeout(2000) // Ensure .auth directory exists const authDir = path.join(__dirname, '.auth')