mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
## Summary Alright, alright, alright. These e2e tests have been runnin' around like they're late for somethin', settin' tight little timeouts like the world's gonna end in 250 milliseconds. Man, you gotta *breathe*. Let the framework do its thing. Go slow to go fast, that's what I always say. ## Changes - **What**: Removed ~120 redundant timeout overrides from auto-retrying Playwright assertions (`toBeVisible`, `toBeHidden`, `toHaveCount`, `toBeEnabled`, `toHaveAttribute`, `toContainText`, `expect.poll`) where 5000ms is already the default. Also removed sub-5s timeouts (1s, 2s, 3s) that were just *begging* for flaky failures — like wearin' a belt and suspenders and also holdin' your pants up with both hands. Raised the absurdly short timeouts in `customMatchers.ts` (250ms `toPass` → 5000ms, 256ms poll → default). Kept `timeout: 5000` on `.toPass()` calls (defaults to 0), `.waitFor()`, `waitForRequest`, `waitForFunction`, intentionally-short timeouts inside retry loops, and conditional `.isVisible()/.catch()` checks — those fellas actually need the help. ## Review Focus Every remaining timeout in the diff is there for a *reason*. The ones on `.toPass()` stay because that API defaults to zero — it won't retry at all without one. The ones on `.waitFor()` and `waitForRequest` stay because those are locator actions, not auto-retrying assertions. The intentionally-short ones inside `toPass` retry loops (`interaction.spec.ts`) and the negative assertions (`actionbar.spec.ts` confirming no response arrives) — those are *supposed* to be tight. The short timeouts on regular assertions were actively *encouragin'* flaky failures. That's like settin' your alarm for 4 AM and then gettin' mad you're tired. Just... don't do that, man. Let things take the time they need. 38 files, net -115 lines. Less code, more chill. That's livin'. --------- Co-authored-by: Amp <amp@ampcode.com>
104 lines
3.3 KiB
TypeScript
104 lines
3.3 KiB
TypeScript
import {
|
|
comfyPageFixture as test,
|
|
comfyExpect as expect
|
|
} from '@e2e/fixtures/ComfyPage'
|
|
import {
|
|
saveAndReopenInAppMode,
|
|
setupSubgraphBuilder
|
|
} from '@e2e/helpers/builderTestUtils'
|
|
|
|
test.describe('App mode widget rename', { tag: ['@ui', '@subgraph'] }, () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.appMode.enableLinearMode()
|
|
await comfyPage.settings.setSetting(
|
|
'Comfy.AppBuilder.VueNodeSwitchDismissed',
|
|
true
|
|
)
|
|
})
|
|
|
|
test('Rename from builder input-select sidebar via menu', async ({
|
|
comfyPage
|
|
}) => {
|
|
const { appMode } = comfyPage
|
|
await setupSubgraphBuilder(comfyPage)
|
|
|
|
// Go back to inputs step where IoItems are shown
|
|
await appMode.steps.goToInputs()
|
|
|
|
const menu = appMode.select.getInputItemMenu('seed')
|
|
await expect(menu).toBeVisible()
|
|
await appMode.select.renameInputViaMenu('seed', 'Builder Input Seed')
|
|
|
|
// Verify in app mode after save/reload
|
|
await appMode.footer.exitBuilder()
|
|
const workflowName = `${new Date().getTime()} builder-input-menu`
|
|
await saveAndReopenInAppMode(comfyPage, workflowName)
|
|
|
|
await expect(appMode.linearWidgets).toBeVisible()
|
|
await expect(
|
|
appMode.linearWidgets.getByText('Builder Input Seed')
|
|
).toBeVisible()
|
|
})
|
|
|
|
test('Rename from builder input-select sidebar via double-click', async ({
|
|
comfyPage
|
|
}) => {
|
|
const { appMode } = comfyPage
|
|
await setupSubgraphBuilder(comfyPage)
|
|
|
|
await appMode.steps.goToInputs()
|
|
|
|
await appMode.select.renameInput('seed', 'Dblclick Seed')
|
|
|
|
await appMode.footer.exitBuilder()
|
|
const workflowName = `${new Date().getTime()} builder-input-dblclick`
|
|
await saveAndReopenInAppMode(comfyPage, workflowName)
|
|
|
|
await expect(appMode.linearWidgets).toBeVisible()
|
|
await expect(appMode.linearWidgets.getByText('Dblclick Seed')).toBeVisible()
|
|
})
|
|
|
|
test('Rename from builder preview sidebar', async ({ comfyPage }) => {
|
|
const { appMode } = comfyPage
|
|
await setupSubgraphBuilder(comfyPage)
|
|
|
|
await appMode.steps.goToPreview()
|
|
|
|
const menu = appMode.select.getPreviewWidgetMenu('seed — New Subgraph')
|
|
await expect(menu).toBeVisible()
|
|
await appMode.select.renameWidget(menu, 'Preview Seed')
|
|
|
|
// Verify in app mode after save/reload
|
|
await appMode.footer.exitBuilder()
|
|
const workflowName = `${new Date().getTime()} builder-preview`
|
|
await saveAndReopenInAppMode(comfyPage, workflowName)
|
|
|
|
await expect(appMode.linearWidgets).toBeVisible()
|
|
await expect(appMode.linearWidgets.getByText('Preview Seed')).toBeVisible()
|
|
})
|
|
|
|
test('Rename from app mode', async ({ comfyPage }) => {
|
|
const { appMode } = comfyPage
|
|
await setupSubgraphBuilder(comfyPage)
|
|
|
|
// Enter app mode from builder
|
|
await appMode.footer.exitBuilder()
|
|
await appMode.toggleAppMode()
|
|
|
|
await expect(appMode.linearWidgets).toBeVisible()
|
|
|
|
const menu = appMode.getAppModeWidgetMenu('seed')
|
|
await appMode.select.renameWidget(menu, 'App Mode Seed')
|
|
|
|
await expect(appMode.linearWidgets.getByText('App Mode Seed')).toBeVisible()
|
|
|
|
// Verify persistence after save/reload
|
|
await appMode.toggleAppMode()
|
|
const workflowName = `${new Date().getTime()} app-mode`
|
|
await saveAndReopenInAppMode(comfyPage, workflowName)
|
|
|
|
await expect(appMode.linearWidgets).toBeVisible()
|
|
await expect(appMode.linearWidgets.getByText('App Mode Seed')).toBeVisible()
|
|
})
|
|
})
|