386 bool* dashboard_flag = show_dashboard ? show_dashboard : &
show_dashboard_;
389 ImGui::SetNextWindowSize(ImVec2(900, 700), ImGuiCond_FirstUseEver);
391 if (!ImGui::Begin(
"Test Dashboard", dashboard_flag,
392 ImGuiWindowFlags_MenuBar)) {
401 static int frame_counter = 0;
403 if (frame_counter % 60 == 0) {
406 "TestManager ROM status check - Frame %d: ROM %p, loaded: %s",
407 frame_counter, (
void*)
current_rom_, has_rom ?
"true" :
"false");
410 if (ImGui::BeginTable(
"ROM_Status_Table", 2, ImGuiTableFlags_BordersInner)) {
411 ImGui::TableSetupColumn(
"Property", ImGuiTableColumnFlags_WidthFixed, 120);
412 ImGui::TableSetupColumn(
"Value", ImGuiTableColumnFlags_WidthStretch);
414 ImGui::TableNextRow();
415 ImGui::TableNextColumn();
416 ImGui::Text(
"ROM Status:");
417 ImGui::TableNextColumn();
419 ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f),
"%s Loaded",
422 ImGui::TableNextRow();
423 ImGui::TableNextColumn();
424 ImGui::Text(
"ROM Title:");
425 ImGui::TableNextColumn();
428 ImGui::TableNextRow();
429 ImGui::TableNextColumn();
430 ImGui::Text(
"File Name:");
431 ImGui::TableNextColumn();
434 ImGui::TableNextRow();
435 ImGui::TableNextColumn();
436 ImGui::Text(
"Size:");
437 ImGui::TableNextColumn();
441 ImGui::TableNextRow();
442 ImGui::TableNextColumn();
443 ImGui::Text(
"Modified:");
444 ImGui::TableNextColumn();
446 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
"%s Yes",
449 ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f),
"%s No",
453 ImGui::TableNextRow();
454 ImGui::TableNextColumn();
455 ImGui::Text(
"ROM Pointer:");
456 ImGui::TableNextColumn();
459 ImGui::TableNextRow();
460 ImGui::TableNextColumn();
461 ImGui::Text(
"Actions:");
462 ImGui::TableNextColumn();
463 if (ImGui::Button(
"Refresh ROM Reference")) {
468 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
"%s Not Loaded",
470 ImGui::TableNextRow();
471 ImGui::TableNextColumn();
472 ImGui::Text(
"ROM Pointer:");
473 ImGui::TableNextColumn();
475 ImGui::TableNextRow();
476 ImGui::TableNextColumn();
477 ImGui::Text(
"Status:");
478 ImGui::TableNextColumn();
479 ImGui::Text(
"ROM-dependent tests will be skipped");
481 ImGui::TableNextRow();
482 ImGui::TableNextColumn();
483 ImGui::Text(
"Actions:");
484 ImGui::TableNextColumn();
485 if (ImGui::Button(
"Refresh ROM Reference")) {
489 if (ImGui::Button(
"Debug ROM State")) {
490 LOG_INFO(
"TestManager",
"=== ROM DEBUG INFO ===");
491 LOG_INFO(
"TestManager",
"current_rom_ pointer: %p",
494 LOG_INFO(
"TestManager",
"ROM title: '%s'",
497 LOG_INFO(
"TestManager",
"ROM is_loaded(): %s",
499 LOG_INFO(
"TestManager",
"ROM data pointer: %p",
502 LOG_INFO(
"TestManager",
"======================");
511 if (ImGui::BeginMenuBar()) {
512 if (ImGui::BeginMenu(
"Run")) {
513 if (ImGui::MenuItem(
"All Tests",
"Ctrl+T",
false, !
is_running_)) {
517 if (ImGui::MenuItem(
"Unit Tests",
nullptr,
false, !
is_running_)) {
520 if (ImGui::MenuItem(
"Integration Tests",
nullptr,
false, !
is_running_)) {
521 [[maybe_unused]]
auto status =
524 if (ImGui::MenuItem(
"UI Tests",
nullptr,
false, !
is_running_)) {
527 if (ImGui::MenuItem(
"Performance Tests",
nullptr,
false, !
is_running_)) {
528 [[maybe_unused]]
auto status =
531 if (ImGui::MenuItem(
"Memory Tests",
nullptr,
false, !
is_running_)) {
532 [[maybe_unused]]
auto status =
538 if (ImGui::BeginMenu(
"View")) {
543 if (ImGui::MenuItem(
"Export Results",
nullptr,
false,
550 if (ImGui::BeginMenu(
"ROM")) {
551 if (ImGui::MenuItem(
"Test Current ROM",
nullptr,
false,
553 [[maybe_unused]]
auto status =
556 if (ImGui::MenuItem(
"Load ROM for Testing...")) {
560 if (ImGui::MenuItem(
"Refresh ROM Reference")) {
566 if (ImGui::BeginMenu(
"Configure")) {
567 if (ImGui::MenuItem(
"Test Configuration")) {
572 if (ImGui::MenuItem(
"Use NFD File Dialog",
nullptr, &nfd_mode)) {
574 LOG_INFO(
"TestManager",
"Global file dialog mode changed to: %s",
575 nfd_mode ?
"NFD" :
"Bespoke");
584 int enabled_count = 0;
586 static const std::vector<std::string> all_test_names = {
587 "ROM_Header_Validation_Test",
"ROM_Data_Access_Test",
588 "ROM_Graphics_Extraction_Test",
"ROM_Overworld_Loading_Test",
589 "Tile16_Editor_Test",
"Comprehensive_Save_Test",
590 "ROM_Sprite_Data_Test",
"ROM_Music_Data_Test"};
592 for (
const auto& test_name : all_test_names) {
601 if (enabled_count < total_count) {
603 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
604 "(Some tests disabled - check Configuration)");
609 ImGui::PushStyleColor(ImGuiCol_Text,
613 ImGui::PopStyleColor();
614 ImGui::ProgressBar(
progress_, ImVec2(-1, 0),
615 absl::StrFormat(
"%.0f%%",
progress_ * 100.0f).c_str());
618 ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.2f, 0.7f, 0.2f, 1.0f));
624 ImGui::PopStyleColor();
627 if (ImGui::Button(absl::StrCat(
ICON_MD_SPEED,
" Quick Test").c_str(),
635 ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.2f, 0.5f, 0.8f, 1.0f));
640 [[maybe_unused]]
auto status =
645 ImGui::PopStyleColor();
647 if (ImGui::IsItemHovered()) {
649 ImGui::SetTooltip(
"Run tests on current ROM: %s",
652 ImGui::SetTooltip(
"Load a ROM to enable ROM-dependent tests");
657 if (ImGui::Button(absl::StrCat(
ICON_MD_CLEAR,
" Clear").c_str(),
678 ImVec4 progress_color = pass_rate >= 0.9f ? ImVec4(0.0f, 1.0f, 0.0f, 1.0f)
680 ? ImVec4(1.0f, 1.0f, 0.0f, 1.0f)
681 : ImVec4(1.0f, 0.0f, 0.0f, 1.0f);
683 ImGui::PushStyleColor(ImGuiCol_PlotHistogram, progress_color);
685 pass_rate, ImVec2(-1, 0),
686 absl::StrFormat(
"Pass Rate: %.1f%%", pass_rate * 100.0f).c_str());
687 ImGui::PopStyleColor();
705 if (ImGui::CollapsingHeader(
"Test Suite Breakdown")) {
706 std::unordered_map<std::string, std::pair<size_t, size_t>>
709 suite_stats[result.suite_name].second++;
711 suite_stats[result.suite_name].first++;
715 for (
const auto& [suite_name, stats] : suite_stats) {
716 float suite_pass_rate =
717 stats.second > 0 ?
static_cast<float>(stats.first) / stats.second
719 ImGui::Text(
"%s: %zu/%zu (%.0f%%)", suite_name.c_str(), stats.first,
720 stats.second, suite_pass_rate * 100.0f);
731 const char* categories[] = {
"All",
"Unit",
"Integration",
732 "UI",
"Performance",
"Memory"};
733 static int selected_category = 0;
734 if (ImGui::Combo(
"Category", &selected_category, categories,
735 IM_ARRAYSIZE(categories))) {
736 switch (selected_category) {
759 static char filter_buffer[256] =
"";
760 ImGui::SetNextItemWidth(-80);
761 if (ImGui::InputTextWithHint(
"##filter",
"Search tests...", filter_buffer,
762 sizeof(filter_buffer))) {
766 if (ImGui::Button(
"Clear")) {
767 filter_buffer[0] =
'\0';
774 if (ImGui::BeginTabBar(
"TestResultsTabs", ImGuiTabBarFlags_None)) {
776 if (ImGui::BeginTabItem(
"Test Results")) {
777 if (ImGui::BeginChild(
"TestResults", ImVec2(0, 0),
true)) {
779 ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f),
780 "No test results to display. Run some tests to "
781 "see results here.");
785 bool category_match = (selected_category == 0) ||
790 result.suite_name.find(
test_filter_) != std::string::npos;
792 if (!category_match || !text_match) {
796 ImGui::PushID(&result);
800 switch (result.status) {
818 status_icon, result.suite_name.c_str(),
819 result.name.c_str());
822 if (ImGui::GetContentRegionAvail().x > 200) {
824 ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f),
"(%lld ms)",
825 result.duration.count());
830 !result.error_message.empty()) {
832 ImGui::PushStyleColor(ImGuiCol_Text,
833 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,
845 ImVec4(0.8f, 1.0f, 0.8f, 1.0f));
847 result.error_message.c_str());
848 ImGui::PopStyleColor();
861#if defined(YAZE_WITH_GRPC)
862 if (ImGui::BeginTabItem(
"GUI Automation Tests")) {
863 if (ImGui::BeginChild(
"HarnessTests", ImVec2(0, 0),
true)) {
865 auto summaries = ListHarnessTestSummaries();
867 if (summaries.empty()) {
869 ImVec4(0.6f, 0.6f, 0.6f, 1.0f),
870 "No GUI automation test results yet.\n\n"
871 "These tests are run via the ImGuiTestHarness gRPC service.\n"
872 "Results will appear here after running GUI automation tests.");
875 ImGui::Text(
"Total Tests: %zu", summaries.size());
879 if (ImGui::BeginTable(
"HarnessTestTable", 6,
880 ImGuiTableFlags_Borders |
881 ImGuiTableFlags_RowBg |
882 ImGuiTableFlags_Resizable)) {
883 ImGui::TableSetupColumn(
"Status", ImGuiTableColumnFlags_WidthFixed,
885 ImGui::TableSetupColumn(
"Test Name",
886 ImGuiTableColumnFlags_WidthStretch);
887 ImGui::TableSetupColumn(
"Category",
888 ImGuiTableColumnFlags_WidthFixed, 100);
889 ImGui::TableSetupColumn(
"Runs", ImGuiTableColumnFlags_WidthFixed,
891 ImGui::TableSetupColumn(
"Pass Rate",
892 ImGuiTableColumnFlags_WidthFixed, 80);
893 ImGui::TableSetupColumn(
"Duration",
894 ImGuiTableColumnFlags_WidthFixed, 80);
895 ImGui::TableHeadersRow();
897 for (
const auto& summary : summaries) {
898 const auto& exec = summary.latest_execution;
900 ImGui::TableNextRow();
901 ImGui::TableNextColumn();
905 const char* status_icon;
906 const char* status_text;
908 switch (exec.status) {
909 case HarnessTestStatus::kPassed:
910 status_color = ImVec4(0.0f, 1.0f, 0.0f, 1.0f);
912 status_text =
"Passed";
914 case HarnessTestStatus::kFailed:
915 status_color = ImVec4(1.0f, 0.0f, 0.0f, 1.0f);
917 status_text =
"Failed";
919 case HarnessTestStatus::kTimeout:
920 status_color = ImVec4(1.0f, 0.5f, 0.0f, 1.0f);
922 status_text =
"Timeout";
924 case HarnessTestStatus::kRunning:
925 status_color = ImVec4(1.0f, 1.0f, 0.0f, 1.0f);
927 status_text =
"Running";
929 case HarnessTestStatus::kQueued:
930 status_color = ImVec4(0.6f, 0.6f, 0.6f, 1.0f);
932 status_text =
"Queued";
935 status_color = ImVec4(0.6f, 0.6f, 0.6f, 1.0f);
937 status_text =
"Unknown";
941 ImGui::TextColored(status_color,
"%s %s", status_icon,
944 ImGui::TableNextColumn();
945 ImGui::Text(
"%s", exec.name.c_str());
948 if (exec.status == HarnessTestStatus::kFailed &&
949 !exec.error_message.empty()) {
951 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.5f, 1.0f),
"(%s)",
952 exec.error_message.c_str());
955 ImGui::TableNextColumn();
956 ImGui::Text(
"%s", exec.category.c_str());
958 ImGui::TableNextColumn();
959 ImGui::Text(
"%d", summary.total_runs);
961 ImGui::TableNextColumn();
962 if (summary.total_runs > 0) {
964 static_cast<float>(summary.pass_count) / summary.total_runs;
966 pass_rate >= 0.9f ? ImVec4(0.0f, 1.0f, 0.0f, 1.0f)
967 : pass_rate >= 0.7f ? ImVec4(1.0f, 1.0f, 0.0f, 1.0f)
968 : ImVec4(1.0f, 0.0f, 0.0f, 1.0f);
969 ImGui::TextColored(rate_color,
"%.0f%%", pass_rate * 100.0f);
974 ImGui::TableNextColumn();
976 absl::ToDoubleMilliseconds(summary.total_duration);
977 if (summary.total_runs > 0) {
978 ImGui::Text(
"%.0f ms", duration_ms / summary.total_runs);
984 if (ImGui::TreeNode((
"Details##" + exec.test_id).c_str())) {
985 ImGui::Text(
"Test ID: %s", exec.test_id.c_str());
986 ImGui::Text(
"Total Runs: %d (Pass: %d, Fail: %d)",
987 summary.total_runs, summary.pass_count,
990 if (!exec.logs.empty()) {
993 for (
const auto& log : exec.logs) {
994 ImGui::BulletText(
"%s", log.c_str());
998 if (!exec.assertion_failures.empty()) {
1000 ImGui::TextColored(ImVec4(1.0f, 0.3f, 0.3f, 1.0f),
1002 for (
const auto& failure : exec.assertion_failures) {
1003 ImGui::BulletText(
"%s", failure.c_str());
1007 if (!exec.screenshot_path.empty()) {
1010 exec.screenshot_path.c_str());
1011 ImGui::Text(
"Size: %.2f KB",
1012 exec.screenshot_size_bytes / 1024.0);
1024 ImGui::EndTabItem();
1035 ImGui::Begin(absl::StrCat(
ICON_MD_MONITOR,
" Resource Monitor").c_str(),
1040 ImGui::Text(
"%s Textures: %zu",
ICON_MD_TEXTURE, latest.texture_count);
1041 ImGui::Text(
"%s Surfaces: %zu",
ICON_MD_LAYERS, latest.surface_count);
1042 ImGui::Text(
"%s Memory: %zu MB",
ICON_MD_MEMORY, latest.memory_usage_mb);
1043 ImGui::Text(
"%s FPS: %.1f",
ICON_MD_SPEED, latest.frame_rate);
1047 std::vector<float> texture_counts;
1048 std::vector<float> surface_counts;
1053 texture_counts.push_back(
static_cast<float>(stats.texture_count));
1054 surface_counts.push_back(
static_cast<float>(stats.surface_count));
1057 ImGui::PlotLines(
"Textures", texture_counts.data(),
1058 static_cast<int>(texture_counts.size()), 0,
nullptr,
1059 0.0f, FLT_MAX, ImVec2(0, 80));
1060 ImGui::PlotLines(
"Surfaces", surface_counts.data(),
1061 static_cast<int>(surface_counts.size()), 0,
nullptr,
1062 0.0f, FLT_MAX, ImVec2(0, 80));
1071 ImGui::SetNextWindowSize(ImVec2(600, 400), ImGuiCond_FirstUseEver);
1076#ifdef YAZE_ENABLE_GTEST
1077 ImGui::Text(
"Google Test framework is available");
1079 if (ImGui::Button(
"Run All Google Tests")) {
1081 LOG_INFO(
"TestManager",
"Running Google Tests...");
1085 if (ImGui::Button(
"Run Specific Test Suite")) {
1090 ImGui::Text(
"Available Test Suites:");
1091 ImGui::BulletText(
"Unit Tests");
1092 ImGui::BulletText(
"Integration Tests");
1093 ImGui::BulletText(
"Performance Tests");
1095 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
1096 "%s Google Test framework not available",
1098 ImGui::Text(
"Enable YAZE_ENABLE_GTEST to use Google Test integration");
1106 ImGui::SetNextWindowSize(ImVec2(700, 500), ImGuiCond_FirstUseEver);
1115 if (ImGui::CollapsingHeader(
"ROM Data Integrity",
1116 ImGuiTreeNodeFlags_DefaultOpen)) {
1120 if (ImGui::Button(
"Run Data Integrity Check")) {
1122 [[maybe_unused]]
auto suite_status =
1127 if (ImGui::CollapsingHeader(
"Save/Load Testing")) {
1128 ImGui::Text(
"Test ROM save and load operations");
1130 if (ImGui::Button(
"Test Save Operations")) {
1135 if (ImGui::Button(
"Test Load Operations")) {
1140 if (ImGui::CollapsingHeader(
"Editor Integration")) {
1141 ImGui::Text(
"Test editor components with current ROM");
1143 if (ImGui::Button(
"Test Overworld Editor")) {
1148 if (ImGui::Button(
"Test Tile16 Editor")) {
1154 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
1163 ImGui::SetNextWindowSize(ImVec2(400, 200), ImGuiCond_Appearing);
1165 ImGuiWindowFlags_NoResize)) {
1169 ImGui::Text(
"Select a ROM file to run tests on:");
1171 if (ImGui::Button(
"Browse ROM File...", ImVec2(-1, 0))) {
1178 if (ImGui::Button(
"Cancel", ImVec2(-1, 0))) {
1187 ImGui::SetNextWindowSize(ImVec2(600, 500), ImGuiCond_FirstUseEver);
1193 if (ImGui::CollapsingHeader(
"File Dialog Settings",
1194 ImGuiTreeNodeFlags_DefaultOpen)) {
1195 ImGui::Text(
"File Dialog Implementation:");
1198 if (ImGui::RadioButton(
"NFD (Native File Dialog)", nfd_mode)) {
1200 LOG_INFO(
"TestManager",
"Global file dialog mode set to: NFD");
1202 if (ImGui::IsItemHovered()) {
1204 "Use NFD library for native OS file dialogs (global setting)");
1207 if (ImGui::RadioButton(
"Bespoke Implementation", !nfd_mode)) {
1209 LOG_INFO(
"TestManager",
"Global file dialog mode set to: Bespoke");
1211 if (ImGui::IsItemHovered()) {
1213 "Use custom file dialog implementation (global setting)");
1221 ImVec4(1.0f, 1.0f, 0.0f, 1.0f),
1222 "Note: This setting affects ALL file dialogs in the application");
1224 if (ImGui::Button(
"Test Current File Dialog")) {
1226 LOG_INFO(
"TestManager",
"Testing global file dialog mode: %s",
1232 if (!result.empty()) {
1233 LOG_INFO(
"TestManager",
"File dialog test successful: %s",
1237 "File dialog test: No file selected or dialog canceled");
1242 if (ImGui::Button(
"Test NFD Directly")) {
1244 if (!result.empty()) {
1245 LOG_INFO(
"TestManager",
"NFD test successful: %s", result.c_str());
1248 "NFD test: No file selected, canceled, or error occurred");
1253 if (ImGui::Button(
"Test Bespoke Directly")) {
1255 if (!result.empty()) {
1256 LOG_INFO(
"TestManager",
"Bespoke test successful: %s",
1260 "Bespoke test: No file selected or not implemented");
1266 if (ImGui::CollapsingHeader(
"Test Selection",
1267 ImGuiTreeNodeFlags_DefaultOpen)) {
1268 ImGui::Text(
"Enable/Disable Individual Tests:");
1272 static const std::vector<std::pair<std::string, std::string>>
1274 {
"ROM_Header_Validation_Test",
1275 "Safe - Read-only ROM header validation"},
1276 {
"ROM_Data_Access_Test",
1277 "Safe - Basic ROM data access testing"},
1278 {
"ROM_Graphics_Extraction_Test",
1279 "Safe - Graphics data extraction testing"},
1280 {
"ROM_Overworld_Loading_Test",
1281 "Safe - Overworld data loading testing"},
1282 {
"Tile16_Editor_Test",
1283 "Moderate - Tile16 editor initialization"},
1284 {
"Comprehensive_Save_Test",
1285 "DANGEROUS - Known to crash, uses ROM copies"},
1286 {
"ROM_Sprite_Data_Test",
"Safe - Sprite data validation"},
1287 {
"ROM_Music_Data_Test",
"Safe - Music data validation"}};
1290 static bool initialized_defaults =
false;
1291 if (!initialized_defaults) {
1294 initialized_defaults =
true;
1297 if (ImGui::BeginTable(
1299 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg)) {
1300 ImGui::TableSetupColumn(
"Test Name", ImGuiTableColumnFlags_WidthFixed,
1302 ImGui::TableSetupColumn(
"Risk Level",
1303 ImGuiTableColumnFlags_WidthStretch);
1304 ImGui::TableSetupColumn(
"Status", ImGuiTableColumnFlags_WidthFixed,
1306 ImGui::TableSetupColumn(
"Action", ImGuiTableColumnFlags_WidthFixed,
1308 ImGui::TableHeadersRow();
1310 for (
const auto& [test_name, description] : known_tests) {
1313 ImGui::TableNextRow();
1314 ImGui::TableNextColumn();
1315 ImGui::Text(
"%s", test_name.c_str());
1317 ImGui::TableNextColumn();
1319 if (description.find(
"DANGEROUS") != std::string::npos) {
1320 ImGui::TextColored(ImVec4(1.0f, 0.3f, 0.3f, 1.0f),
"%s",
1321 description.c_str());
1322 }
else if (description.find(
"Moderate") != std::string::npos) {
1323 ImGui::TextColored(ImVec4(1.0f, 0.8f, 0.0f, 1.0f),
"%s",
1324 description.c_str());
1326 ImGui::TextColored(ImVec4(0.0f, 0.8f, 0.0f, 1.0f),
"%s",
1327 description.c_str());
1330 ImGui::TableNextColumn();
1332 ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f),
"%s ON",
1335 ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
"%s OFF",
1339 ImGui::TableNextColumn();
1340 ImGui::PushID(test_name.c_str());
1342 if (ImGui::Button(
"Disable")) {
1344 LOG_INFO(
"TestManager",
"Disabled test: %s", test_name.c_str());
1347 if (ImGui::Button(
"Enable")) {
1349 LOG_INFO(
"TestManager",
"Enabled test: %s", test_name.c_str());
1359 ImGui::Text(
"Quick Actions:");
1361 if (ImGui::Button(
"Enable Safe Tests Only")) {
1362 for (
const auto& [test_name, description] : known_tests) {
1363 if (description.find(
"Safe") != std::string::npos) {
1369 LOG_INFO(
"TestManager",
"Enabled only safe tests");
1373 if (ImGui::Button(
"Enable All Tests")) {
1374 for (
const auto& [test_name, description] : known_tests) {
1378 "Enabled all tests (including dangerous ones)");
1382 if (ImGui::Button(
"Disable All Tests")) {
1383 for (
const auto& [test_name, description] : known_tests) {
1386 LOG_INFO(
"TestManager",
"Disabled all tests");
1391 ImVec4(1.0f, 0.5f, 0.0f, 1.0f),
1392 "⚠️ Recommendation: Use 'Enable Safe Tests Only' to avoid crashes");
1396 if (ImGui::CollapsingHeader(
"Platform Settings")) {
1397 ImGui::Text(
"macOS Tahoe Compatibility:");
1398 ImGui::BulletText(
"NFD may have issues on macOS Sequoia+");
1399 ImGui::BulletText(
"Bespoke dialog provides fallback option");
1401 "Global setting affects File → Open, Project dialogs, etc.");
1404 ImGui::Text(
"Test Both Implementations:");
1406 if (ImGui::Button(
"Quick Test NFD")) {
1408 LOG_INFO(
"TestManager",
"NFD test result: %s",
1409 result.empty() ?
"Failed/Canceled" : result.c_str());
1412 if (ImGui::Button(
"Quick Test Bespoke")) {
1414 LOG_INFO(
"TestManager",
"Bespoke test result: %s",
1415 result.empty() ?
"Failed/Not Implemented" : result.c_str());
1419 ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f),
1420 "Note: These tests don't change the global setting");
1428 ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(),
1429 ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
1430 ImGui::SetNextWindowSize(ImVec2(500, 300), ImGuiCond_Appearing);
1433 ImGuiWindowFlags_NoResize)) {
1437 ImGui::Text(
"A test ROM has been created with your modifications:");
1442 auto last_slash = display_filename.find_last_of(
"/\\");
1443 if (last_slash != std::string::npos) {
1444 display_filename = display_filename.substr(last_slash + 1);
1448 ImGui::Text(
"Would you like to open this test ROM in a new session?");
1451 absl::StrFormat(
"%s Open in New Session",
ICON_MD_TAB).c_str(),
1456 "User requested to open test ROM in new session: %s",
1463 absl::StrFormat(
"%s Keep Current Session",
ICON_MD_CLOSE).c_str(),
1470 ImVec4(0.7f, 0.7f, 0.7f, 1.0f),
1471 "Note: Test ROM contains your modifications and can be");
1472 ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f),
1473 "opened later using File → Open");