Update reload.test.ts
Thanks to DayKev again for these fixes
This commit is contained in:
parent
6cfc6f9341
commit
029dfa4b3b
|
@ -1,9 +1,13 @@
|
|||
import { Species } from "#app/enums/species";
|
||||
import { GameModes } from "#app/game-mode";
|
||||
import OptionSelectUiHandler from "#app/ui/settings/option-select-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { Biome } from "#enums/biome";
|
||||
import { Button } from "#enums/buttons";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { MockClock } from "#test/utils/mocks/mockClock";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
import { Moves } from "#app/enums/moves";
|
||||
import { Biome } from "#app/enums/biome";
|
||||
|
||||
describe("Reload", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -50,6 +54,13 @@ describe("Reload", () => {
|
|||
game.move.select(Moves.KOWTOW_CLEAVE);
|
||||
await game.phaseInterceptor.to("DamagePhase");
|
||||
await game.doKillOpponents();
|
||||
game.onNextPrompt("SelectBiomePhase", Mode.OPTION_SELECT, () => {
|
||||
(game.scene.time as MockClock).overrideDelay = null;
|
||||
const optionSelectUiHandler = game.scene.ui.getHandler() as OptionSelectUiHandler;
|
||||
game.scene.time.delayedCall(1010, () => optionSelectUiHandler.processInput(Button.ACTION));
|
||||
game.endPhase();
|
||||
(game.scene.time as MockClock).overrideDelay = 1;
|
||||
});
|
||||
await game.toNextWave();
|
||||
expect(game.phaseInterceptor.log).toContain("NewBiomeEncounterPhase");
|
||||
|
||||
|
|
Loading…
Reference in New Issue