mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
## Summary Complete the @e2e/ path alias migration started in #10735 by converting all 354 remaining relative imports and adding a lint rule to prevent backsliding. ## Changes - **What**: Migrate all relative imports in browser_tests/ to use `@e2e/` (intra-directory) and `@/` (src/ imports) path aliases. Add `no-restricted-imports` ESLint rule banning `./` and `../` imports in `browser_tests/**/*.ts`. Suppress pre-existing oxlint `no-eval` and `no-console` warnings exposed by touching those files. ## Review Focus - ESLint flat-config merging: the `@playwright/test` ban and relative-import ban are in two separate blocks to avoid last-match-wins collision with the `useI18n`/`useVirtualList` blocks higher in the config. - The `['./**', '../**']` glob patterns (not `['./*', '../*']`) are needed to catch multi-level relative paths like `../../../src/foo`. Follows up on #10735 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10958-test-migrate-browser_tests-to-e2e-path-alias-and-add-lint-rule-33c6d73d365081649d1be771eac986fd) by [Unito](https://www.unito.io) Co-authored-by: Amp <amp@ampcode.com>
52 lines
1.6 KiB
TypeScript
52 lines
1.6 KiB
TypeScript
import type { Position } from '@e2e/fixtures/constants/types'
|
|
|
|
/**
|
|
* Hardcoded positions for the default graph loaded in tests.
|
|
* These coordinates are specific to the default workflow viewport.
|
|
*/
|
|
export const DefaultGraphPositions = {
|
|
// Node click positions
|
|
textEncodeNode1: { x: 618, y: 191 },
|
|
textEncodeNode2: { x: 622, y: 400 },
|
|
textEncodeNodeToggler: { x: 430, y: 171 },
|
|
emptySpaceClick: { x: 35, y: 31 },
|
|
|
|
// Slot positions
|
|
clipTextEncodeNode1InputSlot: { x: 427, y: 198 },
|
|
clipTextEncodeNode2InputSlot: { x: 422, y: 402 },
|
|
clipTextEncodeNode2InputLinkPath: { x: 395, y: 422 },
|
|
loadCheckpointNodeClipOutputSlot: { x: 332, y: 509 },
|
|
emptySpace: { x: 427, y: 98 },
|
|
|
|
// Widget positions
|
|
emptyLatentWidgetClick: { x: 724, y: 645 },
|
|
|
|
// Node positions and sizes for resize operations
|
|
ksampler: {
|
|
pos: { x: 863, y: 156 },
|
|
size: { width: 315, height: 292 }
|
|
},
|
|
loadCheckpoint: {
|
|
pos: { x: 26, y: 444 },
|
|
size: { width: 315, height: 127 }
|
|
},
|
|
emptyLatent: {
|
|
pos: { x: 473, y: 579 },
|
|
size: { width: 315, height: 136 }
|
|
}
|
|
} as const satisfies {
|
|
textEncodeNode1: Position
|
|
textEncodeNode2: Position
|
|
textEncodeNodeToggler: Position
|
|
emptySpaceClick: Position
|
|
clipTextEncodeNode1InputSlot: Position
|
|
clipTextEncodeNode2InputSlot: Position
|
|
clipTextEncodeNode2InputLinkPath: Position
|
|
loadCheckpointNodeClipOutputSlot: Position
|
|
emptySpace: Position
|
|
emptyLatentWidgetClick: Position
|
|
ksampler: { pos: Position; size: { width: number; height: number } }
|
|
loadCheckpoint: { pos: Position; size: { width: number; height: number } }
|
|
emptyLatent: { pos: Position; size: { width: number; height: number } }
|
|
}
|