M31: verify RAG inventory and polish attention queue
MobilityOps acceptance / backend (push) Canceled after 0s
MobilityOps acceptance / frontend (push) Canceled after 0s

This commit is contained in:
NuklearRabbit
2026-08-10 20:58:26 +02:00
parent cfffb1ce54
commit efab8d816f
16 changed files with 314 additions and 38 deletions
+6 -3
View File
@@ -233,25 +233,28 @@ test.describe("MO-016 status conflict is order-independent", () => {
});
test.describe("knowledge base is grounded in the operator's own language", () => {
const cases: { lang: string; question: string; sourceHint: RegExp }[] = [
const cases: { lang: string; question: string; sourceHint: RegExp; sourceTitle: string }[] = [
{
lang: "nl-BE",
question: "Wat moet ik doen wanneer een voertuig beschadigd terugkomt?",
sourceHint: /zichtbare of gemelde schade/i,
sourceTitle: "Procedure schadeafhandeling",
},
{
lang: "en-GB",
question: "What should I do when a vehicle returns with damage?",
sourceHint: /visible or reported damage/i,
sourceTitle: "Damage handling procedure",
},
{
lang: "fr-BE",
question: "Que dois-je faire lorsqu'un véhicule revient endommagé ?",
sourceHint: /dommages visibles ou signalés/i,
sourceTitle: "Procédure de gestion des dommages",
},
];
for (const { lang, question, sourceHint } of cases) {
for (const { lang, question, sourceHint, sourceTitle } of cases) {
test(`grounded ${lang} answer cites a ${lang} source about damage`, async ({ page, request }) => {
await resetDemoData(request);
await loginAsOpsManager(page, lang);
@@ -260,7 +263,7 @@ test.describe("knowledge base is grounded in the operator's own language", () =>
await page.getByRole("button", { name: /^(Vraag stellen|Ask|Demander)$/ }).click();
const localizedSource = page.locator(".source-card", { hasText: sourceHint }).first();
await expect(localizedSource).toBeVisible({ timeout: 15_000 });
await expect(localizedSource).toContainText(/Schade bij voertuigretour|Vehicle return damage|Dommages au retour du véhicule/i);
await expect(localizedSource).toContainText(sourceTitle);
});
}
});