32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
using Microsoft.Playwright.NUnit;
|
|
using Microsoft.Playwright;
|
|
|
|
namespace Tests;
|
|
|
|
[Parallelizable(ParallelScope.Self)]
|
|
[TestFixture]
|
|
public class TelerikLicenseTests : PageTest
|
|
{
|
|
[Test]
|
|
public async Task TelerikLicenseBannerIsNotVisible()
|
|
{
|
|
// 1. Navigate to the agents page which uses Telerik components
|
|
await Page.GotoAsync("http://localhost:8080/agents");
|
|
|
|
// 2. Wait for the page to load and the grid to be visible
|
|
await Page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
|
var grid = Page.Locator(".agents-grid");
|
|
await Expect(grid).ToBeVisibleAsync();
|
|
|
|
// 3. Verify that the Telerik license warning banner is NOT present
|
|
// According to Telerik docs, the warning text is:
|
|
// "We couldn't verify your license key for Telerik UI for Blazor. Please see the build log for details and resolution steps"
|
|
var licenseWarning = Page.GetByText("We couldn't verify your license key for Telerik UI for Blazor");
|
|
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 });
|
|
await Expect(trialBanner).Not.ToBeVisibleAsync();
|
|
}
|
|
}
|