diff --git a/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs b/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs index 58ab340..c7fa60a 100644 --- a/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs +++ b/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs @@ -215,6 +215,7 @@ public async Task ATypedConfirmationOpensOnItsFieldAndAnIncorrectNameCannotConfi await Expect(dialog).ToBeVisibleAsync(); await Expect(dialog).ToHaveRoleAsync(AriaRole.Alertdialog); await keys.AssertFocusAsync(SiteName); + await HeardAsync(dialog, mode, 1); // The browser holds the form back: with nothing typed, and with a name that is not the name. await keys.PressAsync("Enter"); @@ -238,6 +239,9 @@ public async Task ATypedConfirmationOpensOnItsFieldAndAnIncorrectNameCannotConfi await PressOnAsync(page, SiteOpen); await keys.AssertFocusAsync(SiteName); + // The browser reports an opening a task after it, and keys typed at once can hold that report back until after + // the confirm. .NET would then hear the opening last, and its model would leave the dialog open (record 0006). + await HeardAsync(dialog, mode, 2); await Expect(name).ToHaveValueAsync(""); await keys.TypeAsync("Northwind Journal"); Assert.True(await name.EvaluateAsync("el => el.matches(':valid')"));