M15: synchronize contracts and acceptance
This commit is contained in:
@@ -237,17 +237,17 @@ test.describe("knowledge base is grounded in the operator's own language", () =>
|
||||
{
|
||||
lang: "nl-BE",
|
||||
question: "Wat moet ik doen wanneer een voertuig beschadigd terugkomt?",
|
||||
sourceHint: /schadeafhandeling/i,
|
||||
sourceHint: /zichtbare of gemelde schade/i,
|
||||
},
|
||||
{
|
||||
lang: "en-GB",
|
||||
question: "What should I do when a vehicle returns with damage?",
|
||||
sourceHint: /damage/i,
|
||||
sourceHint: /visible or reported damage/i,
|
||||
},
|
||||
{
|
||||
lang: "fr-BE",
|
||||
question: "Que dois-je faire lorsqu'un véhicule revient endommagé ?",
|
||||
sourceHint: /dommages/i,
|
||||
sourceHint: /dommages visibles ou signalés/i,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -258,7 +258,9 @@ test.describe("knowledge base is grounded in the operator's own language", () =>
|
||||
await page.goto("/knowledge");
|
||||
await page.locator("#knowledge-question").fill(question);
|
||||
await page.getByRole("button", { name: /^(Vraag stellen|Ask|Demander)$/ }).click();
|
||||
await expect(page.getByText(sourceHint).first()).toBeVisible({ timeout: 10_000 });
|
||||
const localizedSource = page.locator(".source-card", { hasText: sourceHint }).first();
|
||||
await expect(localizedSource).toBeVisible({ timeout: 15_000 });
|
||||
await expect(localizedSource).toContainText(/damage-procedure\.md|Damage handling|schadeafhandeling|gestion des dommages/i);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -300,12 +302,13 @@ test("automation shows a localized error explanation with the raw error only und
|
||||
await loginAsOpsManager(page, "nl-BE");
|
||||
await page.goto("/automation");
|
||||
|
||||
await expect(page.getByText(/tijdelijk niet bereikbaar/).first()).toBeVisible();
|
||||
const localizedSummary = /Gesimuleerde time-out richting de workflowdienst/;
|
||||
await expect(page.getByText(localizedSummary).first()).toBeVisible();
|
||||
await expect(page.getByText("Synthetic connection timeout to n8n")).not.toBeVisible();
|
||||
// Scope to the failed job's own row -- the workflow-evidence table above it also has
|
||||
// "Technische details" toggles (one per workflow), so an unscoped .first() can open
|
||||
// the wrong one.
|
||||
const failedJobRow = page.locator("tr", { has: page.getByText(/tijdelijk niet bereikbaar/) });
|
||||
const failedJobRow = page.locator("tr", { has: page.getByText(localizedSummary) });
|
||||
await failedJobRow.getByText("Technische details").click();
|
||||
await expect(page.getByText("Synthetic connection timeout to n8n")).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user