@@ -128,3 +128,42 @@ add_custom_command(TARGET test_reorder_edge_cases POST_BUILD
128128 $<TARGET_FILE_DIR :test_reorder_edge_cases >
129129)
130130
131+ # T7 (missing-files-on-disk): SHARED Qt integration test for the missing-nodes
132+ # feature. Extended by T8/T9/T11. Surfaces VXCORE_ERR_NODE_NOT_EXISTS through
133+ # the BufferCoreService / BufferService open-buffer out-param. Uses the real
134+ # NotebookCoreService + BufferService against real vxcore + on-disk notebooks
135+ # (no mocks). GUILESS — no widgets, just QCoreApplication for the services.
136+ add_qt_test (test_missing_nodes_qt
137+ SOURCES
138+ test_missing_nodes_qt.cpp
139+ test_missing_nodes_qt_controller_stubs.cpp
140+ ${CMAKE_SOURCE_DIR } /src/models/notebooknodemodel.cpp
141+ ${CMAKE_SOURCE_DIR } /src/controllers/notebooknodecontroller.cpp
142+ ${CMAKE_SOURCE_DIR } /src/controllers/notebooknodecontroller_reorder.cpp
143+ ${CMAKE_SOURCE_DIR } /src/controllers/notebooknodecontroller.h
144+ LINKS
145+ Qt6::Core
146+ Qt6::Widgets
147+ core_configs
148+ core_services
149+ vxcore
150+ VTextEdit
151+ GUILESS
152+ )
153+ target_include_directories (test_missing_nodes_qt PRIVATE
154+ ${CMAKE_SOURCE_DIR } /src
155+ ${CMAKE_SOURCE_DIR } /src/controllers
156+ )
157+ # Same QTEST_MAIN crash-handler caveat as test_sync_e2e — ctest's pipe driver
158+ # deadlocks the default handler on Windows; -nocrashhandler bypasses it.
159+ set_property (TEST test_missing_nodes_qt PROPERTY
160+ COMMAND $<TARGET_FILE :test_missing_nodes_qt > -nocrashhandler)
161+ set_tests_properties (test_missing_nodes_qt PROPERTIES
162+ TIMEOUT 120
163+ )
164+ # Copy VTextEdit DLL next to the test executable so CTest resolves it at runtime.
165+ add_custom_command (TARGET test_missing_nodes_qt POST_BUILD
166+ COMMAND ${CMAKE_COMMAND } -E copy_if_different
167+ $<TARGET_FILE :VTextEdit >
168+ $<TARGET_FILE_DIR :test_missing_nodes_qt >
169+ )
0 commit comments