Files
ComfyUI_frontend/browser_tests/fixtures/helpers/ClipboardHelper.ts
Alexander Brown 5b6d1f5bdb refactor: inject KeyboardHelper into ClipboardHelper
Remove duplicated nextFrame and ctrlSend methods from ClipboardHelper
by delegating to KeyboardHelper instead.

Amp-Thread-ID: https://ampcode.com/threads/T-019c15b9-efed-72eb-b092-1e92a11f44e3
Co-authored-by: Amp <amp@ampcode.com>
2026-01-31 12:33:38 -08:00

19 lines
497 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 ?? this.canvas)
}
async paste(locator?: Locator | null): Promise<void> {
await this.keyboard.ctrlSend('KeyV', locator ?? this.canvas)
}
}