mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-25 00:39:49 +00:00
test(browser): add BaseDialog class (Phase 5.2)
Amp-Thread-ID: https://ampcode.com/threads/T-019c137b-34ba-736a-afb6-0a41baf9358f Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -2,20 +2,19 @@ import type { Page } from '@playwright/test'
|
||||
|
||||
import type { ComfyPage } from '../ComfyPage'
|
||||
import { TestIds } from '../selectors'
|
||||
import { BaseDialog } from './BaseDialog'
|
||||
|
||||
export class SettingDialog {
|
||||
export class SettingDialog extends BaseDialog {
|
||||
constructor(
|
||||
public readonly page: Page,
|
||||
page: Page,
|
||||
public readonly comfyPage: ComfyPage
|
||||
) {}
|
||||
|
||||
get root() {
|
||||
return this.page.getByTestId(TestIds.dialogs.settings)
|
||||
) {
|
||||
super(page, TestIds.dialogs.settings)
|
||||
}
|
||||
|
||||
async open() {
|
||||
await this.comfyPage.executeCommand('Comfy.ShowSettingsDialog')
|
||||
await this.root.waitFor({ state: 'visible' })
|
||||
await this.waitForVisible()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user