Compare commits

...

1 Commits

Author SHA1 Message Date
CodeRabbit Fixer
c8d016d5aa fix: test(browser): add Playwright test for app startup when initServerCapabilities() fails or times out (#9825)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:11:26 +01:00

View File

@@ -0,0 +1,31 @@
import { expect } from '@playwright/test'
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
test.describe('Server Capabilities Resilience', { tag: '@slow' }, () => {
test('App starts successfully when /api/features returns 500', async ({
comfyPage
}) => {
await comfyPage.page.route('**/api/features**', async (route) => {
await route.fulfill({
status: 500,
contentType: 'application/json',
body: JSON.stringify({ error: 'Internal Server Error' })
})
})
await comfyPage.setup()
await expect(comfyPage.canvas).toBeVisible()
})
test('App starts successfully when /api/features network request fails', async ({
comfyPage
}) => {
await comfyPage.page.route('**/api/features**', async (route) => {
await route.abort('connectionrefused')
})
await comfyPage.setup()
await expect(comfyPage.canvas).toBeVisible()
})
})