Cover portal navigation and manager workflows
Test, build, and deploy ComfyUI Jobs / test-build (push) Successful in 4m58s
Test, build, and deploy ComfyUI Jobs / deploy (push) Successful in 15s
Test, build, and deploy ComfyUI Jobs / browser-test (push) Successful in 1m59s
Test, build, and deploy ComfyUI Jobs / qa-gate (push) Successful in 6s

This commit is contained in:
2026-10-26 17:02:54 +00:00
parent d6b2357371
commit ba34d33308
+37
View File
@@ -270,4 +270,41 @@ test.describe('ComfyUI Portal read-only UI states', () => {
await expect.poll(() => requests).toEqual(['POST']);
await expect(page.getByRole('button', { name: 'Restart ComfyUI' })).toBeEnabled();
});
test('redirects an authenticated unknown route back to the job monitor', async ({ page }) => {
await mockReadOnlyApi(page);
await page.goto('/does-not-exist');
await expect(page).toHaveURL(/\/jobs/);
await expect(page.getByRole('heading', { name: 'Job monitor' })).toBeVisible();
});
test('sends the selected Manager version through the mocked switch flow', async ({ page }) => {
let payload = null;
await mockReadOnlyApi(page);
await page.route('**/api/comfy/switch-version', async (route) => {
payload = JSON.parse(route.request().postData() || '{}');
await route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ message: 'Request accepted.' }) });
});
await page.goto('/jobs');
await page.locator('select').selectOption('0.2.9');
page.once('dialog', dialog => dialog.accept());
await page.getByRole('button', { name: 'Switch version' }).click();
await expect(page.getByText('Request accepted.')).toBeVisible();
await expect.poll(() => payload).toEqual({ version: '0.2.9' });
});
test('enters the update-all busy state after a mocked confirmation', async ({ page }) => {
let requestCount = 0;
await mockReadOnlyApi(page);
await page.route('**/api/comfy/update-all', async (route) => {
requestCount += 1;
await route.fulfill({ status: 202, contentType: 'application/json', body: JSON.stringify({ message: 'Update all started.' }) });
});
await page.goto('/jobs');
page.once('dialog', dialog => dialog.accept());
await page.getByRole('button', { name: 'Update all' }).click();
await expect(page.getByRole('button', { name: 'Updating everything…' })).toBeDisabled();
await expect(page.getByText('Update all started. Checking progress…')).toBeVisible();
await expect.poll(() => requestCount).toBe(1);
});
});