Fix toast timeout bug

Always waited 5s on every test to dismiss the toast.
This commit is contained in:
Timo K.
2026-11-26 11:43:58 +01:00
parent 4daf10d043
commit 9cb668eabb
+5 -2
View File
@@ -206,8 +206,11 @@ export class TestHelpers {
await expect(dialog).toBeHidden({ timeout: 5000 });
}
// The same element shows the next toast a moment after the click, so
// reading it straight away acts on the dismissed one a second time
await expect(toastTitle).not.toHaveText(title, { timeout: 5000 });
// reading it straight away acts on the dismissed one a second time.
// Counted rather than read, as the last toast leaves no title behind.
await expect(toastTitle.filter({ hasText: title })).toHaveCount(0, {
timeout: 5000,
});
} else {
// Unknown toast. We don't want to act on unknown toasts
break;