Adding vibe tests

This commit is contained in:
2026-06-25 10:52:11 -04:00
parent 00e7184b3b
commit f8b0974b79
7 changed files with 219 additions and 8 deletions
+46
View File
@@ -0,0 +1,46 @@
using Microsoft.Playwright;
using Microsoft.Playwright.NUnit;
using Tests.PageObjects;
namespace Tests;
[Parallelizable(ParallelScope.Self)]
[TestFixture]
public class FeatureTests : PageTest
{
private DecksPage _decksPage;
private DeckDetailPage _deckDetailPage;
private AgentsPage _agentsPage;
[SetUp]
public void Setup()
{
_decksPage = new DecksPage(Page);
_deckDetailPage = new DeckDetailPage(Page);
_agentsPage = new AgentsPage(Page);
}
[Test]
public async Task DeckManaCurve_ShouldBeVisibleOnDetail()
{
await _decksPage.GotoAsync();
// Assuming there is at least one deck. If not, this might need a more robust approach.
var deckCards = _decksPage.GetDeckCards();
await Expect(deckCards.First).ToBeVisibleAsync();
await deckCards.First.ClickAsync();
await Expect(_deckDetailPage.ManaCurve).ToBeVisibleAsync();
var barCount = await _deckDetailPage.GetManaBarCountAsync();
Assert.That(barCount, Is.GreaterThan(0));
}
[Test]
public async Task AgentsGrid_ShouldLoadSuccessfully()
{
await _agentsPage.GotoAsync();
await _agentsPage.WaitForGridAsync();
await Expect(_agentsPage.Grid).ToBeVisibleAsync();
}
}