test(e2e): tighten J12 import status regex to match only import-specific messages
The previous regex /Importiert|Dokument|Import|Läuft|DONE|laufend/i was too broad — it would match almost any German text on the page including unrelated copy. Replaced with /Import läuft|Import abgeschlossen|Fehler:/ which matches only the three status messages the mass import feature actually emits. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -233,10 +233,9 @@ test.describe('Admin system tab — mass import trigger', () => {
|
||||
await expect(importBtn.first()).toBeVisible({ timeout: 10_000 });
|
||||
await importBtn.first().click();
|
||||
|
||||
// After triggering, either a RUNNING status text appears (job started)
|
||||
// or a DONE/FAILED result text appears (job finished quickly or was already done).
|
||||
// After triggering, a status message specific to the import operation appears.
|
||||
await expect(
|
||||
page.locator('text=/Importiert|Dokument|Import|Läuft|DONE|laufend/i').first()
|
||||
page.locator('text=/Import läuft|Import abgeschlossen|Fehler:/').first()
|
||||
).toBeVisible({ timeout: 15_000 });
|
||||
|
||||
await page.screenshot({ path: 'test-results/e2e/admin-mass-import-triggered.png' });
|
||||
|
||||
Reference in New Issue
Block a user