mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
fix: add shiftKey to keyboard reorder tests in ComfyHubExamplesStep
The component requires Shift+Arrow to reorder images (plain arrows move focus). Tests were missing shiftKey: true, causing false failures. Amp-Thread-ID: https://ampcode.com/threads/T-019cf96f-a902-76aa-a3c1-34676b56182a Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -41,7 +41,7 @@ describe('ComfyHubExamplesStep', () => {
|
||||
const wrapper = mountStep(createImages(3))
|
||||
|
||||
const tiles = wrapper.findAll('[role="listitem"]')
|
||||
await tiles[1].trigger('keydown', { key: 'ArrowLeft' })
|
||||
await tiles[1].trigger('keydown', { key: 'ArrowLeft', shiftKey: true })
|
||||
|
||||
const emitted = wrapper.emitted('update:exampleImages')
|
||||
expect(emitted).toBeTruthy()
|
||||
@@ -53,7 +53,7 @@ describe('ComfyHubExamplesStep', () => {
|
||||
const wrapper = mountStep(createImages(3))
|
||||
|
||||
const tiles = wrapper.findAll('[role="listitem"]')
|
||||
await tiles[1].trigger('keydown', { key: 'ArrowRight' })
|
||||
await tiles[1].trigger('keydown', { key: 'ArrowRight', shiftKey: true })
|
||||
|
||||
const emitted = wrapper.emitted('update:exampleImages')
|
||||
expect(emitted).toBeTruthy()
|
||||
|
||||
Reference in New Issue
Block a user