mirror of
https://github.com/vector-im/element-call.git
synced 2026-11-28 10:01:09 +08:00
Fix toast timeout bug
Always waited 5s on every test to dismiss the toast.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user