mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
## Summary Extract `assetPath` from a `ComfyPage` method to a standalone pure function, removing unnecessary coupling to the page object. ## Changes - **What**: Moved `assetPath` to `browser_tests/fixtures/utils/paths.ts`. `DragDropHelper` and `WorkflowHelper` import it directly instead of receiving it via `ComfyPage`. `ComfyPage.assetPath` kept as thin delegate for backward compat. ## Review Focus Structural-only refactor — no behavioral changes. The function was already pure (no `this`/`page` usage). ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10651-refactor-extract-assetPath-as-standalone-pure-function-3316d73d365081c0b0e0ce6dde57ef8e) by [Unito](https://www.unito.io)
4 lines
102 B
TypeScript
4 lines
102 B
TypeScript
export function assetPath(fileName: string): string {
|
|
return `./browser_tests/assets/${fileName}`
|
|
}
|