fix(admin): complete processing diagnostics and failure evidence
This commit is contained in:
@@ -48,9 +48,19 @@ test('[D] Real administrator/owner boundaries, actual cancellation history and r
|
||||
await page.context().route('**/*', route => ['localhost', '127.0.0.1'].includes(new URL(route.request().url()).hostname) ? route.continue() : route.abort());
|
||||
await page.goto('/admin/processing');
|
||||
await page.getByLabel('Owner ID', { exact: true }).fill(owner.id);
|
||||
await page.getByLabel('Search users, jobs or task ID', { exact: true }).fill(id);
|
||||
await page.getByLabel('Worker filter', { exact: true }).selectOption('untracked');
|
||||
await page.getByLabel('Submitted from (UTC)', { exact: true }).fill('2020-01-01');
|
||||
await page.getByLabel('Submitted before (UTC)', { exact: true }).fill('2100-01-01');
|
||||
await page.getByLabel('Application ID', { exact: true }).fill('2147483647');
|
||||
await page.getByRole('button', { name: 'Apply filters', exact: true }).click();
|
||||
await expect(page.getByText('No processing jobs match these filters.', { exact: true })).toBeVisible();
|
||||
await page.getByLabel('Application ID', { exact: true }).fill('');
|
||||
await page.getByRole('button', { name: 'Apply filters', exact: true }).click();
|
||||
await page.getByRole('button', { name: `View processing details ${id}`, exact: true }).click();
|
||||
await expect(page.getByLabel('Correlation ID', { exact: true })).toHaveValue(id);
|
||||
await expect(page.getByLabel('Submitting user ID', { exact: true })).toHaveValue(owner.id);
|
||||
await expect(page.getByText('No linked job', { exact: true })).toBeVisible();
|
||||
await expect(page.getByText('No retained events. Older jobs may predate event recording.', { exact: true })).toBeVisible();
|
||||
const cancellation = await ownerClient.post(`${api}/operations/${id}/cancel`, { headers: owner.headers });
|
||||
expect(cancellation.status()).toBe(200);
|
||||
|
||||
@@ -58,6 +58,8 @@ for (const [language, mode] of [['en', 'light'], ['nb', 'dark']] as const) {
|
||||
await fs.writeFile(`${extension}/background.js`, 'globalThis.auditZoomReady = true;');
|
||||
const context = await playwright.chromium.launchPersistentContext(info.outputPath('local-browser-profile'), {
|
||||
channel: 'chromium', headless: true, viewport: null, deviceScaleFactor: undefined,
|
||||
// The bundled browser otherwise disables the extension that owns real tab zoom.
|
||||
ignoreDefaultArgs: ['--disable-extensions'],
|
||||
args: ['--window-size=1280,900', `--disable-extensions-except=${extension}`, `--load-extension=${extension}`],
|
||||
});
|
||||
const admin = await playwright.request.newContext();
|
||||
@@ -65,6 +67,7 @@ for (const [language, mode] of [['en', 'light'], ['nb', 'dark']] as const) {
|
||||
let createdAdminId: string | undefined;
|
||||
const records: unknown[] = [];
|
||||
try {
|
||||
const worker = context.serviceWorkers()[0] || await context.waitForEvent('serviceworker');
|
||||
await context.route('**/*', route => {
|
||||
const url = new URL(route.request().url());
|
||||
return ['localhost', '127.0.0.1'].includes(url.hostname) || ['data:', 'blob:', 'about:'].includes(url.protocol) ? route.continue() : route.abort();
|
||||
@@ -77,7 +80,6 @@ for (const [language, mode] of [['en', 'light'], ['nb', 'dark']] as const) {
|
||||
await page.emulateMedia({ reducedMotion: 'reduce' });
|
||||
await page.goto('http://localhost:3300/login');
|
||||
await expect(page.getByRole('heading', { name: translations[language].signInTitle, exact: true })).toBeVisible();
|
||||
const worker = context.serviceWorkers()[0] || await context.waitForEvent('serviceworker');
|
||||
const zoom = async (factor: number) => {
|
||||
const result = await worker.evaluate(async factor => {
|
||||
// The extension changes real tab zoom, rather than emulating a narrow viewport or pinch.
|
||||
|
||||
Reference in New Issue
Block a user