diff --git a/test/battle/battle.test.ts b/test/battle/battle.test.ts index e5696bbb394..7c97ea57e0d 100644 --- a/test/battle/battle.test.ts +++ b/test/battle/battle.test.ts @@ -76,68 +76,6 @@ describe("Phase - Battle Phase", () => { } }); - it("wrong phase", async () => { - await game.phaseInterceptor.run(LoginPhase); - await game.phaseInterceptor.run(LoginPhase).catch(e => { - expect(e).toBe("Wrong phase: this is SelectGenderPhase and not LoginPhase"); - }); - }); - - it("wrong phase but skip", async () => { - await game.phaseInterceptor.run(LoginPhase); - await game.phaseInterceptor.run(LoginPhase, () => game.isCurrentPhase(SelectGenderPhase)); - }); - - it("good run", async () => { - await game.phaseInterceptor.run(LoginPhase); - game.onNextPrompt( - "SelectGenderPhase", - UiMode.OPTION_SELECT, - () => { - game.scene.gameData.gender = PlayerGender.MALE; - game.endPhase(); - }, - () => game.isCurrentPhase(TitlePhase), - ); - await game.phaseInterceptor.run(SelectGenderPhase, () => game.isCurrentPhase(TitlePhase)); - await game.phaseInterceptor.run(TitlePhase); - }); - - it("good run from select gender to title", async () => { - await game.phaseInterceptor.run(LoginPhase); - game.onNextPrompt( - "SelectGenderPhase", - UiMode.OPTION_SELECT, - () => { - game.scene.gameData.gender = PlayerGender.MALE; - game.endPhase(); - }, - () => game.isCurrentPhase(TitlePhase), - ); - await game.phaseInterceptor.runFrom(SelectGenderPhase).to(TitlePhase); - }); - - it("good run to SummonPhase phase", async () => { - await game.phaseInterceptor.run(LoginPhase); - game.onNextPrompt( - "SelectGenderPhase", - UiMode.OPTION_SELECT, - () => { - game.scene.gameData.gender = PlayerGender.MALE; - game.endPhase(); - }, - () => game.isCurrentPhase(TitlePhase), - ); - game.onNextPrompt("TitlePhase", UiMode.TITLE, () => { - game.scene.gameMode = getGameMode(GameModes.CLASSIC); - const starters = generateStarter(game.scene); - const selectStarterPhase = new SelectStarterPhase(); - game.scene.phaseManager.pushPhase(new EncounterPhase(false)); - selectStarterPhase.initBattle(starters); - }); - await game.phaseInterceptor.runFrom(SelectGenderPhase).to(SummonPhase); - }); - it.each([ { name: "1v1", double: false, qty: 1 }, { name: "2v1", double: false, qty: 2 }, diff --git a/test/ui/type-hints.test.ts b/test/ui/type-hints.test.ts index 5a626081751..b5fe0d9585a 100644 --- a/test/ui/type-hints.test.ts +++ b/test/ui/type-hints.test.ts @@ -57,7 +57,7 @@ describe("UI - Type Hints", () => { expect.soft(dragonClawText.color).toBe("#929292"); ui.getHandler().processInput(Button.ACTION); }); - await game.toNextTurn(); + await game.phaseInterceptor.to("CommandPhase"); }); it("check status move color", async () => { @@ -81,7 +81,7 @@ describe("UI - Type Hints", () => { expect.soft(growlText.color).toBe(undefined); ui.getHandler().processInput(Button.ACTION); }); - await game.toNextTurn(); + await game.phaseInterceptor.to("CommandPhase"); }); it("should show the proper hint for a move in doubles after one of the enemy pokemon flees", async () => { @@ -117,6 +117,6 @@ describe("UI - Type Hints", () => { expect.soft(shadowBallText.color).toBe(undefined); ui.getHandler().processInput(Button.ACTION); }); - await game.toNextTurn(); + await game.phaseInterceptor.to("CommandPhase"); }); });