allow copy and paste when minimap target

This commit is contained in:
bymyself
2025-10-14 11:46:54 -07:00
parent 9f046a11ea
commit 4d012f5fd9
9 changed files with 128 additions and 38 deletions

View File

@@ -2,11 +2,11 @@ import { expect } from '@playwright/test'
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
test.beforeEach(async ({ comfyPage }) => {
await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled')
})
test.describe('Copy Paste', () => {
test.beforeEach(async ({ comfyPage }) => {
await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled')
})
test('Can copy and paste node', async ({ comfyPage }) => {
await comfyPage.clickEmptyLatentNode()
await comfyPage.page.mouse.move(10, 10)
@@ -15,6 +15,29 @@ test.describe('Copy Paste', () => {
await expect(comfyPage.canvas).toHaveScreenshot('copied-node.png')
})
test('Can copy and paste node after clicking minimap', async ({
comfyPage
}) => {
await comfyPage.setSetting('Comfy.UseNewMenu', 'Top')
await comfyPage.setSetting('Comfy.Minimap.Visible', true)
const latentNodeTitle = 'Empty Latent Image'
const initialLatentNodeCt =
await comfyPage.getNodeRefsByTitle(latentNodeTitle)
await comfyPage.clickEmptyLatentNode()
await comfyPage.ctrlC()
// Click minimap to lose focus.
await comfyPage.menu.minimap.clickCanvas({ force: true })
// Paste node.
await comfyPage.ctrlV()
const expectedNodeCt = initialLatentNodeCt.length + 1
const latentNodeCt = await comfyPage.getNodeRefsByTitle(latentNodeTitle)
expect(latentNodeCt.length).toBe(expectedNodeCt)
})
test('Can copy and paste node with link', async ({ comfyPage }) => {
await comfyPage.clickTextEncodeNode1()
await comfyPage.page.mouse.move(10, 10)