mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
fix: address PR review feedback for subgraph test suite
- Tighten queue response assertion to response.ok() (subgraphNested) - Use ControlOrMeta for cross-platform copy/paste (subgraphOperations) - Use RENAMED_LABEL in post-rename locator assertion (subgraphSlots) - Wrap Alt key drag in try/finally to prevent leaks (subgraphCrud) - Add comment explaining double nextFrame intent (subgraphSlots) Amp-Thread-ID: https://ampcode.com/threads/T-019d40d8-0fd2-72b2-9422-607306079abd Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -18,12 +18,15 @@ test.describe('Subgraph CRUD', { tag: ['@slow', '@subgraph'] }, () => {
|
||||
|
||||
await comfyPage.page.mouse.move(subgraphPos.x + 16, subgraphPos.y + 16)
|
||||
await comfyPage.page.keyboard.down('Alt')
|
||||
await comfyPage.page.mouse.down()
|
||||
await comfyPage.nextFrame()
|
||||
try {
|
||||
await comfyPage.page.mouse.down()
|
||||
await comfyPage.nextFrame()
|
||||
|
||||
await comfyPage.page.mouse.move(subgraphPos.x + 64, subgraphPos.y + 64)
|
||||
await comfyPage.page.mouse.up()
|
||||
await comfyPage.page.keyboard.up('Alt')
|
||||
await comfyPage.page.mouse.move(subgraphPos.x + 64, subgraphPos.y + 64)
|
||||
await comfyPage.page.mouse.up()
|
||||
} finally {
|
||||
await comfyPage.page.keyboard.up('Alt')
|
||||
}
|
||||
}
|
||||
|
||||
test.describe('Subgraph Unpacking', () => {
|
||||
|
||||
@@ -25,7 +25,7 @@ test.describe('Nested Subgraphs', { tag: ['@subgraph'] }, () => {
|
||||
|
||||
const response = await responsePromise
|
||||
expect(warnings).toEqual([])
|
||||
expect(response.status()).not.toBe(400)
|
||||
expect(response.ok()).toBe(true)
|
||||
} finally {
|
||||
dispose()
|
||||
}
|
||||
|
||||
@@ -32,10 +32,10 @@ test.describe('Subgraph Operations', { tag: ['@slow', '@subgraph'] }, () => {
|
||||
await nodeToClone.click('title')
|
||||
await comfyPage.nextFrame()
|
||||
|
||||
await comfyPage.page.keyboard.press('Control+c')
|
||||
await comfyPage.page.keyboard.press('ControlOrMeta+c')
|
||||
await comfyPage.nextFrame()
|
||||
|
||||
await comfyPage.page.keyboard.press('Control+v')
|
||||
await comfyPage.page.keyboard.press('ControlOrMeta+v')
|
||||
await comfyPage.nextFrame()
|
||||
|
||||
await expect
|
||||
|
||||
@@ -392,7 +392,7 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => {
|
||||
})
|
||||
expect(updatedLabel).toBe(RENAMED_LABEL)
|
||||
|
||||
const seedWidgetAfter = subgraphNodeAfter.getByLabel('seed', {
|
||||
const seedWidgetAfter = subgraphNodeAfter.getByLabel(RENAMED_LABEL, {
|
||||
exact: true
|
||||
})
|
||||
await expect(seedWidgetAfter).toBeVisible()
|
||||
@@ -410,6 +410,7 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => {
|
||||
await comfyPage.workflow.loadWorkflow(
|
||||
'subgraphs/subgraph-with-promoted-text-widget'
|
||||
)
|
||||
// Two frames needed: first renders slot changes, second stabilizes layout
|
||||
await comfyPage.nextFrame()
|
||||
await comfyPage.nextFrame()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user