mirror of https://github.com/ppy/osu
Fix test in line with new expectations
This commit is contained in:
parent
e9ce968ae3
commit
7d100c5eec
|
@ -42,7 +42,7 @@ public void TestThumbnailPreview()
|
|||
};
|
||||
});
|
||||
AddStep("enable dim", () => thumbnail.Dimmed.Value = true);
|
||||
AddUntilStep("button visible", () => playButton.IsPresent);
|
||||
AddUntilStep("button visible", () => playButton.Alpha == 1);
|
||||
|
||||
AddStep("click button", () =>
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ public void TestThumbnailPreview()
|
|||
|
||||
AddStep("disable dim", () => thumbnail.Dimmed.Value = false);
|
||||
AddWaitStep("wait some", 3);
|
||||
AddAssert("button still visible", () => playButton.IsPresent);
|
||||
AddAssert("button still visible", () => playButton.Alpha == 1);
|
||||
|
||||
// The track plays in real-time, so we need to check for progress in increments to avoid timeout.
|
||||
AddUntilStep("progress > 0.25", () => thumbnail.ChildrenOfType<PlayButton>().Single().Progress.Value > 0.25);
|
||||
|
@ -78,7 +78,7 @@ public void TestThumbnailPreview()
|
|||
AddUntilStep("progress > 0.75", () => thumbnail.ChildrenOfType<PlayButton>().Single().Progress.Value > 0.75);
|
||||
|
||||
AddUntilStep("wait for track to end", () => !playButton.Playing.Value);
|
||||
AddUntilStep("button hidden", () => !playButton.IsPresent);
|
||||
AddUntilStep("button hidden", () => playButton.Alpha == 0);
|
||||
}
|
||||
|
||||
private void iconIs(IconUsage usage) => AddUntilStep("icon is correct", () => playButton.ChildrenOfType<SpriteIcon>().Any(icon => icon.Icon.Equals(usage)));
|
||||
|
|
Loading…
Reference in New Issue