Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry some UI tests #2006

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="$(SwashbuckleAspNetCoreVersion)" />
<PackageVersion Include="Swashbuckle.AspNetCore.Annotations" Version="$(SwashbuckleAspNetCoreVersion)" />
<PackageVersion Include="xRetry" Version="1.9.0" />
<PackageVersion Include="xunit" Version="2.5.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
Expand Down
5 changes: 3 additions & 2 deletions tests/LondonTravel.Site.Tests/Integration/AlexaTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Primitives;
using xRetry;

namespace MartinCostello.LondonTravel.Site.Integration;

Expand All @@ -27,7 +28,7 @@ public AlexaTests(HttpServerFixture fixture, ITestOutputHelper outputHelper)
Fixture.Services!.GetRequiredService<InMemoryDocumentStore>().Clear();
}

[Theory]
[RetryTheory]
[ClassData(typeof(BrowsersTestData))]
public async Task Can_Authorize_Alexa(string browserType, string? browserChannel)
{
Expand All @@ -52,7 +53,7 @@ await WithNavigatorAsync(
});
}

[Theory]
[RetryTheory]
[ClassData(typeof(BrowsersTestData))]
public async Task Can_Get_Preferences_From_Api(string browserType, string? browserChannel)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using MartinCostello.LondonTravel.Site.Pages;
using Microsoft.Extensions.DependencyInjection;
using xRetry;

namespace MartinCostello.LondonTravel.Site.Integration;

Expand Down Expand Up @@ -54,7 +55,7 @@ await AtPageAsync<HomePage>(
});
}

[Theory]
[RetryTheory]
[ClassData(typeof(BrowsersTestData))]
public async Task Can_Delete_Account(string browserType, string? browserChannel)
{
Expand Down Expand Up @@ -85,7 +86,7 @@ await page.DeleteAccountAsync()
});
}

[Theory]
[RetryTheory]
[ClassData(typeof(BrowsersTestData))]
public async Task Can_Link_Accounts(string browserType, string? browserChannel)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public PreferencesTests(HttpServerFixture fixture, ITestOutputHelper outputHelpe
Fixture.Services!.GetRequiredService<InMemoryDocumentStore>().Clear();
}

[Theory]
[xRetry.RetryTheory]
[ClassData(typeof(BrowsersTestData))]
public async Task Can_Manage_Preferences(string browserType, string? browserChannel)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<PackageReference Include="Microsoft.Playwright" />
<PackageReference Include="NSubstitute" />
<PackageReference Include="Shouldly" />
<PackageReference Include="xRetry" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" />
<PackageReference Include="Xunit.SkippableFact" />
Expand Down