diff --git a/browser_tests/rightClickMenu.spec.ts b/browser_tests/rightClickMenu.spec.ts index e6d154417..05335e1e1 100644 --- a/browser_tests/rightClickMenu.spec.ts +++ b/browser_tests/rightClickMenu.spec.ts @@ -1,5 +1,6 @@ import { expect } from '@playwright/test' import { comfyPageFixture as test } from './ComfyPage' +import { NodeBadgeMode } from '../src/types/nodeSource' test.describe('Canvas Right Click Menu', () => { // See https://github.com/comfyanonymous/ComfyUI/issues/3883 @@ -64,6 +65,24 @@ test.describe('Node Right Click Menu', () => { ) }) + test('Can collapse (Node Badge)', async ({ comfyPage }) => { + await comfyPage.setSetting( + 'Comfy.NodeBadge.NodeIdBadgeMode', + NodeBadgeMode.ShowAll + ) + await comfyPage.setSetting( + 'Comfy.NodeBadge.NodeSourceBadgeMode', + NodeBadgeMode.ShowAll + ) + + await comfyPage.rightClickEmptyLatentNode() + await comfyPage.page.getByText('Collapse').click() + await comfyPage.nextFrame() + await expect(comfyPage.canvas).toHaveScreenshot( + 'right-click-node-collapsed-badge.png' + ) + }) + test('Can bypass', async ({ comfyPage }) => { await comfyPage.rightClickEmptyLatentNode() await expect(comfyPage.canvas).toHaveScreenshot('right-click-node.png')