From d1b3c89467fb1386b03d0ea8b9cff3905b7a090e Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Wed, 4 Nov 2026 17:20:36 -0800 Subject: [PATCH 1/2] test: pin slider pressed-state cursor with real mouse input Re-expresses #11412 without patching pointer capture or dispatching synthetic PointerEvents. Drags the Vue-node slider thumb with Playwright mouse input and asserts the computed cursor is grabbing only while the pointer is held. --- .../widgets/float/floatWidget.spec.ts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/browser_tests/tests/vueNodes/widgets/float/floatWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/float/floatWidget.spec.ts index fffad71bd1e..0fc6a18b71b 100644 --- a/browser_tests/tests/vueNodes/widgets/float/floatWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/float/floatWidget.spec.ts @@ -105,4 +105,35 @@ test.describe('Vue Float Widget', { tag: '@vue-nodes' }, () => { // UI (or vice versa) still fails this test. await expect(input).toHaveValue('7.5') }) + + // Re-expresses #11412 with real mouse input instead of patched pointer + // capture: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11412 + test('slider thumb shows the grabbing cursor only while dragged', async ({ + comfyPage + }) => { + await comfyPage.workflow.loadWorkflow('inputs/simple_slider') + + const node = comfyPage.vueNodes.getNodeByTitle('Simple Slider') + const thumb = node.getByRole('slider') + const { input } = comfyPage.vueNodes.getInputNumberControls(node) + await expect(thumb).toHaveCSS('cursor', 'grab') + const initial = Number(await input.inputValue()) + + const box = await thumb.boundingBox() + if (!box) throw new Error('Slider thumb has no bounding box') + const { mouse } = comfyPage.page + await mouse.move(box.x + box.width / 2, box.y + box.height / 2) + await mouse.down() + await mouse.move(box.x + box.width / 2 + 40, box.y + box.height / 2, { + steps: 5 + }) + + await expect(thumb).toHaveCSS('cursor', 'grabbing') + await expect + .poll(async () => Number(await input.inputValue())) + .toBeGreaterThan(initial) + + await mouse.up() + await expect(thumb).toHaveCSS('cursor', 'grab') + }) }) From 3e604d0ea277d254df494a9b7e981e75e83f86e8 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Wed, 4 Nov 2026 23:12:32 -0800 Subject: [PATCH 2/2] test: address slider cursor review --- browser_tests/tests/vueNodes/widgets/float/floatWidget.spec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/browser_tests/tests/vueNodes/widgets/float/floatWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/float/floatWidget.spec.ts index 0fc6a18b71b..b855d335a29 100644 --- a/browser_tests/tests/vueNodes/widgets/float/floatWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/float/floatWidget.spec.ts @@ -106,8 +106,6 @@ test.describe('Vue Float Widget', { tag: '@vue-nodes' }, () => { await expect(input).toHaveValue('7.5') }) - // Re-expresses #11412 with real mouse input instead of patched pointer - // capture: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11412 test('slider thumb shows the grabbing cursor only while dragged', async ({ comfyPage }) => {