4#include "imgui_test_engine/imgui_te_context.h"
16 ctx->LogInfo(
"=== Starting DungeonEditorV2 Smoke Test ===");
19 ctx->LogInfo(
"Loading ROM...");
21 ctx->LogInfo(
"ROM loaded successfully");
24 ctx->LogInfo(
"Opening Dungeon Editor...");
26 ctx->LogInfo(
"Dungeon Editor opened");
29 ctx->LogInfo(
"--- Test 1: Control Panel ---");
30 if (ctx->WindowInfo(
"Dungeon Controls").Window !=
nullptr) {
31 ctx->WindowFocus(
"Dungeon Controls");
32 ctx->LogInfo(
"Dungeon Controls panel is visible");
34 ctx->LogWarning(
"Dungeon Controls panel not visible - may be minimized");
38 ctx->LogInfo(
"--- Test 2: Room Selector Card ---");
39 if (ctx->WindowInfo(
"Dungeon Controls").Window !=
nullptr) {
40 ctx->SetRef(
"Dungeon Controls");
41 ctx->ItemClick(
"Rooms");
43 ctx->LogInfo(
"Toggled Room Selector visibility");
47 ctx->LogInfo(
"--- Test 3: Room Matrix Card ---");
48 if (ctx->WindowInfo(
"Dungeon Controls").Window !=
nullptr) {
49 ctx->SetRef(
"Dungeon Controls");
50 ctx->ItemClick(
"Matrix");
52 ctx->LogInfo(
"Toggled Room Matrix visibility");
56 ctx->LogInfo(
"--- Test 4: Room Card ---");
58 if (ctx->WindowInfo(
"Room Selector").Window !=
nullptr) {
59 ctx->SetRef(
"Room Selector");
61 if (ctx->ItemExists(
"Room 0x00")) {
62 ctx->ItemDoubleClick(
"Room 0x00");
64 ctx->LogInfo(
"Opened Room 0x00 card");
67 if (ctx->WindowInfo(
"Room 0x00").Window !=
nullptr) {
68 ctx->LogInfo(
"Room 0x00 card successfully opened");
69 ctx->SetRef(
"Room 0x00");
72 ctx->LogInfo(
"--- Test 5: Per-Room Layer Controls ---");
73 if (ctx->ItemExists(
"Show BG1")) {
74 ctx->LogInfo(
"Found per-room BG1 control");
76 ctx->ItemClick(
"Show BG1");
78 ctx->ItemClick(
"Show BG1");
80 ctx->LogInfo(
"Per-room layer controls functional");
83 ctx->LogWarning(
"Room card did not open");
86 ctx->LogWarning(
"Room 0x00 not found in selector");
89 ctx->LogWarning(
"Room Selector card not visible");
93 ctx->LogInfo(
"--- Test 6: Object Editor Card ---");
94 if (ctx->WindowInfo(
"Dungeon Controls").Window !=
nullptr) {
95 ctx->SetRef(
"Dungeon Controls");
96 ctx->ItemClick(
"Objects");
98 ctx->LogInfo(
"Toggled Object Editor visibility");
102 ctx->LogInfo(
"--- Test 7: Palette Editor Card ---");
103 if (ctx->WindowInfo(
"Dungeon Controls").Window !=
nullptr) {
104 ctx->SetRef(
"Dungeon Controls");
105 ctx->ItemClick(
"Palette");
107 ctx->LogInfo(
"Toggled Palette Editor visibility");
111 ctx->LogInfo(
"--- Test 8: Close Independent Cards ---");
113 if (ctx->WindowInfo(
"Room 0x00").Window !=
nullptr) {
114 ctx->WindowClose(
"Room 0x00");
116 ctx->LogInfo(
"Closed Room 0x00 card");
120 ctx->LogInfo(
"=== DungeonEditorV2 Smoke Test Completed Successfully ===");
121 ctx->LogInfo(
"Card-based architecture is functional");
122 ctx->LogInfo(
"Independent windows can be opened and closed");
123 ctx->LogInfo(
"Per-room settings are accessible");
void E2ETest_DungeonEditorV2SmokeTest(ImGuiTestContext *ctx)
Quick smoke test for DungeonEditorV2.
void LoadRomInTest(ImGuiTestContext *ctx, const std::string &rom_path)
void OpenEditorInTest(ImGuiTestContext *ctx, const std::string &editor_name)