...
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Microsoft.Playwright.NUnit;
|
||||
using Microsoft.Playwright;
|
||||
|
||||
namespace Tests;
|
||||
|
||||
@@ -25,7 +24,7 @@ public class PlaywrightTests : PageTest
|
||||
await Expect(noteInput).ToBeVisibleAsync();
|
||||
|
||||
// 5. Type a unique note
|
||||
string uniqueNote = "Test note " + Guid.NewGuid().ToString();
|
||||
var uniqueNote = "Test note " + Guid.NewGuid();
|
||||
await noteInput.FillAsync(uniqueNote);
|
||||
|
||||
// 6. Blur to trigger save
|
||||
@@ -33,10 +32,7 @@ public class PlaywrightTests : PageTest
|
||||
|
||||
// 7. Wait for saving indicator to disappear (if it appeared)
|
||||
var savingIndicator = Page.Locator(".saving-indicator");
|
||||
if (await savingIndicator.IsVisibleAsync())
|
||||
{
|
||||
await Expect(savingIndicator).Not.ToBeVisibleAsync();
|
||||
}
|
||||
if (await savingIndicator.IsVisibleAsync()) await Expect(savingIndicator).Not.ToBeVisibleAsync();
|
||||
|
||||
// 8. Close the detail view by clicking the backdrop
|
||||
await Page.Locator(".modal-backdrop").ClickAsync();
|
||||
@@ -48,4 +44,4 @@ public class PlaywrightTests : PageTest
|
||||
// 10. Verify the note is still there
|
||||
await Expect(noteInput).ToHaveValueAsync(uniqueNote);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user