mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
Addresses review feedback: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10586#discussion_r3005778699
25 lines
700 B
TypeScript
25 lines
700 B
TypeScript
import type { Locator, Page } from '@playwright/test'
|
|
|
|
import { comfyExpect as expect } from '../ComfyPage'
|
|
import { TestIds } from '../selectors'
|
|
|
|
export class QueuePanel {
|
|
readonly overlayToggle: Locator
|
|
readonly moreOptionsButton: Locator
|
|
|
|
constructor(readonly page: Page) {
|
|
this.overlayToggle = page.getByTestId(TestIds.queue.overlayToggle)
|
|
this.moreOptionsButton = page.getByLabel(/More options/i).first()
|
|
}
|
|
|
|
async openClearHistoryDialog() {
|
|
await this.moreOptionsButton.click()
|
|
|
|
const clearHistoryAction = this.page.getByTestId(
|
|
TestIds.queue.clearHistoryAction
|
|
)
|
|
await expect(clearHistoryAction).toBeVisible()
|
|
await clearHistoryAction.click()
|
|
}
|
|
}
|