Show request submission progress in a focused follow-up dialog
Magent CI/CD / verify (push) Successful in 1m53s
Magent CI/CD / deploy-prod (push) Skipped
Magent CI/CD / deploy-beta (push) Successful in 55s

This commit is contained in:
2026-09-15 14:02:08 +12:00
parent c194db167a
commit 6a84e68a03
3 changed files with 63 additions and 22 deletions
+12 -2
View File
@@ -14,7 +14,7 @@ const base = process.env.REVIEW_BASE || 'http://localhost:3114';
if (path.startsWith('/api/operations/')) return route.fulfill({ json: { status: 'complete', events: [] } });
if (path === '/api/requests/search') return route.fulfill({ json: { results: [media] } });
if (path === '/api/requests/request-options') return route.fulfill({ json: { media, destination: { collector: 'Radarr', serverName: 'Movies', defaultProfileId: 6, profiles: [] } } });
if (path === '/api/requests/create') { writes.push(route.request().postDataJSON()); return route.fulfill({ json: { requestId: 12 } }); }
if (path === '/api/requests/create') { writes.push(route.request().postDataJSON()); await new Promise(resolve => setTimeout(resolve, 1200)); return route.fulfill({ json: { requestId: 12 } }); }
return route.fulfill({ json: {} });
});
const page = await context.newPage();
@@ -39,7 +39,17 @@ const base = process.env.REVIEW_BASE || 'http://localhost:3114';
await consent.check();
assert(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth));
await page.getByRole('button', { name: 'Request movie', exact: true }).click();
await page.getByText('Request #12 has been accepted by Seerr.', { exact: true }).waitFor();
const dialog = page.getByRole('dialog');
await dialog.getByRole('heading', { name: 'Sending your request' }).waitFor();
assert(await dialog.getByRole('progressbar').isVisible());
await dialog.getByRole('heading', { name: 'Request received', exact: true }).waitFor();
assert(await dialog.getByRole('button', { name: 'Follow your request' }).isVisible());
assert(await dialog.evaluate(el => el.scrollWidth <= el.clientWidth));
await page.keyboard.press('Escape');
assert(!await dialog.isVisible());
await page.getByRole('button', { name: 'View request progress' }).click();
await dialog.getByRole('button', { name: 'Follow your request' }).click();
await page.waitForURL('**/requests/12');
}
assert.equal(writes.length, 2);
assert(writes.every(w => w.acceptOriginalLanguage === true && w.tmdbId === 1417 && !w.profileId));