Exemplo n.º 1
0
        public override void SetUpSteps()
        {
            base.SetUpSteps();

            AddStep("import beatmap", () =>
            {
                beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).Wait();
                importedSet = beatmaps.GetAllUsableBeatmapSetsEnumerable(IncludedDetails.All).First();
            });

            AddStep("load multiplayer", () => LoadScreen(multiplayerScreenStack = new TestMultiplayerScreenStack()));
            AddUntilStep("wait for multiplayer to load", () => multiplayerScreenStack.IsLoaded);
            AddUntilStep("wait for lounge to load", () => this.ChildrenOfType <MultiplayerLoungeSubScreen>().FirstOrDefault()?.IsLoaded == true);
        }
Exemplo n.º 2
0
        public override void SetUpSteps()
        {
            base.SetUpSteps();

            AddStep("import beatmap", () =>
            {
                beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).Wait();
                importedSet    = beatmaps.GetAllUsableBeatmapSetsEnumerable(IncludedDetails.All).First();
                InitialBeatmap = importedSet.Beatmaps.First(b => b.RulesetID == 0);
                OtherBeatmap   = importedSet.Beatmaps.Last(b => b.RulesetID == 0);
            });

            AddStep("load multiplayer", () => LoadScreen(multiplayerScreenStack = new TestMultiplayerScreenStack()));
            AddUntilStep("wait for multiplayer to load", () => multiplayerScreenStack.IsLoaded);
            AddUntilStep("wait for lounge to load", () => this.ChildrenOfType <MultiplayerLoungeSubScreen>().FirstOrDefault()?.IsLoaded == true);

            AddUntilStep("wait for lounge", () => multiplayerScreenStack.ChildrenOfType <LoungeSubScreen>().SingleOrDefault()?.IsLoaded == true);
            AddStep("open room", () => multiplayerScreenStack.ChildrenOfType <LoungeSubScreen>().Single().Open(new Room
            {
                Name      = { Value = "Test Room" },
                QueueMode = { Value = Mode },
                Playlist  =
                {
                    new PlaylistItem
                    {
                        Beatmap ={ Value               = InitialBeatmap               },
                        Ruleset ={ Value               = new OsuRuleset().RulesetInfo },
                    }
                }
            }));

            AddUntilStep("wait for room open", () => this.ChildrenOfType <MultiplayerMatchSubScreen>().FirstOrDefault()?.IsLoaded == true);
            AddWaitStep("wait for transition", 2);

            AddStep("create room", () =>
            {
                InputManager.MoveMouseTo(this.ChildrenOfType <MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>().Single());
                InputManager.Click(MouseButton.Left);
            });

            AddUntilStep("wait for join", () => RoomManager.RoomJoined);
        }