mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Add FeaturedInSpotlight
property to API beatmapsets
This commit is contained in:
parent
6e74244022
commit
d5027cdfbd
@ -84,20 +84,26 @@ namespace osu.Game.Tests.Visual.Beatmaps
|
||||
explicitMap.Title = someDifficulties.TitleUnicode = "explicit beatmap";
|
||||
explicitMap.HasExplicitContent = true;
|
||||
|
||||
var spotlightMap = CreateAPIBeatmapSet(Ruleset.Value);
|
||||
spotlightMap.Title = someDifficulties.TitleUnicode = "spotlight beatmap";
|
||||
spotlightMap.FeaturedInSpotlight = true;
|
||||
|
||||
var featuredMap = CreateAPIBeatmapSet(Ruleset.Value);
|
||||
featuredMap.Title = someDifficulties.TitleUnicode = "featured artist beatmap";
|
||||
featuredMap.TrackId = 1;
|
||||
|
||||
var explicitFeaturedMap = CreateAPIBeatmapSet(Ruleset.Value);
|
||||
explicitFeaturedMap.Title = someDifficulties.TitleUnicode = "explicit featured artist";
|
||||
explicitFeaturedMap.HasExplicitContent = true;
|
||||
explicitFeaturedMap.TrackId = 2;
|
||||
var allBadgesMap = CreateAPIBeatmapSet(Ruleset.Value);
|
||||
allBadgesMap.Title = someDifficulties.TitleUnicode = "all-badges beatmap";
|
||||
allBadgesMap.HasExplicitContent = true;
|
||||
allBadgesMap.FeaturedInSpotlight = true;
|
||||
allBadgesMap.TrackId = 2;
|
||||
|
||||
var longName = CreateAPIBeatmapSet(Ruleset.Value);
|
||||
longName.Title = longName.TitleUnicode = "this track has an incredibly and implausibly long title";
|
||||
longName.Artist = longName.ArtistUnicode = "and this artist! who would have thunk it. it's really such a long name.";
|
||||
longName.Source = "wow. even the source field has an impossibly long string in it. this really takes the cake, doesn't it?";
|
||||
longName.HasExplicitContent = true;
|
||||
longName.FeaturedInSpotlight = true;
|
||||
longName.TrackId = 444;
|
||||
|
||||
testCases = new[]
|
||||
@ -108,8 +114,9 @@ namespace osu.Game.Tests.Visual.Beatmaps
|
||||
someDifficulties,
|
||||
manyDifficulties,
|
||||
explicitMap,
|
||||
spotlightMap,
|
||||
featuredMap,
|
||||
explicitFeaturedMap,
|
||||
allBadgesMap,
|
||||
longName
|
||||
};
|
||||
|
||||
|
@ -165,6 +165,17 @@ namespace osu.Game.Tests.Visual.Online
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSpotlightBeatmap()
|
||||
{
|
||||
AddStep("show spotlight map", () =>
|
||||
{
|
||||
var beatmapSet = getBeatmapSet();
|
||||
beatmapSet.FeaturedInSpotlight = true;
|
||||
overlay.ShowBeatmapSet(beatmapSet);
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestFeaturedBeatmap()
|
||||
{
|
||||
@ -176,6 +187,19 @@ namespace osu.Game.Tests.Visual.Online
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestAllBadgesBeatmap()
|
||||
{
|
||||
AddStep("show map with all badges", () =>
|
||||
{
|
||||
var beatmapSet = getBeatmapSet();
|
||||
beatmapSet.HasExplicitContent = true;
|
||||
beatmapSet.FeaturedInSpotlight = true;
|
||||
beatmapSet.TrackId = 1;
|
||||
overlay.ShowBeatmapSet(beatmapSet);
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestHide()
|
||||
{
|
||||
|
@ -42,6 +42,9 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
[JsonProperty(@"nsfw")]
|
||||
public bool HasExplicitContent { get; set; }
|
||||
|
||||
[JsonProperty(@"spotlight")]
|
||||
public bool FeaturedInSpotlight { get; set; }
|
||||
|
||||
[JsonProperty(@"video")]
|
||||
public bool HasVideo { get; set; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user