Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
Fix flaky test and smol refactor (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminsampica authored Aug 21, 2022
1 parent 00f7b3f commit 0705420
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Tests/Features/FreeAgents/BidCountdownTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void CountsDownEverySecondUntilZero()
});

cut.WaitForState(() => cut.Markup.Contains("1 second"), TimeSpan.FromSeconds(5));
cut.WaitForState(() => cut.Markup.Contains("0 seconds"));
cut.WaitForState(() => cut.Markup.Contains("0 seconds"), TimeSpan.FromSeconds(3));

cut.Render();
cut.Markup.Should().Contain("0 seconds");
Expand Down
10 changes: 5 additions & 5 deletions src/Tests/RedirectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace DynamoLeagueBlazor.Tests;

public class RedirectTests
public class RedirectTests : IntegrationTestBase
{
[Fact]
public async Task GivenAnyRequest_WhenIsHttp_ThenIsRedirectedToHttps()
{
var webApplicationFactory = new WebApplicationFactory<Program>();
var application = CreateUnauthenticatedApplication();

var client = webApplicationFactory.CreateClient(new WebApplicationFactoryClientOptions
var client = application.CreateClient(new WebApplicationFactoryClientOptions
{
AllowAutoRedirect = false,
BaseAddress = new Uri("http://www.test.com")
Expand All @@ -23,9 +23,9 @@ public async Task GivenAnyRequest_WhenIsHttp_ThenIsRedirectedToHttps()
[Fact]
public async Task GivenAnyRequest_WhenIsNotWww_ThenIsRedirectedToWww()
{
var webApplicationFactory = new WebApplicationFactory<Program>();
var application = CreateUnauthenticatedApplication();

var client = webApplicationFactory.CreateClient(new WebApplicationFactoryClientOptions
var client = application.CreateClient(new WebApplicationFactoryClientOptions
{
AllowAutoRedirect = false,
BaseAddress = new Uri("https://test.com")
Expand Down

0 comments on commit 0705420

Please sign in to comment.