From 3634a03da62e62de9730d64cc023e1f754f091e8 Mon Sep 17 00:00:00 2001 From: Amir Pournasserian Date: Mon, 30 Nov 2026 22:07:41 -0500 Subject: [PATCH 1/2] Wait for .NET to hear each opening of the typed confirmation --- tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs b/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs index 58ab340..3a49716 100644 --- a/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs +++ b/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs @@ -215,6 +215,9 @@ public async Task ATypedConfirmationOpensOnItsFieldAndAnIncorrectNameCannotConfi await Expect(dialog).ToBeVisibleAsync(); await Expect(dialog).ToHaveRoleAsync(AriaRole.Alertdialog); await keys.AssertFocusAsync(SiteName); + // The browser reports the opening a task after it, and keys typed at once can hold that report back until + // after the confirm: .NET then hears the confirm close the dialog and the opening after it (record 0006). + 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 +241,7 @@ public async Task ATypedConfirmationOpensOnItsFieldAndAnIncorrectNameCannotConfi await PressOnAsync(page, SiteOpen); await keys.AssertFocusAsync(SiteName); + await HeardAsync(dialog, mode, 2); await Expect(name).ToHaveValueAsync(""); await keys.TypeAsync("Northwind Journal"); Assert.True(await name.EvaluateAsync("el => el.matches(':valid')")); From f0a07a1cc6697d4c1340c0a371d5ea76b4484f29 Mon Sep 17 00:00:00 2001 From: Amir Pournasserian Date: Mon, 30 Nov 2026 22:12:27 -0500 Subject: [PATCH 2/2] Put the reason on the wait that needs it --- tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs b/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs index 3a49716..c7fa60a 100644 --- a/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs +++ b/tests/FluentCMS.Components.Browser/Overlays/DialogTests.cs @@ -215,8 +215,6 @@ public async Task ATypedConfirmationOpensOnItsFieldAndAnIncorrectNameCannotConfi await Expect(dialog).ToBeVisibleAsync(); await Expect(dialog).ToHaveRoleAsync(AriaRole.Alertdialog); await keys.AssertFocusAsync(SiteName); - // The browser reports the opening a task after it, and keys typed at once can hold that report back until - // after the confirm: .NET then hears the confirm close the dialog and the opening after it (record 0006). await HeardAsync(dialog, mode, 1); // The browser holds the form back: with nothing typed, and with a name that is not the name. @@ -241,6 +239,8 @@ 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");