mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-04 20:50:06 +00:00
- Fix widgetTextBox locator in ComfyPage - Add exact match for 'Add' button in search filter panel - Fix ClipboardHelper to properly handle undefined vs null locators - Use canvasOps.dragAndDrop in NodeOperationsHelper - Use nodeOps.waitForGraphNodes in link interaction tests - Add typecheck:browser script for browser tests Amp-Thread-ID: https://ampcode.com/threads/T-019c1696-c595-7724-8dca-64f73f19f478 Co-authored-by: Amp <amp@ampcode.com>
19 lines
529 B
TypeScript
19 lines
529 B
TypeScript
import type { Locator } from '@playwright/test'
|
|
|
|
import type { KeyboardHelper } from './KeyboardHelper'
|
|
|
|
export class ClipboardHelper {
|
|
constructor(
|
|
private readonly keyboard: KeyboardHelper,
|
|
private readonly canvas: Locator
|
|
) {}
|
|
|
|
async copy(locator?: Locator | null): Promise<void> {
|
|
await this.keyboard.ctrlSend('KeyC', locator === undefined ? null : locator)
|
|
}
|
|
|
|
async paste(locator?: Locator | null): Promise<void> {
|
|
await this.keyboard.ctrlSend('KeyV', locator === undefined ? null : locator)
|
|
}
|
|
}
|