Compare commits

...

6 Commits

Author SHA1 Message Date
GitHub Action
550f5bb4ab [automated] Apply ESLint and Oxfmt fixes 2026-04-08 05:01:02 +00:00
dante
3d175d66bb test: address bottom panel review feedback 2026-04-08 13:57:54 +09:00
dante01yoon
38cab734dc fix(test): replace test.skip with explicit assert on boundingBox
Per CodeRabbit review: after toBeVisible(), boundingBox() returning
null is a real failure, not an environment variance.
2026-04-02 21:54:00 +09:00
dante01yoon
cde01f67ed fix(test): remove tests that overlap with existing bottomPanelLogs
Remove tab persistence, shortcuts↔terminal switching, and terminal
tabs tests — already covered in bottomPanelLogs.spec.ts and
bottomPanelShortcuts.spec.ts. Keep only unique tests: close button,
resize gutter, drag resize, canvas not blocked.
2026-04-02 17:31:58 +09:00
dante01yoon
b442956b27 test: fix flaky bottom panel canvas interaction E2E test
Replace unreliable double-click-to-open-search-box assertion with a
simple canvas click. Playwright's actionability checks already verify
the element is not obscured by an invisible overlay, which is what
the test intends to guard against.
2026-04-02 17:24:53 +09:00
dante01yoon
7e855e7cc3 test: add E2E tests for bottom panel toggle, resize, and tab switching
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.
2026-04-02 10:31:44 +09:00
2 changed files with 129 additions and 0 deletions

View File

@@ -20,6 +20,8 @@ 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) {
@@ -30,6 +32,28 @@ export class BottomPanel {
this.toggleButton = page.getByRole('button', {
name: /Toggle Bottom Panel/i
})
this.closeButton = this.root.getByRole('button', { name: /^Close$/i })
// PrimeVue renders the splitter gutter outside the panel body.
this.resizeGutter = page.locator(
'.splitter-overlay-bottom > .p-splitter-gutter'
)
this.shortcuts = new ShortcutsTab(page)
}
async resizeByDragging(deltaY: number): Promise<void> {
const gutterBox = await this.resizeGutter.boundingBox()
if (!gutterBox) {
throw new Error('Bottom panel resize gutter should have layout')
}
const gutterCenterX = gutterBox.x + gutterBox.width / 2
const gutterCenterY = gutterBox.y + gutterBox.height / 2
await this.page.mouse.move(gutterCenterX, gutterCenterY)
await this.page.mouse.down()
await this.page.mouse.move(gutterCenterX, gutterCenterY + deltaY, {
steps: 5
})
await this.page.mouse.up()
}
}

View File

@@ -0,0 +1,105 @@
import {
comfyPageFixture as test,
comfyExpect as expect
} from '../fixtures/ComfyPage'
test.describe('Bottom Panel', { tag: '@ui' }, () => {
test.beforeEach(async ({ comfyPage }) => {
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top')
})
test('should close panel via close button inside the panel', async ({
comfyPage
}) => {
const { bottomPanel } = comfyPage
await bottomPanel.toggleButton.click()
await expect(
bottomPanel.root,
'Panel should be open before testing close button'
).toBeVisible()
await bottomPanel.closeButton.click()
await expect(bottomPanel.root).not.toBeVisible()
})
test('should display resize gutter when panel is open', async ({
comfyPage
}) => {
const { bottomPanel } = comfyPage
await bottomPanel.toggleButton.click()
await expect(
bottomPanel.root,
'Panel should be open before checking the resize gutter'
).toBeVisible()
await expect(bottomPanel.resizeGutter).toBeVisible()
})
test('should hide resize gutter when panel is closed', async ({
comfyPage
}) => {
const { bottomPanel } = comfyPage
await expect(bottomPanel.root).not.toBeVisible()
await expect(bottomPanel.resizeGutter).toBeHidden()
})
test('should resize panel by dragging the gutter', async ({ comfyPage }) => {
const { bottomPanel } = comfyPage
await bottomPanel.toggleButton.click()
await expect(
bottomPanel.root,
'Panel should be open before resizing'
).toBeVisible()
const initialHeight = await bottomPanel.root.evaluate(
(el) => el.getBoundingClientRect().height
)
await bottomPanel.resizeByDragging(-100)
await expect
.poll(
() =>
bottomPanel.root.evaluate((el) => el.getBoundingClientRect().height),
{
message:
'Panel height should increase after dragging the resize gutter'
}
)
.toBeGreaterThan(initialHeight)
})
test('should not block canvas interactions when panel is closed', async ({
comfyPage
}) => {
const { bottomPanel } = comfyPage
if (await bottomPanel.root.isVisible()) {
await bottomPanel.closeButton.click()
}
await expect(bottomPanel.root).not.toBeVisible()
await comfyPage.canvas.click({
position: { x: 100, y: 100 }
})
await expect(comfyPage.canvas).toHaveFocus()
})
test('should close panel via close button from shortcuts view', async ({
comfyPage
}) => {
const { bottomPanel } = comfyPage
await bottomPanel.keyboardShortcutsButton.click()
await expect(
bottomPanel.root,
'Panel should be open before closing it from the shortcuts view'
).toBeVisible()
await bottomPanel.closeButton.click()
await expect(bottomPanel.root).not.toBeVisible()
})
})