Adding vibe tests
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using Microsoft.Playwright;
|
||||
|
||||
namespace Tests.PageObjects;
|
||||
|
||||
public abstract class BasePage
|
||||
{
|
||||
protected readonly IPage Page;
|
||||
protected readonly string BaseUrl = "http://localhost:5256";
|
||||
|
||||
protected BasePage(IPage page)
|
||||
{
|
||||
Page = page;
|
||||
}
|
||||
|
||||
public async Task NavigateToAsync(string path)
|
||||
{
|
||||
await Page.GotoAsync($"{BaseUrl}{path}");
|
||||
}
|
||||
|
||||
public ILocator GetHeading() => Page.Locator("h1");
|
||||
}
|
||||
Reference in New Issue
Block a user