Compare commits

...

5 Commits

Author SHA1 Message Date
DrJKL
fb130d48f1 Merge remote-tracking branch 'origin/main' into test/sidebar-tab-switching
# Conflicts:
#	browser_tests/tests/keyboardShortcutActions.spec.ts
2026-05-19 16:51:55 -07:00
Christian Byrne
238d1ea3af Merge branch 'main' into test/sidebar-tab-switching 2026-04-19 18:39:41 -07:00
bymyself
2bc8a28dff fix: use nodeLibraryTabV2 in sidebar tab switching tests
NodeLibraryV2 is enabled by default. The old NodeLibrarySidebarTab.open()
waits for a 'node-library-tree' testId that doesn't exist in V2, causing
a 15s timeout. Switch to nodeLibraryTabV2 and assert on its searchInput
instead.
2026-04-13 23:19:03 +00:00
bymyself
2685a51d24 test: add E2E tests for sidebar tab switching 2026-04-13 22:56:35 +00:00
bymyself
5e391a63d2 test: add E2E tests for keyboard shortcut actions 2026-04-13 22:56:25 +00:00

View File

@@ -0,0 +1,65 @@
import {
comfyExpect as expect,
comfyPageFixture as test
} from '@e2e/fixtures/ComfyPage'
test.describe('Sidebar tab switching', { tag: '@ui' }, () => {
test.beforeEach(async ({ comfyPage }) => {
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top')
await comfyPage.setup()
})
test('Sidebar toolbar is visible', async ({ comfyPage }) => {
await expect(comfyPage.menu.sideToolbar).toBeVisible()
})
test('Sidebar has multiple tab buttons', async ({ comfyPage }) => {
await expect.poll(() => comfyPage.menu.buttons.count()).toBeGreaterThan(1)
})
test('Clicking node library tab opens it', async ({ comfyPage }) => {
const tab = comfyPage.menu.nodeLibraryTabV2
await tab.open()
await expect(tab.selectedTabButton).toBeVisible()
})
test('Clicking workflows tab opens it', async ({ comfyPage }) => {
await comfyPage.menu.workflowsTab.open()
await expect(comfyPage.menu.workflowsTab.selectedTabButton).toBeVisible()
})
test('Switching from one tab to another deselects the first', async ({
comfyPage
}) => {
const nodeTab = comfyPage.menu.nodeLibraryTabV2
await nodeTab.open()
await expect(nodeTab.selectedTabButton).toBeVisible()
await comfyPage.menu.workflowsTab.open()
await expect(comfyPage.menu.workflowsTab.selectedTabButton).toBeVisible()
await expect(nodeTab.selectedTabButton).toBeHidden()
})
test('Clicking active tab closes the sidebar panel', async ({
comfyPage
}) => {
const tab = comfyPage.menu.nodeLibraryTabV2
await tab.open()
await expect(tab.selectedTabButton).toBeVisible()
await tab.close()
await expect(tab.selectedTabButton).toBeHidden()
})
test('Sidebar content area updates when switching tabs', async ({
comfyPage
}) => {
const nodeTab = comfyPage.menu.nodeLibraryTabV2
await nodeTab.open()
await expect(nodeTab.searchInput).toBeVisible()
await comfyPage.menu.workflowsTab.open()
await expect(comfyPage.menu.workflowsTab.root).toBeVisible()
await expect(nodeTab.searchInput).toBeHidden()
})
})