Show script results directly on order details
This commit is contained in:
@@ -32,12 +32,14 @@ function privateJson(file) {
|
||||
await page.getByLabel('Kunde', { exact: true }).selectOption(expected.tenant_id);
|
||||
assert.equal(await page.getByLabel('Kunde', { exact: true }).inputValue(), expected.tenant_id);
|
||||
await page.getByRole('link', { name: 'Aufträge', exact: true }).click();
|
||||
const response = page.waitForResponse(r => new URL(r.url()).pathname === `/api/v1/tenants/${expected.tenant_id}/jobs/${expected.job_id}` && r.status() === 200);
|
||||
await page.locator('tr[data-operation-id="' + expected.operation_id + '"]').getByRole('button').click();
|
||||
const op = page.locator('section[data-operation-id="' + expected.operation_id + '"]');
|
||||
const response = page.waitForResponse(r => new URL(r.url()).pathname === `/api/v1/tenants/${expected.tenant_id}/jobs/${expected.job_id}` && r.status() === 200);
|
||||
await op.locator('button[data-job-id="' + expected.job_id + '"]').click();
|
||||
const detail = op.locator('article[data-job-id="' + expected.job_id + '"]');
|
||||
const showResult = op.locator('button[data-job-id="' + expected.job_id + '"]');
|
||||
await detail.or(showResult).first().waitFor();
|
||||
if (await showResult.isVisible()) await showResult.click();
|
||||
const http = await (await response).json();
|
||||
const detail = page.locator('article[data-job-id="' + expected.job_id + '"]');
|
||||
|
||||
const rendered = await readTechnicalData(detail, 'Technische Ausführungsdaten');
|
||||
assert.equal(http.state, 'succeeded'); assert.deepEqual(http, expected.result); assert.deepEqual(rendered, expected.result);
|
||||
|
||||
Reference in New Issue
Block a user