test(playwright): seed inside try in Notification filter/modal tests for guaranteed cleanup (review fix)
This commit is contained in:
+11
-9
@@ -183,14 +183,15 @@ public class NotificationActionTests
|
||||
var runId = Guid.NewGuid().ToString("N");
|
||||
var marker = $"zztest-notif-wave4-{runId}";
|
||||
|
||||
// Two Parked rows under the SAME ListName marker, distinct subjects.
|
||||
await NotificationDataSeeder.InsertParkedNotificationAsync(
|
||||
Guid.NewGuid(), marker, "wave4-alpha", "site-a");
|
||||
await NotificationDataSeeder.InsertParkedNotificationAsync(
|
||||
Guid.NewGuid(), marker, "wave4-beta", "site-a");
|
||||
|
||||
try
|
||||
{
|
||||
// Two Parked rows under the SAME ListName marker, distinct subjects.
|
||||
// Seeded inside the try so a mid-seed failure is still cleaned up by the finally.
|
||||
await NotificationDataSeeder.InsertParkedNotificationAsync(
|
||||
Guid.NewGuid(), marker, "wave4-alpha", "site-a");
|
||||
await NotificationDataSeeder.InsertParkedNotificationAsync(
|
||||
Guid.NewGuid(), marker, "wave4-beta", "site-a");
|
||||
|
||||
var page = await _fixture.NewAuthenticatedPageAsync();
|
||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||
@@ -240,11 +241,12 @@ public class NotificationActionTests
|
||||
var runId = Guid.NewGuid().ToString("N");
|
||||
var marker = $"zztest-notif-wave4-{runId}";
|
||||
|
||||
await NotificationDataSeeder.InsertParkedNotificationAsync(
|
||||
Guid.NewGuid(), marker, "wave4-detail", "site-a");
|
||||
|
||||
try
|
||||
{
|
||||
// Seeded inside the try so a mid-seed failure is still cleaned up by the finally.
|
||||
await NotificationDataSeeder.InsertParkedNotificationAsync(
|
||||
Guid.NewGuid(), marker, "wave4-detail", "site-a");
|
||||
|
||||
var page = await _fixture.NewAuthenticatedPageAsync();
|
||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||
|
||||
Reference in New Issue
Block a user