Fix assert step not waiting for transformation

This commit is contained in:
ekrctb 2021-07-08 16:40:18 +09:00
parent 8ac3015f14
commit 25b94061fd
1 changed files with 3 additions and 3 deletions

View File

@ -75,11 +75,11 @@ public void TestOpacity()
{ {
AddMoveStep(100, 0); AddMoveStep(100, 0);
AddClickStep(MouseButton.Left); AddClickStep(MouseButton.Left);
AddAssert("outline is semitransparent", () => timeSpanOutline.Alpha < 1); AddUntilStep("outline is semitransparent", () => Precision.DefinitelyBigger(1, timeSpanOutline.Alpha));
AddMoveStep(200, 0); AddMoveStep(200, 0);
AddAssert("outline is opaque", () => Precision.AlmostEquals(timeSpanOutline.Alpha, 1)); AddUntilStep("outline is opaque", () => Precision.AlmostEquals(timeSpanOutline.Alpha, 1));
AddMoveStep(100, 0); AddMoveStep(100, 0);
AddAssert("outline is semitransparent", () => timeSpanOutline.Alpha < 1); AddUntilStep("outline is semitransparent", () => Precision.DefinitelyBigger(1, timeSpanOutline.Alpha));
} }
private TimeSpanOutline timeSpanOutline => Content.ChildrenOfType<TimeSpanOutline>().Single(); private TimeSpanOutline timeSpanOutline => Content.ChildrenOfType<TimeSpanOutline>().Single();