Skip to content

Commit

Permalink
Merge pull request #1692 from Nexus-Mods/disable-ui-test
Browse files Browse the repository at this point in the history
Disable View and Overlay tests from CI to prevent stalling
  • Loading branch information
Al12rs authored Jun 26, 2024
2 parents 7550468 + 0761e3d commit cdfcc2d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tests/NexusMods.UI.Tests/Controls/LaunchButtonViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ protected override async Task PostInitializeSetup()
}

[Fact]
[Trait("FlakeyTest", "True")]
public async Task ClickingTheButtonFiresTheCommand()
{
var source = new TaskCompletionSource<bool>();
Expand All @@ -49,6 +50,7 @@ await EventuallyOnUi(() =>
}

[Fact]
[Trait("FlakeyTest", "True")]
public async Task LabelTextAffectsButtonAndProgressText()
{
var text = Random.Shared.Next() + " Text";
Expand All @@ -61,7 +63,6 @@ await EventuallyOnUi(() =>
}

[Fact]
// Seems to very seldom stall CI, could be made to fail if run un repeat for enough times locally
[Trait("FlakeyTest", "True")]
public async Task ProgressAffectsProgressBar()
{
Expand All @@ -83,6 +84,7 @@ await EventuallyOnUi(() =>
}

[Fact]
[Trait("FlakeyTest", "True")]
public async Task InProgressTaskAffectsControlVisibility()
{
var tcs = new TaskCompletionSource();
Expand Down Expand Up @@ -110,6 +112,7 @@ await EventuallyOnUi(() =>
}

[Fact]
[Trait("FlakeyTest", "True")]
public async Task DisablingTheButtonShowsATheProgressBar()
{

Expand All @@ -125,6 +128,7 @@ await EventuallyOnUi(() =>
}

[Fact]
[Trait("FlakeyTest", "True")]
public async Task EnabledCommandShouldShowEnabledButton()
{
var subject = new Subject<bool>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class DownloadButtonViewTests : AViewTest<SpineDownloadButtonView, SpineD
public DownloadButtonViewTests(IServiceProvider provider) : base(provider) { }

[Fact]
[Trait("FlakeyTest", "True")]
public async Task SettingButtonToActiveAppliesProperClass()
{
var button = await Host.GetViewControl<Button>("ParentButton");
Expand All @@ -30,6 +31,8 @@ await EventuallyOnUi(() =>
}

[Fact]
[Trait("FlakeyTest", "True")]

public async Task SettingProgressSetsClassesAndValues()
{
var button = await Host.GetViewControl<Button>("ParentButton");
Expand Down Expand Up @@ -70,6 +73,8 @@ await OnUi(() =>
}

[Fact]
[Trait("FlakeyTest", "True")]

public async Task SettingUnitAndNumberChangesTextValues()
{
var numberBlock = await Host.GetViewControl<TextBlock>("NumberTextBlock");
Expand Down Expand Up @@ -110,6 +115,8 @@ await EventuallyOnUi(() =>
}

[Fact]
[Trait("FlakeyTest", "True")]

public async Task ClickingTheButtonTriggersTheCommand()
{
await ButtonShouldFireReactiveCommand(vm => vm.Click, "ParentButton");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class NexusLoginOverlayTests
{

[Fact]
[Trait("FlakeyTest", "True")]
public async Task LoginTasksCreateOverlays()
{
var overlayController = new OverlayController();
Expand Down
7 changes: 6 additions & 1 deletion tests/NexusMods.UI.Tests/Overlays/OverlayViewModelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace NexusMods.UI.Tests.Overlays;
public class OverlayViewModelTests
{
[Fact]
[Trait("FlakeyTest", "True")]

public void SetOverlayContent_CanGetLastOverlayViewModel()
{
// Arrange
Expand All @@ -22,6 +24,8 @@ public void SetOverlayContent_CanGetLastOverlayViewModel()
}

[Fact]
[Trait("FlakeyTest", "True")]

public void SetOverlayContent_WithTwoOverlays_CanGetLastOverlayViewModel()
{
// Arrange
Expand Down Expand Up @@ -50,6 +54,8 @@ public void SetOverlayContent_WithTwoOverlays_CanGetLastOverlayViewModel()
}

[Fact]
[Trait("FlakeyTest", "True")]

public void SetOverlayContent_WithThreeOverlays_CanGetLastOverlayViewModel()
{
// Arrange
Expand Down Expand Up @@ -86,7 +92,6 @@ public void SetOverlayContent_WithThreeOverlays_CanGetLastOverlayViewModel()
}

[Fact]
// intermittent failures on CI but not locally
[Trait("FlakeyTest", "True")]
public async Task SetOverlayViewModel_WhenActiveIsFalse_TaskIsCompleted()
{
Expand Down
3 changes: 3 additions & 0 deletions tests/NexusMods.UI.Tests/Overlays/UpdaterViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class UpdaterViewTests : AViewTest<UpdaterView, UpdaterDesignViewModel, I
public UpdaterViewTests(IServiceProvider provider) : base(provider) { }

[Fact]
[Trait("FlakeyTest", "True")]
public async Task ClickingUpdateCallsTheCommand()
{
var controller = new OverlayController();
Expand All @@ -28,6 +29,7 @@ await EventuallyOnUi(() =>
}

[Fact]
[Trait("FlakeyTest", "True")]
public async Task ShowChangelogIsWiredCorrectly()
{
var controller = new OverlayController();
Expand All @@ -43,6 +45,7 @@ await EventuallyOnUi(() =>
}

[Fact]
[Trait("FlakeyTest", "True")]
public async Task ClickingLaterClosesTheOverlay()
{
var controller = new OverlayController();
Expand Down

0 comments on commit cdfcc2d

Please sign in to comment.