mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
Add bottomPanel.spec.ts covering behaviors not tested in existing bottomPanelLogs and bottomPanelShortcuts specs: close button (X), tab persistence on re-open, resize gutter visibility and drag, canvas interaction when panel is closed, and cross-panel switching. Extend BottomPanel fixture with closeButton and resizeGutter locators.
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import type { Locator, Page } from '@playwright/test'
|
|
|
|
class ShortcutsTab {
|
|
readonly essentialsTab: Locator
|
|
readonly viewControlsTab: Locator
|
|
readonly manageButton: Locator
|
|
readonly keyBadges: Locator
|
|
readonly subcategoryTitles: Locator
|
|
|
|
constructor(readonly page: Page) {
|
|
this.essentialsTab = page.getByRole('tab', { name: /Essential/i })
|
|
this.viewControlsTab = page.getByRole('tab', { name: /View Controls/i })
|
|
this.manageButton = page.getByRole('button', { name: /Manage Shortcuts/i })
|
|
this.keyBadges = page.locator('.key-badge')
|
|
this.subcategoryTitles = page.locator('.subcategory-title')
|
|
}
|
|
}
|
|
|
|
export class BottomPanel {
|
|
readonly root: Locator
|
|
readonly keyboardShortcutsButton: Locator
|
|
readonly toggleButton: Locator
|
|
readonly closeButton: Locator
|
|
readonly resizeGutter: Locator
|
|
readonly shortcuts: ShortcutsTab
|
|
|
|
constructor(readonly page: Page) {
|
|
this.root = page.locator('.bottom-panel')
|
|
this.keyboardShortcutsButton = page.getByRole('button', {
|
|
name: /Keyboard Shortcuts/i
|
|
})
|
|
this.toggleButton = page.getByRole('button', {
|
|
name: /Toggle Bottom Panel/i
|
|
})
|
|
this.closeButton = this.root.getByRole('button', { name: /Close/i })
|
|
this.resizeGutter = page.locator(
|
|
'.splitter-overlay-bottom > .p-splitter-gutter'
|
|
)
|
|
this.shortcuts = new ShortcutsTab(page)
|
|
}
|
|
}
|