mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
## Summary Follow-up cleanup for #11184 — removes redundant test setup calls that the `@vue-nodes` fixture now handles. ## Changes - **What**: Remove 40 lines of redundant `setSetting`, `setup()`, and `waitForNodes()` calls across 11 test files - `UseNewMenu: 'Top'` calls (already fixture default) - `setup()` + `waitForNodes()` on default workflow (fixture already does this for `@vue-nodes`) - Page reload in `subgraphZeroUuid` (fixture applies VueNodes.Enabled server-side before navigation) ## Review Focus Each removal was verified against the fixture's `setupSettings()` defaults (ComfyPage.ts:420-442) and the `@vue-nodes` auto-setup (lines 454-456). Tests that call `setup()`/`waitForNodes()` after `loadWorkflow()` or `page.evaluate()` were intentionally kept. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11195-test-remove-redundant-setup-settings-now-handled-by-vue-nodes-fixture-3416d73d36508154827df116a97e9130) by [Unito](https://www.unito.io) Co-authored-by: Amp <amp@ampcode.com>
43 lines
1.5 KiB
TypeScript
43 lines
1.5 KiB
TypeScript
import {
|
|
comfyExpect as expect,
|
|
comfyPageFixture as test
|
|
} from '@e2e/fixtures/ComfyPage'
|
|
|
|
test.describe('Vue Integer Widget', { tag: '@vue-nodes' }, () => {
|
|
test('should be disabled and not allow changing value when link connected to slot', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.workflow.loadWorkflow('vueNodes/linked-int-widget')
|
|
await comfyPage.vueNodes.waitForNodes()
|
|
|
|
const seedWidget = comfyPage.vueNodes
|
|
.getWidgetByName('KSampler', 'seed')
|
|
.first()
|
|
const controls = comfyPage.vueNodes.getInputNumberControls(seedWidget)
|
|
const initialValue = Number(await controls.input.inputValue())
|
|
|
|
// Verify widget is disabled when linked
|
|
await expect(controls.incrementButton).toBeDisabled()
|
|
await expect(controls.decrementButton).toBeDisabled()
|
|
await expect(controls.input).toHaveValue(initialValue.toString())
|
|
|
|
await expect(seedWidget).toBeVisible()
|
|
|
|
// Delete the node that is linked to the slot (freeing up the widget)
|
|
// Click on the header to select the node (clicking center may land on
|
|
// the widget area where pointerdown.stop prevents node selection)
|
|
await comfyPage.vueNodes
|
|
.getNodeByTitle('Int')
|
|
.locator('.lg-node-header')
|
|
.click()
|
|
await comfyPage.vueNodes.deleteSelected()
|
|
|
|
// Test widget works when unlinked
|
|
await controls.incrementButton.click()
|
|
await expect(controls.input).toHaveValue((initialValue + 1).toString())
|
|
|
|
await controls.decrementButton.click()
|
|
await expect(controls.input).toHaveValue(initialValue.toString())
|
|
})
|
|
})
|