Extract quick UI operation planning

This commit is contained in:
2026-06-03 11:01:01 +02:00
parent 73fac0f8e4
commit 8dc476d205
8 changed files with 499 additions and 11 deletions

View File

@@ -288,6 +288,16 @@ add_test(NAME pp_app_core_grid_ui_tests COMMAND pp_app_core_grid_ui_tests)
set_tests_properties(pp_app_core_grid_ui_tests PROPERTIES
LABELS "app;ui;renderer;desktop-fast;fuzz")
add_executable(pp_app_core_quick_ui_tests
app_core/quick_ui_tests.cpp)
target_link_libraries(pp_app_core_quick_ui_tests PRIVATE
pp_app_core
pp_test_harness)
add_test(NAME pp_app_core_quick_ui_tests COMMAND pp_app_core_quick_ui_tests)
set_tests_properties(pp_app_core_quick_ui_tests PROPERTIES
LABELS "app;ui;paint;desktop-fast;fuzz")
add_executable(pp_app_core_document_route_tests
app_core/document_route_tests.cpp)
target_link_libraries(pp_app_core_document_route_tests PRIVATE
@@ -862,6 +872,42 @@ if(TARGET pano_cli)
LABELS "app;ui;renderer;integration;desktop-fast;fuzz"
WILL_FAIL TRUE)
add_test(NAME pano_cli_plan_quick_operation_select_brush_smoke
COMMAND pano_cli plan-quick-operation --kind brush --current-index 0 --slot-index 2)
set_tests_properties(pano_cli_plan_quick_operation_select_brush_smoke PROPERTIES
LABELS "app;ui;paint;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-quick-operation\".*\"operation\":\"select-slot\".*\"slotKind\":\"brush\".*\"slotIndex\":2.*\"updatesSelection\":true.*\"invokesChangeCallback\":true")
add_test(NAME pano_cli_plan_quick_operation_open_color_smoke
COMMAND pano_cli plan-quick-operation --kind color --current-index 1 --slot-index 1)
set_tests_properties(pano_cli_plan_quick_operation_open_color_smoke PROPERTIES
LABELS "app;ui;paint;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-quick-operation\".*\"operation\":\"open-slot-popup\".*\"slotKind\":\"color\".*\"opensColorPicker\":true.*\"mutatesQuickState\":false")
add_test(NAME pano_cli_plan_quick_operation_restore_smoke
COMMAND pano_cli plan-quick-operation --kind restore --brush-index 2 --color-index 1 --fire-event)
set_tests_properties(pano_cli_plan_quick_operation_restore_smoke PROPERTIES
LABELS "app;ui;paint;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-quick-operation\".*\"operation\":\"restore-state\".*\"fireEvent\":true.*\"invokesChangeCallback\":true.*\"restoresSlots\":true.*\"redrawsBrushPreviews\":true")
add_test(NAME pano_cli_plan_quick_operation_reset_smoke
COMMAND pano_cli plan-quick-operation --kind reset)
set_tests_properties(pano_cli_plan_quick_operation_reset_smoke PROPERTIES
LABELS "app;ui;paint;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-quick-operation\".*\"operation\":\"reset-state\".*\"invokesChangeCallback\":false.*\"resetsSlots\":true.*\"redrawsBrushPreviews\":true")
add_test(NAME pano_cli_plan_quick_operation_rejects_bad_slot
COMMAND pano_cli plan-quick-operation --kind brush --current-index 0 --slot-index 3)
set_tests_properties(pano_cli_plan_quick_operation_rejects_bad_slot PROPERTIES
LABELS "app;ui;paint;integration;desktop-fast;fuzz"
WILL_FAIL TRUE)
add_test(NAME pano_cli_plan_quick_operation_rejects_bad_restore
COMMAND pano_cli plan-quick-operation --kind restore --brush-index -1 --color-index 0)
set_tests_properties(pano_cli_plan_quick_operation_rejects_bad_restore PROPERTIES
LABELS "app;ui;paint;integration;desktop-fast;fuzz"
WILL_FAIL TRUE)
add_test(NAME pano_cli_plan_share_file_unsaved_smoke
COMMAND pano_cli plan-share-file)
set_tests_properties(pano_cli_plan_share_file_unsaved_smoke PROPERTIES