Skip to content

Commit 5cb4762

Browse files
Update DetailView.cs
1 parent a4ebc48 commit 5cb4762

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

AudioCuesheetEditor.End2EndTests/Models/DetailView.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,23 @@ internal async Task EditTrackAsync(string? artist = null, string? title = null)
4848
{
4949
await _page.Locator("td:nth-child(3)").ClickAsync();
5050
await _page.Locator("td:nth-child(3)").Last.GetByRole(AriaRole.Textbox).FillAsync(artist);
51+
// Autocomplete overlay will pop up, so we close it
5152
await _page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Visible });
5253
await _page.Keyboard.PressAsync("Escape");
54+
await _page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Detached });
55+
// Click outside the autocomplete to have an focus lost event for getting the value written to model
5356
await _page.GetByRole(AriaRole.Heading, new() { Name = "Playback" }).ClickAsync();
5457
await _page.WaitForTimeoutAsync(100);
5558
}
5659
if (title != null)
5760
{
5861
await _page.Locator("td:nth-child(4)").ClickAsync();
5962
await _page.Locator("td:nth-child(4)").Last.GetByRole(AriaRole.Textbox).FillAsync(title);
63+
// Autocomplete overlay will pop up, so we close it
6064
await _page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Visible });
6165
await _page.Keyboard.PressAsync("Escape");
66+
await _page.Locator(".mud-popover-open").WaitForAsync(new() { State = WaitForSelectorState.Detached });
67+
// Click outside the autocomplete to have an focus lost event for getting the value written to model
6268
await _page.GetByRole(AriaRole.Heading, new() { Name = "Playback" }).ClickAsync();
6369
await _page.WaitForTimeoutAsync(100);
6470
}

0 commit comments

Comments
 (0)