mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-04 04:30:04 +00:00
allow copy and paste when minimap target
This commit is contained in:
@@ -13,6 +13,7 @@ import { ComfyTemplates } from '../helpers/templates'
|
||||
import { ComfyMouse } from './ComfyMouse'
|
||||
import { VueNodeHelpers } from './VueNodeHelpers'
|
||||
import { ComfyNodeSearchBox } from './components/ComfyNodeSearchBox'
|
||||
import { Minimap } from './components/Minimap'
|
||||
import { SettingDialog } from './components/SettingDialog'
|
||||
import {
|
||||
NodeLibrarySidebarTab,
|
||||
@@ -33,6 +34,7 @@ class ComfyMenu {
|
||||
private _workflowsTab: WorkflowsSidebarTab | null = null
|
||||
private _queueTab: QueueSidebarTab | null = null
|
||||
private _topbar: Topbar | null = null
|
||||
private _minimap: Minimap | null = null
|
||||
|
||||
public readonly sideToolbar: Locator
|
||||
public readonly themeToggleButton: Locator
|
||||
@@ -70,6 +72,11 @@ class ComfyMenu {
|
||||
return this._topbar
|
||||
}
|
||||
|
||||
get minimap() {
|
||||
this._minimap ??= new Minimap(this.page)
|
||||
return this._minimap
|
||||
}
|
||||
|
||||
async toggleTheme() {
|
||||
await this.themeToggleButton.click()
|
||||
await this.page.evaluate(() => {
|
||||
|
||||
41
browser_tests/fixtures/components/Minimap.ts
Normal file
41
browser_tests/fixtures/components/Minimap.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { Locator, Page } from '@playwright/test'
|
||||
|
||||
export class Minimap {
|
||||
constructor(public readonly page: Page) {}
|
||||
|
||||
get mainContainer(): Locator {
|
||||
return this.page.locator('.minimap-main-container')
|
||||
}
|
||||
|
||||
get container(): Locator {
|
||||
return this.page.locator('.litegraph-minimap')
|
||||
}
|
||||
|
||||
get canvas(): Locator {
|
||||
return this.container.locator('.minimap-canvas')
|
||||
}
|
||||
|
||||
get viewport(): Locator {
|
||||
return this.container.locator('.minimap-viewport')
|
||||
}
|
||||
|
||||
get settingsButton(): Locator {
|
||||
return this.container.getByRole('button').first()
|
||||
}
|
||||
|
||||
get closeButton(): Locator {
|
||||
return this.container.getByTestId('close-minmap-button')
|
||||
}
|
||||
|
||||
async clickCanvas(options?: Parameters<Locator['click']>[0]): Promise<void> {
|
||||
await this.canvas.click(options)
|
||||
}
|
||||
|
||||
async clickSettingsButton(): Promise<void> {
|
||||
await this.settingsButton.click()
|
||||
}
|
||||
|
||||
async close(): Promise<void> {
|
||||
await this.closeButton.click()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user