Report depth export snapshot routing

This commit is contained in:
2026-06-06 11:24:29 +02:00
parent 09df47879d
commit 9d9c87c0cb
7 changed files with 66 additions and 26 deletions

View File

@@ -901,10 +901,10 @@ if(TARGET pano_cli)
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-menu\".*\"kind\":\"layers\".*\"hasCanvas\":false.*\"action\":\"unavailable-no-canvas\".*\"opensDialog\":false")
add_test(NAME pano_cli_plan_export_snapshot_route_ready_smoke
COMMAND pano_cli plan-export-snapshot-route --kind equirectangular --captured-face-payloads 6 --pending-face-payloads 6)
COMMAND pano_cli plan-export-snapshot-route --kind equirectangular --target-path D:/Paint/demo.png --captured-face-payloads 6 --pending-face-payloads 6)
set_tests_properties(pano_cli_plan_export_snapshot_route_ready_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-snapshot-route\".*\"kind\":\"equirectangular\".*\"payloadComplete\":true.*\"action\":\"use-document-snapshot-writer\".*\"usesDocumentSnapshotWriter\":true.*\"fallbackReason\":\"\"")
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-snapshot-route\".*\"kind\":\"equirectangular\".*\"targetPath\":\"D:/Paint/demo.png\".*\"payloadComplete\":true.*\"action\":\"use-document-snapshot-writer\".*\"usesDocumentSnapshotWriter\":true.*\"fallbackReason\":\"\"")
add_test(NAME pano_cli_plan_export_snapshot_route_pending_smoke
COMMAND pano_cli plan-export-snapshot-route --kind layers-collection --captured-face-payloads 3 --pending-face-payloads 6)
@@ -924,6 +924,12 @@ if(TARGET pano_cli)
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-snapshot-route\".*\"kind\":\"cube-faces\".*\"targetSupported\":true.*\"platformSupported\":false.*\"action\":\"use-legacy-export\".*\"fallbackReason\":\"document snapshot export is disabled on this platform\"")
add_test(NAME pano_cli_plan_export_snapshot_route_depth_smoke
COMMAND pano_cli plan-export-snapshot-route --kind depth)
set_tests_properties(pano_cli_plan_export_snapshot_route_depth_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-snapshot-route\".*\"kind\":\"depth\".*\"targetSupported\":false.*\"platformSupported\":true.*\"action\":\"use-legacy-export\".*\"fallbackReason\":\"document snapshot export does not support this target\"")
add_test(NAME pano_cli_plan_export_menu_rejects_unknown
COMMAND pano_cli plan-export-menu --kind unknown)
set_tests_properties(pano_cli_plan_export_menu_rejects_unknown PROPERTIES

View File

@@ -852,6 +852,31 @@ void export_snapshot_route_for_current_platform_uses_platform_policy(pp::tests::
#endif
}
void export_snapshot_route_for_current_platform_reports_depth_fallback(pp::tests::Harness& harness)
{
pp::app::DocumentCanvasSaveSnapshotReport report;
report.payload_complete = true;
report.can_export_ppi = true;
const auto plan = pp::app::plan_document_export_snapshot_route_for_current_platform(
pp::app::DocumentExportExecutionKind::depth,
report);
PP_EXPECT(harness, !plan.uses_document_snapshot_writer);
#if __WEB__
PP_EXPECT(harness, !plan.platform_supported);
PP_EXPECT(
harness,
plan.fallback_reason == "document snapshot export is disabled on this platform");
#else
PP_EXPECT(harness, plan.platform_supported);
PP_EXPECT(harness, !plan.target_supported);
PP_EXPECT(
harness,
plan.fallback_reason == "document snapshot export does not support this target");
#endif
}
void export_snapshot_route_falls_back_for_pending_renderer_payloads(pp::tests::Harness& harness)
{
pp::app::DocumentCanvasSaveSnapshotReport report;
@@ -1273,6 +1298,9 @@ int main()
harness.run(
"export snapshot route for current platform uses platform policy",
export_snapshot_route_for_current_platform_uses_platform_policy);
harness.run(
"export snapshot route for current platform reports depth fallback",
export_snapshot_route_for_current_platform_reports_depth_fallback);
harness.run(
"export snapshot route falls back for pending renderer payloads",
export_snapshot_route_falls_back_for_pending_renderer_payloads);