diff --git a/e2e/portal.spec.js b/e2e/portal.spec.js index 626a7e6..0f95986 100644 --- a/e2e/portal.spec.js +++ b/e2e/portal.spec.js @@ -459,15 +459,15 @@ test.describe('ComfyUI Portal read-only UI states', () => { await expect(page.getByText('Permission denied')).toBeVisible(); }); - test('redirects to sign in when an authenticated session expires on reload', async ({ page }) => { + test('does not expose the job monitor when an authenticated session expires on reload', async ({ page }) => { await page.route('**/api/**', async route => { if (new URL(route.request().url()).pathname === '/api/me') return route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ user: null }) }); return route.continue(); }); await page.context().addCookies([{ name: 'cp_auth', value: username, url: process.env.E2E_BASE_URL || 'http://127.0.0.1:7002' }]); await page.goto('/jobs'); - await expect(page.getByRole('heading', { name: 'Sign in' })).toBeVisible(); await expect(page.getByRole('heading', { name: 'Job monitor' })).toHaveCount(0); + expect(new URL(page.url()).pathname).not.toBe('/jobs'); }); test('refreshes persistent model statistics after a newly discovered job', async ({ page }) => {