Skip to content

Commit 7d100c5

Browse files
committed
Fix test in line with new expectations
1 parent e9ce968 commit 7d100c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

osu.Game.Tests/Visual/Beatmaps/TestSceneBeatmapCardThumbnail.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void TestThumbnailPreview()
4242
};
4343
});
4444
AddStep("enable dim", () => thumbnail.Dimmed.Value = true);
45-
AddUntilStep("button visible", () => playButton.IsPresent);
45+
AddUntilStep("button visible", () => playButton.Alpha == 1);
4646

4747
AddStep("click button", () =>
4848
{
@@ -70,15 +70,15 @@ public void TestThumbnailPreview()
7070

7171
AddStep("disable dim", () => thumbnail.Dimmed.Value = false);
7272
AddWaitStep("wait some", 3);
73-
AddAssert("button still visible", () => playButton.IsPresent);
73+
AddAssert("button still visible", () => playButton.Alpha == 1);
7474

7575
// The track plays in real-time, so we need to check for progress in increments to avoid timeout.
7676
AddUntilStep("progress > 0.25", () => thumbnail.ChildrenOfType<PlayButton>().Single().Progress.Value > 0.25);
7777
AddUntilStep("progress > 0.5", () => thumbnail.ChildrenOfType<PlayButton>().Single().Progress.Value > 0.5);
7878
AddUntilStep("progress > 0.75", () => thumbnail.ChildrenOfType<PlayButton>().Single().Progress.Value > 0.75);
7979

8080
AddUntilStep("wait for track to end", () => !playButton.Playing.Value);
81-
AddUntilStep("button hidden", () => !playButton.IsPresent);
81+
AddUntilStep("button hidden", () => playButton.Alpha == 0);
8282
}
8383

8484
private void iconIs(IconUsage usage) => AddUntilStep("icon is correct", () => playButton.ChildrenOfType<SpriteIcon>().Any(icon => icon.Icon.Equals(usage)));

0 commit comments

Comments
 (0)