2021-10-13 11:19:10 +08:00
|
|
|
// 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.Linq;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Framework.Testing;
|
2021-10-15 12:26:31 +08:00
|
|
|
using osu.Game.Overlays.Notifications;
|
2021-10-13 11:19:10 +08:00
|
|
|
using osu.Game.Tests.Resources;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Navigation
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
public partial class TestSceneStartupImport : OsuGameTestScene
|
2021-10-13 11:19:10 +08:00
|
|
|
{
|
2022-09-06 03:07:49 +08:00
|
|
|
private string? importFilename;
|
2021-10-13 11:19:10 +08:00
|
|
|
|
|
|
|
protected override TestOsuGame CreateTestGame() => new TestOsuGame(LocalStorage, API, new[] { importFilename });
|
|
|
|
|
|
|
|
public override void SetUpSteps()
|
|
|
|
{
|
|
|
|
AddStep("Prepare import beatmap", () => importFilename = TestResources.GetTestBeatmapForImport());
|
|
|
|
|
|
|
|
base.SetUpSteps();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestImportCreatedNotification()
|
|
|
|
{
|
2021-10-15 12:26:31 +08:00
|
|
|
AddUntilStep("Import notification was presented", () => Game.Notifications.ChildrenOfType<ProgressCompletionNotification>().Count() == 1);
|
2021-10-13 11:19:10 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|