-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
93 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
using BTCPayApp.UI; | ||
using BTCPayApp.UI.Pages; | ||
using Xunit.Abstractions; | ||
|
||
namespace BTCPayApp.Tests; | ||
|
||
public class UnitTest1 | ||
{ | ||
private readonly ITestOutputHelper _testOutputHelper; | ||
|
||
public UnitTest1(ITestOutputHelper testOutputHelper) | ||
{ | ||
_testOutputHelper = testOutputHelper; | ||
} | ||
|
||
[Fact] | ||
public async Task TestHomePage() | ||
{ | ||
await using var factory = new BTCPayAppTestServer(_testOutputHelper); | ||
var page = await (await factory.InitializeAsync()).NewPageAsync(); | ||
await page.GotoAsync(factory.ServerAddress); | ||
Assert.EndsWith(Routes.Index, page.Url); | ||
|
||
var carousel = page.Locator("#OnboardingCarousel"); | ||
await carousel.Locator("[aria-label='3']").ClickAsync(); | ||
Assert.True(await carousel.GetByTestId("StandaloneButton").IsDisabledAsync()); | ||
|
||
await carousel.GetByTestId("PairButton").ClickAsync(); | ||
Assert.EndsWith(Routes.Pair, page.Url); | ||
} | ||
} | ||
// using BTCPayApp.UI; | ||
// using BTCPayApp.UI.Pages; | ||
// using Xunit.Abstractions; | ||
// | ||
// namespace BTCPayApp.Tests; | ||
// | ||
// public class UnitTest1 | ||
// { | ||
// private readonly ITestOutputHelper _testOutputHelper; | ||
// | ||
// public UnitTest1(ITestOutputHelper testOutputHelper) | ||
// { | ||
// _testOutputHelper = testOutputHelper; | ||
// } | ||
// | ||
// [Fact] | ||
// public async Task TestHomePage() | ||
// { | ||
// await using var factory = new BTCPayAppTestServer(_testOutputHelper); | ||
// var page = await (await factory.InitializeAsync()).NewPageAsync(); | ||
// await page.GotoAsync(factory.ServerAddress); | ||
// Assert.EndsWith(Routes.Index, page.Url); | ||
// | ||
// var carousel = page.Locator("#OnboardingCarousel"); | ||
// await carousel.Locator("[aria-label='3']").ClickAsync(); | ||
// Assert.True(await carousel.GetByTestId("StandaloneButton").IsDisabledAsync()); | ||
// | ||
// await carousel.GetByTestId("PairButton").ClickAsync(); | ||
// Assert.EndsWith(Routes.Pair, page.Url); | ||
// } | ||
// } |