Skip to content

Commit 2d7b021

Browse files
Update DetailView.cs
1 parent 5cb4762 commit 2d7b021

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

AudioCuesheetEditor.End2EndTests/Models/DetailView.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ internal async Task EditTrackAsync(string? artist = null, string? title = null)
5151
// Autocomplete overlay will pop up, so we close it
5252
await _page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Visible });
5353
await _page.Keyboard.PressAsync("Escape");
54-
await _page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Detached });
54+
await Task.WhenAll(
55+
[
56+
_page.Locator(".mud-overlay").WaitForAsync(new() { State = WaitForSelectorState.Detached, Timeout = 5000 }),
57+
_page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Hidden, Timeout = 5000 }),
58+
]);
5559
// Click outside the autocomplete to have an focus lost event for getting the value written to model
5660
await _page.GetByRole(AriaRole.Heading, new() { Name = "Playback" }).ClickAsync();
5761
await _page.WaitForTimeoutAsync(100);
@@ -63,7 +67,11 @@ internal async Task EditTrackAsync(string? artist = null, string? title = null)
6367
// Autocomplete overlay will pop up, so we close it
6468
await _page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Visible });
6569
await _page.Keyboard.PressAsync("Escape");
66-
await _page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Detached });
70+
await Task.WhenAll(
71+
[
72+
_page.Locator(".mud-overlay").WaitForAsync(new() { State = WaitForSelectorState.Detached, Timeout = 5000 }),
73+
_page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Hidden, Timeout = 5000 }),
74+
]);
6775
// Click outside the autocomplete to have an focus lost event for getting the value written to model
6876
await _page.GetByRole(AriaRole.Heading, new() { Name = "Playback" }).ClickAsync();
6977
await _page.WaitForTimeoutAsync(100);

0 commit comments

Comments
 (0)