diff --git a/test/Bin/GameTest/GameTests.cpp b/test/Bin/GameTest/GameTests.cpp index 3073c1b0bb25..566448a37b98 100644 --- a/test/Bin/GameTest/GameTests.cpp +++ b/test/Bin/GameTest/GameTests.cpp @@ -1468,10 +1468,12 @@ GAME_TEST(Issues, Issue1020) { } GAME_TEST(Issues, Issue1034) { - // Crash when casting telekinesis outdoors + // Crash when casting telekinesis outdoors. + auto houseTape = tapes.house(); + auto statusTape = tapes.statusBar(); test.playTraceFromTestData("issue_1034.mm7", "issue_1034.json"); - // check we have entered into the shop - EXPECT_EQ(window_SpeakInHouse->houseId(), HOUSE_WEAPON_SHOP_EMERALD_ISLAND); + EXPECT_TRUE(statusTape.contains("Select Target")); // Telekinesis message. + EXPECT_EQ(houseTape, tape(HOUSE_INVALID, HOUSE_WEAPON_SHOP_EMERALD_ISLAND)); // We have entered into the shop. } GAME_TEST(Issues, Issue1036) { diff --git a/test/Testing/Game/CommonTapeRecorder.cpp b/test/Testing/Game/CommonTapeRecorder.cpp index 58b65ac3c3e0..95c7bb01a920 100644 --- a/test/Testing/Game/CommonTapeRecorder.cpp +++ b/test/Testing/Game/CommonTapeRecorder.cpp @@ -112,3 +112,9 @@ TestTape CommonTapeRecorder::mapItemCount(ItemId itemId) { })); }); } + +TestTape CommonTapeRecorder::house() { + return custom([] { + return window_SpeakInHouse ? window_SpeakInHouse->houseId() : HOUSE_INVALID; + }); +} diff --git a/test/Testing/Game/CommonTapeRecorder.h b/test/Testing/Game/CommonTapeRecorder.h index 766482067022..c9b61850e901 100644 --- a/test/Testing/Game/CommonTapeRecorder.h +++ b/test/Testing/Game/CommonTapeRecorder.h @@ -10,6 +10,7 @@ #include "Engine/Time.h" #include "GUI/GUIEnums.h" #include "GUI/GUIDialogues.h" +#include "GUI/UI/UIHouseEnums.h" #include "Library/Config/ConfigEntry.h" @@ -73,6 +74,8 @@ class CommonTapeRecorder { TestTape mapItemCount(ItemId itemId); + TestTape house(); + private: TestController *_controller = nullptr; };