mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-11 02:20:08 +00:00
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.
This commit is contained in:
@@ -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 <T>(
|
||||
|
||||
@@ -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'
|
||||
|
||||
/**
|
||||
|
||||
4
browser_tests/fixtures/constants.ts
Normal file
4
browser_tests/fixtures/constants.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Shared constants for browser tests
|
||||
*/
|
||||
export const testComfySnapToGridGridSize = 50
|
||||
Reference in New Issue
Block a user