-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28440 from bdach/daily-challenge/new-screen
Add minimal viable new screen for daily challenge feature
- Loading branch information
Showing
13 changed files
with
497 additions
and
60 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
osu.Game.Tests/Visual/DailyChallenge/TestSceneDailyChallenge.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using System.Linq; | ||
using NUnit.Framework; | ||
using osu.Game.Online.API; | ||
using osu.Game.Online.Rooms; | ||
using osu.Game.Rulesets.Osu.Mods; | ||
using osu.Game.Tests.Resources; | ||
using osu.Game.Tests.Visual.OnlinePlay; | ||
|
||
namespace osu.Game.Tests.Visual.DailyChallenge | ||
{ | ||
public partial class TestSceneDailyChallenge : OnlinePlayTestScene | ||
{ | ||
[Test] | ||
public void TestDailyChallenge() | ||
{ | ||
var room = new Room | ||
{ | ||
RoomID = { Value = 1234 }, | ||
Name = { Value = "Daily Challenge: June 4, 2024" }, | ||
Playlist = | ||
{ | ||
new PlaylistItem(TestResources.CreateTestBeatmapSetInfo().Beatmaps.First()) | ||
{ | ||
RequiredMods = [new APIMod(new OsuModTraceable())], | ||
AllowedMods = [new APIMod(new OsuModDoubleTime())] | ||
} | ||
}, | ||
EndDate = { Value = DateTimeOffset.Now.AddHours(12) }, | ||
Category = { Value = RoomCategory.DailyChallenge } | ||
}; | ||
|
||
AddStep("add room", () => API.Perform(new CreateRoomRequest(room))); | ||
AddStep("push screen", () => LoadScreen(new Screens.OnlinePlay.DailyChallenge.DailyChallenge(room))); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.