388 bool* dashboard_flag = show_dashboard ? show_dashboard : &
show_dashboard_;
391 ImGui::SetNextWindowSize(ImVec2(900, 700), ImGuiCond_FirstUseEver);
393 if (!ImGui::Begin(
"Test Dashboard", dashboard_flag,
394 ImGuiWindowFlags_MenuBar)) {
403 static int frame_counter = 0;
405 if (frame_counter % 60 == 0) {
408 "TestManager ROM status check - Frame %d: ROM %p, loaded: %s",
409 frame_counter, (
void*)
current_rom_, has_rom ?
"true" :
"false");
412 if (ImGui::BeginTable(
"ROM_Status_Table", 2, ImGuiTableFlags_BordersInner)) {
413 ImGui::TableSetupColumn(
"Property", ImGuiTableColumnFlags_WidthFixed, 120);
414 ImGui::TableSetupColumn(
"Value", ImGuiTableColumnFlags_WidthStretch);
416 ImGui::TableNextRow();
417 ImGui::TableNextColumn();
418 ImGui::Text(
"ROM Status:");
419 ImGui::TableNextColumn();
421 ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f),
"%s Loaded",
424 ImGui::TableNextRow();
425 ImGui::TableNextColumn();
426 ImGui::Text(
"ROM Title:");
427 ImGui::TableNextColumn();
430 ImGui::TableNextRow();
431 ImGui::TableNextColumn();
432 ImGui::Text(
"File Name:");
433 ImGui::TableNextColumn();
436 ImGui::TableNextRow();
437 ImGui::TableNextColumn();
438 ImGui::Text(
"Size:");
439 ImGui::TableNextColumn();
443 ImGui::TableNextRow();
444 ImGui::TableNextColumn();
445 ImGui::Text(
"Modified:");
446 ImGui::TableNextColumn();
448 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
"%s Yes",
451 ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f),
"%s No",
455 ImGui::TableNextRow();
456 ImGui::TableNextColumn();
457 ImGui::Text(
"ROM Pointer:");
458 ImGui::TableNextColumn();
461 ImGui::TableNextRow();
462 ImGui::TableNextColumn();
463 ImGui::Text(
"Actions:");
464 ImGui::TableNextColumn();
465 if (ImGui::Button(
"Refresh ROM Reference")) {
470 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
"%s Not Loaded",
472 ImGui::TableNextRow();
473 ImGui::TableNextColumn();
474 ImGui::Text(
"ROM Pointer:");
475 ImGui::TableNextColumn();
477 ImGui::TableNextRow();
478 ImGui::TableNextColumn();
479 ImGui::Text(
"Status:");
480 ImGui::TableNextColumn();
481 ImGui::Text(
"ROM-dependent tests will be skipped");
483 ImGui::TableNextRow();
484 ImGui::TableNextColumn();
485 ImGui::Text(
"Actions:");
486 ImGui::TableNextColumn();
487 if (ImGui::Button(
"Refresh ROM Reference")) {
491 if (ImGui::Button(
"Debug ROM State")) {
492 LOG_INFO(
"TestManager",
"=== ROM DEBUG INFO ===");
495 LOG_INFO(
"TestManager",
"ROM title: '%s'",
498 LOG_INFO(
"TestManager",
"ROM is_loaded(): %s",
500 LOG_INFO(
"TestManager",
"ROM data pointer: %p",
503 LOG_INFO(
"TestManager",
"======================");
512 if (ImGui::BeginMenuBar()) {
513 if (ImGui::BeginMenu(
"Run")) {
514 if (ImGui::MenuItem(
"All Tests",
"Ctrl+T",
false, !
is_running_)) {
518 if (ImGui::MenuItem(
"Unit Tests",
nullptr,
false, !
is_running_)) {
521 if (ImGui::MenuItem(
"Integration Tests",
nullptr,
false, !
is_running_)) {
522 [[maybe_unused]]
auto status =
525 if (ImGui::MenuItem(
"UI Tests",
nullptr,
false, !
is_running_)) {
528 if (ImGui::MenuItem(
"Performance Tests",
nullptr,
false, !
is_running_)) {
529 [[maybe_unused]]
auto status =
532 if (ImGui::MenuItem(
"Memory Tests",
nullptr,
false, !
is_running_)) {
533 [[maybe_unused]]
auto status =
539 if (ImGui::BeginMenu(
"View")) {
544 if (ImGui::MenuItem(
"Export Results",
nullptr,
false,
551 if (ImGui::BeginMenu(
"ROM")) {
552 if (ImGui::MenuItem(
"Test Current ROM",
nullptr,
false,
554 [[maybe_unused]]
auto status =
557 if (ImGui::MenuItem(
"Load ROM for Testing...")) {
561 if (ImGui::MenuItem(
"Refresh ROM Reference")) {
567 if (ImGui::BeginMenu(
"Configure")) {
568 if (ImGui::MenuItem(
"Test Configuration")) {
573 if (ImGui::MenuItem(
"Use NFD File Dialog",
nullptr, &nfd_mode)) {
575 LOG_INFO(
"TestManager",
"Global file dialog mode changed to: %s",
576 nfd_mode ?
"NFD" :
"Bespoke");
585 int enabled_count = 0;
587 static const std::vector<std::string> all_test_names = {
588 "ROM_Header_Validation_Test",
"ROM_Data_Access_Test",
589 "ROM_Graphics_Extraction_Test",
"ROM_Overworld_Loading_Test",
590 "Tile16_Editor_Test",
"Comprehensive_Save_Test",
591 "ROM_Sprite_Data_Test",
"ROM_Music_Data_Test"};
593 for (
const auto& test_name : all_test_names) {
602 if (enabled_count < total_count) {
604 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
605 "(Some tests disabled - check Configuration)");
610 ImGui::PushStyleColor(ImGuiCol_Text,
614 ImGui::PopStyleColor();
615 ImGui::ProgressBar(
progress_, ImVec2(-1, 0),
616 absl::StrFormat(
"%.0f%%",
progress_ * 100.0f).c_str());
619 ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.2f, 0.7f, 0.2f, 1.0f));
625 ImGui::PopStyleColor();
628 if (ImGui::Button(absl::StrCat(
ICON_MD_SPEED,
" Quick Test").c_str(),
636 ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.2f, 0.5f, 0.8f, 1.0f));
641 [[maybe_unused]]
auto status =
646 ImGui::PopStyleColor();
648 if (ImGui::IsItemHovered()) {
650 ImGui::SetTooltip(
"Run tests on current ROM: %s",
653 ImGui::SetTooltip(
"Load a ROM to enable ROM-dependent tests");
658 if (ImGui::Button(absl::StrCat(
ICON_MD_CLEAR,
" Clear").c_str(),
679 ImVec4 progress_color = pass_rate >= 0.9f ? ImVec4(0.0f, 1.0f, 0.0f, 1.0f)
681 ? ImVec4(1.0f, 1.0f, 0.0f, 1.0f)
682 : ImVec4(1.0f, 0.0f, 0.0f, 1.0f);
684 ImGui::PushStyleColor(ImGuiCol_PlotHistogram, progress_color);
686 pass_rate, ImVec2(-1, 0),
687 absl::StrFormat(
"Pass Rate: %.1f%%", pass_rate * 100.0f).c_str());
688 ImGui::PopStyleColor();
706 if (ImGui::CollapsingHeader(
"Test Suite Breakdown")) {
707 std::unordered_map<std::string, std::pair<size_t, size_t>>
710 suite_stats[result.suite_name].second++;
712 suite_stats[result.suite_name].first++;
716 for (
const auto& [suite_name, stats] : suite_stats) {
717 float suite_pass_rate =
718 stats.second > 0 ?
static_cast<float>(stats.first) / stats.second
720 ImGui::Text(
"%s: %zu/%zu (%.0f%%)", suite_name.c_str(), stats.first,
721 stats.second, suite_pass_rate * 100.0f);
732 const char* categories[] = {
"All",
"Unit",
"Integration",
733 "UI",
"Performance",
"Memory"};
734 static int selected_category = 0;
735 if (ImGui::Combo(
"Category", &selected_category, categories,
736 IM_ARRAYSIZE(categories))) {
737 switch (selected_category) {
760 static char filter_buffer[256] =
"";
761 ImGui::SetNextItemWidth(-80);
762 if (ImGui::InputTextWithHint(
"##filter",
"Search tests...", filter_buffer,
763 sizeof(filter_buffer))) {
767 if (ImGui::Button(
"Clear")) {
768 filter_buffer[0] =
'\0';
775 if (ImGui::BeginTabBar(
"TestResultsTabs", ImGuiTabBarFlags_None)) {
777 if (ImGui::BeginTabItem(
"Test Results")) {
778 if (ImGui::BeginChild(
"TestResults", ImVec2(0, 0),
true)) {
781 ImVec4(0.6f, 0.6f, 0.6f, 1.0f),
782 "No test results to display. Run some tests to see results here.");
786 bool category_match =
791 result.suite_name.find(
test_filter_) != std::string::npos;
793 if (!category_match || !text_match) {
797 ImGui::PushID(&result);
801 switch (result.status) {
819 status_icon, result.suite_name.c_str(),
820 result.name.c_str());
823 if (ImGui::GetContentRegionAvail().x > 200) {
825 ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f),
"(%lld ms)",
826 result.duration.count());
831 !result.error_message.empty()) {
833 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.8f, 0.8f, 1.0f));
835 result.error_message.c_str());
836 ImGui::PopStyleColor();
842 !result.error_message.empty()) {
844 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.8f, 1.0f, 0.8f, 1.0f));
846 result.error_message.c_str());
847 ImGui::PopStyleColor();
860#if defined(YAZE_WITH_GRPC)
861 if (ImGui::BeginTabItem(
"GUI Automation Tests")) {
862 if (ImGui::BeginChild(
"HarnessTests", ImVec2(0, 0),
true)) {
864 auto summaries = ListHarnessTestSummaries();
866 if (summaries.empty()) {
868 ImVec4(0.6f, 0.6f, 0.6f, 1.0f),
869 "No GUI automation test results yet.\n\n"
870 "These tests are run via the ImGuiTestHarness gRPC service.\n"
871 "Results will appear here after running GUI automation tests.");
874 ImGui::Text(
"Total Tests: %zu", summaries.size());
878 if (ImGui::BeginTable(
"HarnessTestTable", 6,
879 ImGuiTableFlags_Borders |
880 ImGuiTableFlags_RowBg |
881 ImGuiTableFlags_Resizable)) {
882 ImGui::TableSetupColumn(
"Status", ImGuiTableColumnFlags_WidthFixed, 80);
883 ImGui::TableSetupColumn(
"Test Name", ImGuiTableColumnFlags_WidthStretch);
884 ImGui::TableSetupColumn(
"Category", ImGuiTableColumnFlags_WidthFixed, 100);
885 ImGui::TableSetupColumn(
"Runs", ImGuiTableColumnFlags_WidthFixed, 60);
886 ImGui::TableSetupColumn(
"Pass Rate", ImGuiTableColumnFlags_WidthFixed, 80);
887 ImGui::TableSetupColumn(
"Duration", ImGuiTableColumnFlags_WidthFixed, 80);
888 ImGui::TableHeadersRow();
890 for (
const auto& summary : summaries) {
891 const auto& exec = summary.latest_execution;
893 ImGui::TableNextRow();
894 ImGui::TableNextColumn();
898 const char* status_icon;
899 const char* status_text;
901 switch (exec.status) {
902 case HarnessTestStatus::kPassed:
903 status_color = ImVec4(0.0f, 1.0f, 0.0f, 1.0f);
905 status_text =
"Passed";
907 case HarnessTestStatus::kFailed:
908 status_color = ImVec4(1.0f, 0.0f, 0.0f, 1.0f);
910 status_text =
"Failed";
912 case HarnessTestStatus::kTimeout:
913 status_color = ImVec4(1.0f, 0.5f, 0.0f, 1.0f);
915 status_text =
"Timeout";
917 case HarnessTestStatus::kRunning:
918 status_color = ImVec4(1.0f, 1.0f, 0.0f, 1.0f);
920 status_text =
"Running";
922 case HarnessTestStatus::kQueued:
923 status_color = ImVec4(0.6f, 0.6f, 0.6f, 1.0f);
925 status_text =
"Queued";
928 status_color = ImVec4(0.6f, 0.6f, 0.6f, 1.0f);
930 status_text =
"Unknown";
934 ImGui::TextColored(status_color,
"%s %s", status_icon, status_text);
936 ImGui::TableNextColumn();
937 ImGui::Text(
"%s", exec.name.c_str());
940 if (exec.status == HarnessTestStatus::kFailed &&
941 !exec.error_message.empty()) {
943 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.5f, 1.0f),
944 "(%s)", exec.error_message.c_str());
947 ImGui::TableNextColumn();
948 ImGui::Text(
"%s", exec.category.c_str());
950 ImGui::TableNextColumn();
951 ImGui::Text(
"%d", summary.total_runs);
953 ImGui::TableNextColumn();
954 if (summary.total_runs > 0) {
955 float pass_rate =
static_cast<float>(summary.pass_count) /
957 ImVec4 rate_color = pass_rate >= 0.9f ? ImVec4(0.0f, 1.0f, 0.0f, 1.0f)
958 : pass_rate >= 0.7f ? ImVec4(1.0f, 1.0f, 0.0f, 1.0f)
959 : ImVec4(1.0f, 0.0f, 0.0f, 1.0f);
960 ImGui::TextColored(rate_color,
"%.0f%%", pass_rate * 100.0f);
965 ImGui::TableNextColumn();
966 double duration_ms = absl::ToDoubleMilliseconds(summary.total_duration);
967 if (summary.total_runs > 0) {
968 ImGui::Text(
"%.0f ms", duration_ms / summary.total_runs);
974 if (ImGui::TreeNode((
"Details##" + exec.test_id).c_str())) {
975 ImGui::Text(
"Test ID: %s", exec.test_id.c_str());
976 ImGui::Text(
"Total Runs: %d (Pass: %d, Fail: %d)",
977 summary.total_runs, summary.pass_count, summary.fail_count);
979 if (!exec.logs.empty()) {
982 for (
const auto& log : exec.logs) {
983 ImGui::BulletText(
"%s", log.c_str());
987 if (!exec.assertion_failures.empty()) {
989 ImGui::TextColored(ImVec4(1.0f, 0.3f, 0.3f, 1.0f),
991 for (
const auto& failure : exec.assertion_failures) {
992 ImGui::BulletText(
"%s", failure.c_str());
996 if (!exec.screenshot_path.empty()) {
998 ImGui::Text(
"%s Screenshot: %s",
1000 ImGui::Text(
"Size: %.2f KB",
1001 exec.screenshot_size_bytes / 1024.0);
1013 ImGui::EndTabItem();
1024 ImGui::Begin(absl::StrCat(
ICON_MD_MONITOR,
" Resource Monitor").c_str(),
1029 ImGui::Text(
"%s Textures: %zu",
ICON_MD_TEXTURE, latest.texture_count);
1030 ImGui::Text(
"%s Surfaces: %zu",
ICON_MD_LAYERS, latest.surface_count);
1031 ImGui::Text(
"%s Memory: %zu MB",
ICON_MD_MEMORY, latest.memory_usage_mb);
1032 ImGui::Text(
"%s FPS: %.1f",
ICON_MD_SPEED, latest.frame_rate);
1036 std::vector<float> texture_counts;
1037 std::vector<float> surface_counts;
1042 texture_counts.push_back(
static_cast<float>(stats.texture_count));
1043 surface_counts.push_back(
static_cast<float>(stats.surface_count));
1046 ImGui::PlotLines(
"Textures", texture_counts.data(),
1047 static_cast<int>(texture_counts.size()), 0,
nullptr,
1048 0.0f, FLT_MAX, ImVec2(0, 80));
1049 ImGui::PlotLines(
"Surfaces", surface_counts.data(),
1050 static_cast<int>(surface_counts.size()), 0,
nullptr,
1051 0.0f, FLT_MAX, ImVec2(0, 80));
1060 ImGui::SetNextWindowSize(ImVec2(600, 400), ImGuiCond_FirstUseEver);
1065#ifdef YAZE_ENABLE_GTEST
1066 ImGui::Text(
"Google Test framework is available");
1068 if (ImGui::Button(
"Run All Google Tests")) {
1070 LOG_INFO(
"TestManager",
"Running Google Tests...");
1074 if (ImGui::Button(
"Run Specific Test Suite")) {
1079 ImGui::Text(
"Available Test Suites:");
1080 ImGui::BulletText(
"Unit Tests");
1081 ImGui::BulletText(
"Integration Tests");
1082 ImGui::BulletText(
"Performance Tests");
1084 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
1085 "%s Google Test framework not available",
1087 ImGui::Text(
"Enable YAZE_ENABLE_GTEST to use Google Test integration");
1095 ImGui::SetNextWindowSize(ImVec2(700, 500), ImGuiCond_FirstUseEver);
1104 if (ImGui::CollapsingHeader(
"ROM Data Integrity",
1105 ImGuiTreeNodeFlags_DefaultOpen)) {
1109 if (ImGui::Button(
"Run Data Integrity Check")) {
1111 [[maybe_unused]]
auto suite_status =
1116 if (ImGui::CollapsingHeader(
"Save/Load Testing")) {
1117 ImGui::Text(
"Test ROM save and load operations");
1119 if (ImGui::Button(
"Test Save Operations")) {
1124 if (ImGui::Button(
"Test Load Operations")) {
1129 if (ImGui::CollapsingHeader(
"Editor Integration")) {
1130 ImGui::Text(
"Test editor components with current ROM");
1132 if (ImGui::Button(
"Test Overworld Editor")) {
1137 if (ImGui::Button(
"Test Tile16 Editor")) {
1143 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
1152 ImGui::SetNextWindowSize(ImVec2(400, 200), ImGuiCond_Appearing);
1154 ImGuiWindowFlags_NoResize)) {
1158 ImGui::Text(
"Select a ROM file to run tests on:");
1160 if (ImGui::Button(
"Browse ROM File...", ImVec2(-1, 0))) {
1167 if (ImGui::Button(
"Cancel", ImVec2(-1, 0))) {
1176 ImGui::SetNextWindowSize(ImVec2(600, 500), ImGuiCond_FirstUseEver);
1182 if (ImGui::CollapsingHeader(
"File Dialog Settings",
1183 ImGuiTreeNodeFlags_DefaultOpen)) {
1184 ImGui::Text(
"File Dialog Implementation:");
1187 if (ImGui::RadioButton(
"NFD (Native File Dialog)", nfd_mode)) {
1189 LOG_INFO(
"TestManager",
"Global file dialog mode set to: NFD");
1191 if (ImGui::IsItemHovered()) {
1193 "Use NFD library for native OS file dialogs (global setting)");
1196 if (ImGui::RadioButton(
"Bespoke Implementation", !nfd_mode)) {
1198 LOG_INFO(
"TestManager",
"Global file dialog mode set to: Bespoke");
1200 if (ImGui::IsItemHovered()) {
1202 "Use custom file dialog implementation (global setting)");
1210 ImVec4(1.0f, 1.0f, 0.0f, 1.0f),
1211 "Note: This setting affects ALL file dialogs in the application");
1213 if (ImGui::Button(
"Test Current File Dialog")) {
1215 LOG_INFO(
"TestManager",
"Testing global file dialog mode: %s",
1222 if (!result.empty()) {
1223 LOG_INFO(
"TestManager",
"File dialog test successful: %s",
1227 "File dialog test: No file selected or dialog canceled");
1232 if (ImGui::Button(
"Test NFD Directly")) {
1234 if (!result.empty()) {
1235 LOG_INFO(
"TestManager",
"NFD test successful: %s", result.c_str());
1239 "NFD test: No file selected, canceled, or error occurred");
1244 if (ImGui::Button(
"Test Bespoke Directly")) {
1246 if (!result.empty()) {
1247 LOG_INFO(
"TestManager",
"Bespoke test successful: %s",
1251 "Bespoke test: No file selected or not implemented");
1257 if (ImGui::CollapsingHeader(
"Test Selection",
1258 ImGuiTreeNodeFlags_DefaultOpen)) {
1259 ImGui::Text(
"Enable/Disable Individual Tests:");
1263 static const std::vector<std::pair<std::string, std::string>>
1265 {
"ROM_Header_Validation_Test",
1266 "Safe - Read-only ROM header validation"},
1267 {
"ROM_Data_Access_Test",
1268 "Safe - Basic ROM data access testing"},
1269 {
"ROM_Graphics_Extraction_Test",
1270 "Safe - Graphics data extraction testing"},
1271 {
"ROM_Overworld_Loading_Test",
1272 "Safe - Overworld data loading testing"},
1273 {
"Tile16_Editor_Test",
1274 "Moderate - Tile16 editor initialization"},
1275 {
"Comprehensive_Save_Test",
1276 "DANGEROUS - Known to crash, uses ROM copies"},
1277 {
"ROM_Sprite_Data_Test",
"Safe - Sprite data validation"},
1278 {
"ROM_Music_Data_Test",
"Safe - Music data validation"}};
1281 static bool initialized_defaults =
false;
1282 if (!initialized_defaults) {
1284 "Comprehensive_Save_Test");
1285 initialized_defaults =
true;
1288 if (ImGui::BeginTable(
1290 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg)) {
1291 ImGui::TableSetupColumn(
"Test Name", ImGuiTableColumnFlags_WidthFixed,
1293 ImGui::TableSetupColumn(
"Risk Level",
1294 ImGuiTableColumnFlags_WidthStretch);
1295 ImGui::TableSetupColumn(
"Status", ImGuiTableColumnFlags_WidthFixed,
1297 ImGui::TableSetupColumn(
"Action", ImGuiTableColumnFlags_WidthFixed,
1299 ImGui::TableHeadersRow();
1301 for (
const auto& [test_name, description] : known_tests) {
1304 ImGui::TableNextRow();
1305 ImGui::TableNextColumn();
1306 ImGui::Text(
"%s", test_name.c_str());
1308 ImGui::TableNextColumn();
1310 if (description.find(
"DANGEROUS") != std::string::npos) {
1311 ImGui::TextColored(ImVec4(1.0f, 0.3f, 0.3f, 1.0f),
"%s",
1312 description.c_str());
1313 }
else if (description.find(
"Moderate") != std::string::npos) {
1314 ImGui::TextColored(ImVec4(1.0f, 0.8f, 0.0f, 1.0f),
"%s",
1315 description.c_str());
1317 ImGui::TextColored(ImVec4(0.0f, 0.8f, 0.0f, 1.0f),
"%s",
1318 description.c_str());
1321 ImGui::TableNextColumn();
1323 ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f),
"%s ON",
1326 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
"%s OFF",
1330 ImGui::TableNextColumn();
1331 ImGui::PushID(test_name.c_str());
1333 if (ImGui::Button(
"Disable")) {
1335 LOG_INFO(
"TestManager",
"Disabled test: %s", test_name.c_str());
1338 if (ImGui::Button(
"Enable")) {
1340 LOG_INFO(
"TestManager",
"Enabled test: %s", test_name.c_str());
1350 ImGui::Text(
"Quick Actions:");
1352 if (ImGui::Button(
"Enable Safe Tests Only")) {
1353 for (
const auto& [test_name, description] : known_tests) {
1354 if (description.find(
"Safe") != std::string::npos) {
1360 LOG_INFO(
"TestManager",
"Enabled only safe tests");
1364 if (ImGui::Button(
"Enable All Tests")) {
1365 for (
const auto& [test_name, description] : known_tests) {
1368 LOG_INFO(
"TestManager",
"Enabled all tests (including dangerous ones)");
1372 if (ImGui::Button(
"Disable All Tests")) {
1373 for (
const auto& [test_name, description] : known_tests) {
1376 LOG_INFO(
"TestManager",
"Disabled all tests");
1381 ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
1382 "⚠️ Recommendation: Use 'Enable Safe Tests Only' to avoid crashes");
1386 if (ImGui::CollapsingHeader(
"Platform Settings")) {
1387 ImGui::Text(
"macOS Tahoe Compatibility:");
1388 ImGui::BulletText(
"NFD may have issues on macOS Sequoia+");
1389 ImGui::BulletText(
"Bespoke dialog provides fallback option");
1391 "Global setting affects File → Open, Project dialogs, etc.");
1394 ImGui::Text(
"Test Both Implementations:");
1396 if (ImGui::Button(
"Quick Test NFD")) {
1398 LOG_INFO(
"TestManager",
"NFD test result: %s",
1399 result.empty() ?
"Failed/Canceled" : result.c_str());
1402 if (ImGui::Button(
"Quick Test Bespoke")) {
1404 LOG_INFO(
"TestManager",
"Bespoke test result: %s",
1405 result.empty() ?
"Failed/Not Implemented" : result.c_str());
1409 ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f),
1410 "Note: These tests don't change the global setting");
1418 ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(),
1419 ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
1420 ImGui::SetNextWindowSize(ImVec2(500, 300), ImGuiCond_Appearing);
1423 ImGuiWindowFlags_NoResize)) {
1427 ImGui::Text(
"A test ROM has been created with your modifications:");
1432 auto last_slash = display_filename.find_last_of(
"/\\");
1433 if (last_slash != std::string::npos) {
1434 display_filename = display_filename.substr(last_slash + 1);
1438 ImGui::Text(
"Would you like to open this test ROM in a new session?");
1441 absl::StrFormat(
"%s Open in New Session",
ICON_MD_TAB).c_str(),
1446 "User requested to open test ROM in new session: %s",
1453 absl::StrFormat(
"%s Keep Current Session",
ICON_MD_CLOSE).c_str(),
1460 ImVec4(0.7f, 0.7f, 0.7f, 1.0f),
1461 "Note: Test ROM contains your modifications and can be");
1462 ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f),
1463 "opened later using File → Open");