More simplifies + fix test

This commit is contained in:
KingLuigi4932
2019-06-19 03:37:08 +03:00
parent a0609f28d7
commit 3876442143
3 changed files with 21 additions and 13 deletions

View File

@ -242,6 +242,8 @@ namespace osu.Game.Tests.Visual.Online
}, false);
});
downloadAssert(true);
AddStep(@"show second", () =>
{
overlay.ShowBeatmapSet(new BeatmapSetInfo
@ -408,6 +410,8 @@ namespace osu.Game.Tests.Visual.Online
},
}, false);
});
downloadAssert(true);
}
[Test]
@ -559,6 +563,8 @@ namespace osu.Game.Tests.Visual.Online
}, false);
});
downloadAssert(true);
AddStep(@"show undownloadable", () =>
{
overlay.ShowBeatmapSet(new BeatmapSetInfo
@ -705,7 +711,12 @@ namespace osu.Game.Tests.Visual.Online
}, false);
});
AddAssert(@"is download button removed", () => overlay.Header.DownloadButtonsContainer.Any());
downloadAssert(false);
}
private void downloadAssert(bool shown)
{
AddAssert($"is download button {(shown ? "shown" : "hidden")}", () => overlay.Header.DownloadButtonsContainer.Any() == shown);
}
[Test]