Plan document export reporting
This commit is contained in:
@@ -930,6 +930,25 @@ if(TARGET pano_cli)
|
||||
WILL_FAIL TRUE
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-message\".*\"message\":\"unknown export message kind\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_report_failure_smoke
|
||||
COMMAND pano_cli plan-export-report --kind animation-mp4 --message "video export path must not be empty")
|
||||
set_tests_properties(pano_cli_plan_export_report_failure_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast;fuzz"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-report\".*\"kind\":\"animation-mp4\".*\"title\":\"Export Animation\".*\"message\":\"video export path must not be empty\".*\"showCancel\":false")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_report_license_smoke
|
||||
COMMAND pano_cli plan-export-report --kind license-disabled)
|
||||
set_tests_properties(pano_cli_plan_export_report_license_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-report\".*\"kind\":\"license-disabled\".*\"title\":\"License\".*\"message\":\"This function is disabled in demo mode\\.\".*\"showCancel\":false")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_report_rejects_unknown
|
||||
COMMAND pano_cli plan-export-report --kind nope)
|
||||
set_tests_properties(pano_cli_plan_export_report_rejects_unknown PROPERTIES
|
||||
LABELS "app;integration;desktop-fast;fuzz"
|
||||
WILL_FAIL TRUE
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-report\".*\"message\":\"unknown export message kind\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_cloud_upload_clean_smoke
|
||||
COMMAND pano_cli plan-cloud-upload)
|
||||
set_tests_properties(pano_cli_plan_cloud_upload_clean_smoke PROPERTIES
|
||||
|
||||
@@ -327,6 +327,64 @@ void export_success_dialog_suppresses_unsupported_destinations(pp::tests::Harnes
|
||||
PP_EXPECT(harness, invalid_combo.dialog.message.empty());
|
||||
}
|
||||
|
||||
void export_failure_dialog_plans_titles_and_messages(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto equirect = pp::app::plan_document_export_failure_dialog(
|
||||
pp::app::DocumentExportSuccessKind::equirectangular,
|
||||
"document name must not be empty");
|
||||
const auto frames = pp::app::plan_document_export_failure_dialog(
|
||||
pp::app::DocumentExportSuccessKind::animation_frames,
|
||||
"document name must not be empty");
|
||||
const auto animation = pp::app::plan_document_export_failure_dialog(
|
||||
pp::app::DocumentExportSuccessKind::animation_mp4,
|
||||
"video export path must not be empty");
|
||||
|
||||
PP_EXPECT(harness, equirect.title == "Export Equirectangular");
|
||||
PP_EXPECT(harness, equirect.message == "document name must not be empty");
|
||||
PP_EXPECT(harness, !equirect.show_cancel);
|
||||
PP_EXPECT(harness, frames.title == "Export Layers");
|
||||
PP_EXPECT(harness, animation.title == "Export Animation");
|
||||
PP_EXPECT(harness, animation.message == "video export path must not be empty");
|
||||
}
|
||||
|
||||
void export_license_disabled_dialog_preserves_legacy_warning(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto plan = pp::app::plan_document_export_license_disabled_dialog();
|
||||
|
||||
PP_EXPECT(harness, plan.title == "License");
|
||||
PP_EXPECT(harness, plan.message == "This function is disabled in demo mode.");
|
||||
PP_EXPECT(harness, !plan.show_cancel);
|
||||
}
|
||||
|
||||
void export_execution_log_messages_cover_legacy_paths(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
std::string_view(pp::app::document_export_execution_log_message(
|
||||
pp::app::DocumentExportExecutionKind::equirectangular_file))
|
||||
== "Document export file action failed");
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
std::string_view(pp::app::document_export_execution_log_message(
|
||||
pp::app::DocumentExportExecutionKind::layers_collection))
|
||||
== "Document layer collection export failed");
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
std::string_view(pp::app::document_export_execution_log_message(
|
||||
pp::app::DocumentExportExecutionKind::animation_frames_stem))
|
||||
== "Document animation frame stem export failed");
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
std::string_view(pp::app::document_export_execution_log_message(
|
||||
pp::app::DocumentExportExecutionKind::cube_faces))
|
||||
== "Document cube-face export failed");
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
std::string_view(pp::app::document_export_execution_log_message(
|
||||
pp::app::DocumentExportExecutionKind::timelapse))
|
||||
== "Document timelapse export failed");
|
||||
}
|
||||
|
||||
void export_start_allows_valid_canvas_state(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
@@ -666,6 +724,9 @@ int main()
|
||||
harness.run("export success dialog plans depth and cube destinations", export_success_dialog_plans_depth_and_cube_destinations);
|
||||
harness.run("export success dialog plans video destinations", export_success_dialog_plans_video_destinations);
|
||||
harness.run("export success dialog suppresses unsupported destinations", export_success_dialog_suppresses_unsupported_destinations);
|
||||
harness.run("export failure dialog plans titles and messages", export_failure_dialog_plans_titles_and_messages);
|
||||
harness.run("export license disabled dialog preserves legacy warning", export_license_disabled_dialog_preserves_legacy_warning);
|
||||
harness.run("export execution log messages cover legacy paths", export_execution_log_messages_cover_legacy_paths);
|
||||
harness.run("export start allows valid canvas state", export_start_allows_valid_canvas_state);
|
||||
harness.run("export start blocks demo only when license required", export_start_blocks_demo_only_when_license_required);
|
||||
harness.run("export start reports missing canvas after license gate", export_start_reports_missing_canvas_after_license_gate);
|
||||
|
||||
Reference in New Issue
Block a user