Marked starter select test as TODO to avoid corruption

This commit is contained in:
Bertie690 2025-09-03 20:54:45 -04:00
parent 272760dcd9
commit 54836ccd4a
3 changed files with 5 additions and 3 deletions

View File

@ -168,6 +168,7 @@ export class TitlePhase extends Phase {
globalScene.ui.setMode(UiMode.TITLE, config);
}
// TODO: Make callers actually wait for the damn save slot to load
async loadSaveSlot(slotId: number): Promise<void> {
globalScene.sessionSlotId = slotId > -1 || !loggedInUser ? slotId : loggedInUser.lastSessionSlot;
globalScene.ui.setMode(UiMode.MESSAGE);

View File

@ -78,13 +78,13 @@ export class PromptHandler extends GameManagerHelper {
* @param args - Arguments being passed to the original method
* @returns The original return value.
*/
private setMode(args: Parameters<typeof this.originalSetModeInternal>) {
private async setMode(args: Parameters<typeof this.originalSetModeInternal>) {
const mode = args[0];
this.doLog(
`UI mode changed from ${getEnumStr(UiMode, this.game.scene.ui.getMode())} to ${getEnumStr(UiMode, mode)}!`,
);
const ret = this.originalSetModeInternal.apply(this.game.scene.ui, args);
const ret = await this.originalSetModeInternal.apply(this.game.scene.ui, args);
const currentPhase = this.game.scene.phaseManager.getCurrentPhase()?.phaseName!;
if (endBySetMode.includes(currentPhase)) {

View File

@ -16,7 +16,8 @@ import i18next from "i18next";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
describe("UI - Starter select", () => {
// TODO: Resolve issues with UI test state corruption
describe.todo("UI - Starter select", () => {
let phaserGame: Phaser.Game;
let game: GameManager;