This commit is contained in:
2026-06-18 21:07:28 -04:00
parent eefbb62eb7
commit 50dcc8e55c
29 changed files with 502 additions and 179 deletions
+3 -7
View File
@@ -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);
}
}
}
+3 -3
View File
@@ -1,5 +1,5 @@
using Microsoft.Playwright.NUnit;
using Microsoft.Playwright;
using Microsoft.Playwright.NUnit;
namespace Tests;
@@ -25,7 +25,7 @@ public class TelerikLicenseTests : PageTest
await Expect(licenseWarning).Not.ToBeVisibleAsync();
// 4. Also verify that no "Trial" banner is visible
var trialBanner = Page.GetByText("Telerik UI for Blazor Trial", new() { Exact = false });
var trialBanner = Page.GetByText("Telerik UI for Blazor Trial", new PageGetByTextOptions { Exact = false });
await Expect(trialBanner).Not.ToBeVisibleAsync();
}
}
}
+2 -2
View File
@@ -11,14 +11,14 @@
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0"/>
<PackageReference Include="Microsoft.Playwright.NUnit" Version="1.60.0" />
<PackageReference Include="Microsoft.Playwright.NUnit" Version="1.60.0"/>
<PackageReference Include="NUnit" Version="4.3.2"/>
<PackageReference Include="NUnit.Analyzers" Version="4.7.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj" />
<ProjectReference Include="..\Model\Model.csproj"/>
</ItemGroup>
<ItemGroup>