MainLayoutTests.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using Microsoft.Playwright;
  2. using Tests.E2e.Infra;
  3. using Tests.E2e.PageObjectModels;
  4. using Xunit.Abstractions;
  5. namespace Tests.E2e;
  6. public class MainLayoutTests(
  7. PlaywrightFixture fixture,
  8. ITestOutputHelper output) : E2ETestBase(fixture, output) {
  9. private readonly PlaywrightFixture _fixture = fixture;
  10. [Fact]
  11. public async Task Mobile_early_access_banner_links_to_the_discord_invite() {
  12. (IBrowserContext context, IPage page) = await CreatePageAsync();
  13. try {
  14. await page.GotoAsync(_fixture.BaseUrl);
  15. var layout = new MainLayoutPom(page);
  16. await layout.AssertLoadedAsync();
  17. await Assertions.Expect(layout.MobileEarlyAccess).ToBeVisibleAsync();
  18. await Assertions.Expect(layout.MobileEarlyAccess).ToHaveAttributeAsync(
  19. "href",
  20. "https://discord.gg/egXRPdesee");
  21. await Assertions.Expect(layout.MobileEarlyAccess).ToHaveAttributeAsync(
  22. "target",
  23. "_blank");
  24. }
  25. finally {
  26. await context.CloseAsync();
  27. }
  28. }
  29. }