Plan cube export face targets in app core
This commit is contained in:
@@ -898,6 +898,12 @@ if(TARGET pano_cli)
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-target\".*\"kind\":\"collection\".*\"directory\":\"D:/Paint/demo_layers\".*\"stemPath\":\"D:/Paint/demo_layers/demo\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_target_cube_faces_smoke
|
||||
COMMAND pano_cli plan-export-target --kind cube-faces --work-dir D:/Paint --doc-name demo)
|
||||
set_tests_properties(pano_cli_plan_export_target_cube_faces_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-target\".*\"kind\":\"cube-faces\".*\"faceCount\":6.*\"name\":\"front\".*\"path\":\"D:/Paint/demo-front.png\".*\"name\":\"bottom\".*\"path\":\"D:/Paint/demo-bottom.png\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_target_name_smoke
|
||||
COMMAND pano_cli plan-export-target --kind name --doc-name demo --suffix -timelapse)
|
||||
set_tests_properties(pano_cli_plan_export_target_name_smoke PROPERTIES
|
||||
|
||||
@@ -182,6 +182,36 @@ void picked_directory_export_builds_stem(pp::tests::Harness& harness)
|
||||
PP_EXPECT(harness, target.value().stem_path == "D:/Exports/demo");
|
||||
}
|
||||
|
||||
void cube_face_export_builds_legacy_work_paths(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto target = pp::app::make_document_cube_face_export_target("D:/Paint", "demo");
|
||||
PP_EXPECT(harness, target);
|
||||
PP_EXPECT(harness, target.value().face_count == 6U);
|
||||
PP_EXPECT(harness, target.value().faces[0].face_name == "front");
|
||||
PP_EXPECT(harness, target.value().faces[0].path == "D:/Paint/demo-front.png");
|
||||
PP_EXPECT(harness, target.value().faces[1].face_name == "right");
|
||||
PP_EXPECT(harness, target.value().faces[1].path == "D:/Paint/demo-right.png");
|
||||
PP_EXPECT(harness, target.value().faces[2].face_name == "back");
|
||||
PP_EXPECT(harness, target.value().faces[2].path == "D:/Paint/demo-back.png");
|
||||
PP_EXPECT(harness, target.value().faces[3].face_name == "left");
|
||||
PP_EXPECT(harness, target.value().faces[3].path == "D:/Paint/demo-left.png");
|
||||
PP_EXPECT(harness, target.value().faces[4].face_name == "top");
|
||||
PP_EXPECT(harness, target.value().faces[4].path == "D:/Paint/demo-top.png");
|
||||
PP_EXPECT(harness, target.value().faces[5].face_name == "bottom");
|
||||
PP_EXPECT(harness, target.value().faces[5].path == "D:/Paint/demo-bottom.png");
|
||||
}
|
||||
|
||||
void cube_face_export_rejects_invalid_target_inputs(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto missing_work_directory = pp::app::make_document_cube_face_export_target("", "demo");
|
||||
const auto missing_name = pp::app::make_document_cube_face_export_target("D:/Paint", "");
|
||||
|
||||
PP_EXPECT(harness, !missing_work_directory);
|
||||
PP_EXPECT(harness, missing_work_directory.status().code == pp::foundation::StatusCode::invalid_argument);
|
||||
PP_EXPECT(harness, !missing_name);
|
||||
PP_EXPECT(harness, missing_name.status().code == pp::foundation::StatusCode::invalid_argument);
|
||||
}
|
||||
|
||||
void video_export_builds_suggested_name(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto timelapse = pp::app::make_document_export_suggested_name("demo", "-timelapse");
|
||||
@@ -717,6 +747,8 @@ int main()
|
||||
harness.run("export file target rejects invalid input", export_file_target_rejects_invalid_input);
|
||||
harness.run("collection export builds directory and stem", collection_export_builds_directory_and_stem);
|
||||
harness.run("picked directory export builds stem", picked_directory_export_builds_stem);
|
||||
harness.run("cube face export builds legacy work paths", cube_face_export_builds_legacy_work_paths);
|
||||
harness.run("cube face export rejects invalid target inputs", cube_face_export_rejects_invalid_target_inputs);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user