mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
## Summary Remove the unused `_config` parameter from the Playwright global setup/teardown hooks and drop the now-unused `FullConfig` imports. ## Changes - **What**: Simplified `browser_tests/globalSetup.ts` and `browser_tests/globalTeardown.ts` to match actual usage. ## Review Focus Verify that removing the unused hook argument does not change Playwright behavior. ## Screenshots (if applicable) N/A ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10513-fix-remove-unused-Playwright-hook-config-args-32e6d73d365081d59b63dbbca0596025) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org>
21 lines
557 B
TypeScript
21 lines
557 B
TypeScript
import { config as dotenvConfig } from 'dotenv'
|
|
|
|
import { backupPath } from './utils/backupUtils'
|
|
|
|
dotenvConfig()
|
|
|
|
export default function globalSetup() {
|
|
if (!process.env.CI) {
|
|
if (process.env.TEST_COMFYUI_DIR) {
|
|
backupPath([process.env.TEST_COMFYUI_DIR, 'user'])
|
|
backupPath([process.env.TEST_COMFYUI_DIR, 'models'], {
|
|
renameAndReplaceWithScaffolding: true
|
|
})
|
|
} else {
|
|
console.warn(
|
|
'Set TEST_COMFYUI_DIR in .env to prevent user data (settings, workflows, etc.) from being overwritten'
|
|
)
|
|
}
|
|
}
|
|
}
|