diff --git a/AudioCuesheetEditor.End2EndTests/MSTestSettings.cs b/AudioCuesheetEditor.End2EndTests/MSTestSettings.cs index 2492be6d..aaf278c8 100644 --- a/AudioCuesheetEditor.End2EndTests/MSTestSettings.cs +++ b/AudioCuesheetEditor.End2EndTests/MSTestSettings.cs @@ -1 +1 @@ -[assembly: Parallelize()] +[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)] diff --git a/AudioCuesheetEditor.End2EndTests/Models/DetailView.cs b/AudioCuesheetEditor.End2EndTests/Models/DetailView.cs index 0211bd6c..6a9cc1dc 100644 --- a/AudioCuesheetEditor.End2EndTests/Models/DetailView.cs +++ b/AudioCuesheetEditor.End2EndTests/Models/DetailView.cs @@ -122,11 +122,12 @@ internal async Task OpenRenameAudiofileDialogAsync(int audiofileIndex) async Task EditTrackFieldAsync(int trackPosition, string dataLabel, string value) { - var row = _page.Locator("tbody tr:not([aria-hidden='true'])").Nth(trackPosition - 1); + var row = _page.Locator("tbody tr").Nth(trackPosition); var cell = row.Locator($"td[data-label='{dataLabel}']"); await cell.ClickAsync(); var textbox = cell.Locator("input[type='text']"); await textbox.FillAsync(value); + await textbox.PressAsync("Tab"); // Click outside the autocomplete to have an focus lost event for getting the value written to model await _page.GetByRole(AriaRole.Heading, new() { Name = "Playback" }).ClickAsync(new() { Force = true }); await _page.WaitForTimeoutAsync(100); diff --git a/AudioCuesheetEditor.End2EndTests/Tests/PlaywrightTestBase.cs b/AudioCuesheetEditor.End2EndTests/Tests/PlaywrightTestBase.cs index 0769b36b..3fdebf6c 100644 --- a/AudioCuesheetEditor.End2EndTests/Tests/PlaywrightTestBase.cs +++ b/AudioCuesheetEditor.End2EndTests/Tests/PlaywrightTestBase.cs @@ -40,6 +40,7 @@ public async Task TestInitializeAsync() _testContextInstance = Context; TestPage = Page; } + await _testContextInstance.ClearCookiesAsync(); await _testContextInstance.Tracing.StartAsync(new() { Title = $"{TestContext.FullyQualifiedTestClassName}.{TestContext.TestName}", @@ -68,6 +69,7 @@ await _testContextInstance.Tracing.StopAsync(new() $"{TestContext.FullyQualifiedTestClassName}.{TestContext.TestName}.zip" ) : null, }); + await _testContextInstance.CloseAsync(); } } }