31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
using Microsoft.Playwright;
|
|
|
|
namespace Tests.PageObjects;
|
|
|
|
public class DeckBuilderPage : BasePage
|
|
{
|
|
public DeckBuilderPage(IPage page) : base(page)
|
|
{
|
|
}
|
|
|
|
public ILocator NameInput => Page.Locator(".deck-name-input");
|
|
public ILocator SaveButton => Page.Locator(".save-btn");
|
|
public ILocator CardCountLabel => Page.Locator(".card-count");
|
|
public ILocator ValidityBadge => Page.Locator(".validity-badge");
|
|
public ILocator SaveToast => Page.Locator(".save-toast");
|
|
public ILocator BrowserCards => Page.Locator(".browser-card");
|
|
public ILocator DiverSlots => Page.Locator(".diver-slot");
|
|
public ILocator DiverPickerCards => Page.Locator(".diver-picker-card");
|
|
|
|
public async Task GotoAsync()
|
|
{
|
|
await NavigateToAsync("/deck-builder");
|
|
}
|
|
|
|
public async Task WaitForInteractiveAsync()
|
|
{
|
|
// Wait for Blazor's SignalR circuit to connect and the component to become interactive
|
|
await Page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
|
await Page.WaitForSelectorAsync(".browser-card", new PageWaitForSelectorOptions { Timeout = 10_000 });
|
|
}
|
|
} |