Plan document export success messages
This commit is contained in:
@@ -899,6 +899,37 @@ if(TARGET pano_cli)
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-target\".*\"kind\":\"name\".*\"suggestedName\":\"demo-timelapse\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_message_equirect_work_smoke
|
||||
COMMAND pano_cli plan-export-message --kind equirectangular --destination work --detail D:/Paint)
|
||||
set_tests_properties(pano_cli_plan_export_message_equirect_work_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-message\".*\"kind\":\"equirectangular\".*\"destination\":\"work-directory\".*\"showDialog\":true.*\"title\":\"Export Equirectangular\".*\"message\":\"Image exported to D:/Paint\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_message_layers_files_smoke
|
||||
COMMAND pano_cli plan-export-message --kind layers --destination files)
|
||||
set_tests_properties(pano_cli_plan_export_message_layers_files_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-message\".*\"kind\":\"layers\".*\"destination\":\"files-panopainter\".*\"showDialog\":true.*\"message\":\"Image layers exported to Files/PanoPainter\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_message_timelapse_success_smoke
|
||||
COMMAND pano_cli plan-export-message --kind timelapse --destination success)
|
||||
set_tests_properties(pano_cli_plan_export_message_timelapse_success_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-message\".*\"kind\":\"timelapse\".*\"destination\":\"generic-success\".*\"showDialog\":true.*\"message\":\"Timelapse exported successfully\\.\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_message_suppressed_smoke
|
||||
COMMAND pano_cli plan-export-message --kind depth --destination suppressed)
|
||||
set_tests_properties(pano_cli_plan_export_message_suppressed_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast;fuzz"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-message\".*\"kind\":\"depth\".*\"destination\":\"suppressed\".*\"showDialog\":false.*\"title\":\"\".*\"message\":\"\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_message_rejects_unknown
|
||||
COMMAND pano_cli plan-export-message --kind nope)
|
||||
set_tests_properties(pano_cli_plan_export_message_rejects_unknown PROPERTIES
|
||||
LABELS "app;integration;desktop-fast;fuzz"
|
||||
WILL_FAIL TRUE
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-message\".*\"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
|
||||
|
||||
@@ -218,6 +218,115 @@ void collection_export_target_plan_selects_platform_destination(pp::tests::Harne
|
||||
PP_EXPECT(harness, picked_layers.suffix == "_layers");
|
||||
}
|
||||
|
||||
void export_success_dialog_plans_image_destinations(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto photos = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::equirectangular,
|
||||
pp::app::DocumentExportSuccessDestination::photos);
|
||||
const auto pictures = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::equirectangular,
|
||||
pp::app::DocumentExportSuccessDestination::pictures_panopainter);
|
||||
const auto work = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::equirectangular,
|
||||
pp::app::DocumentExportSuccessDestination::work_directory,
|
||||
"D:/Paint");
|
||||
|
||||
PP_EXPECT(harness, photos.show_dialog);
|
||||
PP_EXPECT(harness, photos.dialog.title == "Export Equirectangular");
|
||||
PP_EXPECT(harness, photos.dialog.message == "Image exported to Photos");
|
||||
PP_EXPECT(harness, pictures.dialog.message == "Image exported to Pictures/PanoPainter folder");
|
||||
PP_EXPECT(harness, work.dialog.message == "Image exported to D:/Paint");
|
||||
}
|
||||
|
||||
void export_success_dialog_plans_collection_destinations(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto layers_path = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::layers,
|
||||
pp::app::DocumentExportSuccessDestination::path,
|
||||
"D:/Paint/demo_layers/demo");
|
||||
const auto frames_path = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::animation_frames,
|
||||
pp::app::DocumentExportSuccessDestination::path,
|
||||
"D:/Paint/demo_frames/demo");
|
||||
const auto layers_collection = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::layers,
|
||||
pp::app::DocumentExportSuccessDestination::files_panopainter);
|
||||
const auto frames_collection = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::animation_frames,
|
||||
pp::app::DocumentExportSuccessDestination::files_panopainter);
|
||||
|
||||
PP_EXPECT(harness, layers_path.dialog.title == "Export Layers");
|
||||
PP_EXPECT(harness, layers_path.dialog.message == "Layers exported to: D:/Paint/demo_layers/demo");
|
||||
PP_EXPECT(harness, frames_path.dialog.message == "Layers exported to: D:/Paint/demo_frames/demo");
|
||||
PP_EXPECT(harness, layers_collection.dialog.message == "Image layers exported to Files/PanoPainter");
|
||||
PP_EXPECT(harness, frames_collection.dialog.message == "Image layers exported to Files/PanoPainter");
|
||||
}
|
||||
|
||||
void export_success_dialog_plans_depth_and_cube_destinations(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto depth_files = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::depth,
|
||||
pp::app::DocumentExportSuccessDestination::files_panopainter);
|
||||
const auto depth_pictures = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::depth,
|
||||
pp::app::DocumentExportSuccessDestination::pictures_panopainter);
|
||||
const auto depth_work = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::depth,
|
||||
pp::app::DocumentExportSuccessDestination::work_directory,
|
||||
"D:/Paint");
|
||||
const auto cube_work = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::cube_faces,
|
||||
pp::app::DocumentExportSuccessDestination::work_directory,
|
||||
"D:/Paint");
|
||||
|
||||
PP_EXPECT(harness, depth_files.dialog.title == "Export 3D View + Depth");
|
||||
PP_EXPECT(harness, depth_files.dialog.message == "Image and depth exported to Files/PanoPainter");
|
||||
PP_EXPECT(harness, depth_pictures.dialog.message == "Image and depth exported to Pictures/PanoPainter folder");
|
||||
PP_EXPECT(harness, depth_work.dialog.message == "Image and depth exported to D:/Paint");
|
||||
PP_EXPECT(harness, cube_work.dialog.title == "Export Cube Faces");
|
||||
PP_EXPECT(harness, cube_work.dialog.message == "Image and depth exported to D:/Paint");
|
||||
}
|
||||
|
||||
void export_success_dialog_plans_video_destinations(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto animation_path = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::animation_mp4,
|
||||
pp::app::DocumentExportSuccessDestination::path,
|
||||
"D:/Paint/animation.mp4");
|
||||
const auto animation_success = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::animation_mp4,
|
||||
pp::app::DocumentExportSuccessDestination::generic_success);
|
||||
const auto timelapse_path = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::timelapse,
|
||||
pp::app::DocumentExportSuccessDestination::path,
|
||||
"D:/Paint/timelapse.mp4");
|
||||
const auto timelapse_success = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::timelapse,
|
||||
pp::app::DocumentExportSuccessDestination::generic_success);
|
||||
|
||||
PP_EXPECT(harness, animation_path.dialog.title == "Export Animation");
|
||||
PP_EXPECT(harness, animation_path.dialog.message == "Animation exported to: D:/Paint/animation.mp4");
|
||||
PP_EXPECT(harness, animation_success.dialog.message == "Animation exported successfully.");
|
||||
PP_EXPECT(harness, timelapse_path.dialog.title == "Export Timelapse");
|
||||
PP_EXPECT(harness, timelapse_path.dialog.message == "Timelapse exported to: D:/Paint/timelapse.mp4");
|
||||
PP_EXPECT(harness, timelapse_success.dialog.message == "Timelapse exported successfully.");
|
||||
}
|
||||
|
||||
void export_success_dialog_suppresses_unsupported_destinations(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto suppressed = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::depth,
|
||||
pp::app::DocumentExportSuccessDestination::suppressed);
|
||||
const auto invalid_combo = pp::app::plan_document_export_success_dialog(
|
||||
pp::app::DocumentExportSuccessKind::equirectangular,
|
||||
pp::app::DocumentExportSuccessDestination::files_panopainter);
|
||||
|
||||
PP_EXPECT(harness, !suppressed.show_dialog);
|
||||
PP_EXPECT(harness, suppressed.dialog.title.empty());
|
||||
PP_EXPECT(harness, !invalid_combo.show_dialog);
|
||||
PP_EXPECT(harness, invalid_combo.dialog.message.empty());
|
||||
}
|
||||
|
||||
void export_start_allows_valid_canvas_state(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
@@ -552,6 +661,11 @@ int main()
|
||||
harness.run("picked directory export builds stem", picked_directory_export_builds_stem);
|
||||
harness.run("video export builds suggested name", video_export_builds_suggested_name);
|
||||
harness.run("collection export target plan selects platform destination", collection_export_target_plan_selects_platform_destination);
|
||||
harness.run("export success dialog plans image destinations", export_success_dialog_plans_image_destinations);
|
||||
harness.run("export success dialog plans collection destinations", export_success_dialog_plans_collection_destinations);
|
||||
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 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