MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / testInlineEditReEntry

Method testInlineEditReEntry

tests/test_editor.cpp:403–430  ·  view source on GitHub ↗

── Test: inline edit lifecycle (begin → commit → re-edit) ──

Source from the content-addressed store, hash-verified

401
402 // ── Test: inline edit lifecycle (begin → commit → re-edit) ──
403 void testInlineEditReEntry() {
404 // Move cursor to first data line (0=CommandRow, root header suppressed)
405 m_editor->scintilla()->setCursorPosition(kFirstDataLine, 0);
406
407 // Should not be editing
408 QVERIFY(!m_editor->isEditing());
409
410 // Begin edit on Name column
411 bool ok = m_editor->beginInlineEdit(EditTarget::Name, kFirstDataLine);
412 QVERIFY(ok);
413 QVERIFY(m_editor->isEditing());
414
415 // Cancel the edit
416 m_editor->cancelInlineEdit();
417 QVERIFY(!m_editor->isEditing());
418
419 // Re-apply document (simulates controller refresh)
420 m_editor->applyDocument(m_result);
421
422 // Should be able to edit again
423 ok = m_editor->beginInlineEdit(EditTarget::Name, kFirstDataLine);
424 QVERIFY(ok);
425 QVERIFY(m_editor->isEditing());
426
427 // Cancel again
428 m_editor->cancelInlineEdit();
429 QVERIFY(!m_editor->isEditing());
430 }
431
432 // ── Test: commit inline edit then re-edit same line ──
433 void testCommitThenReEdit() {

Callers

nothing calls this directly

Calls 5

scintillaMethod · 0.80
isEditingMethod · 0.80
beginInlineEditMethod · 0.80
cancelInlineEditMethod · 0.80
applyDocumentMethod · 0.80

Tested by

no test coverage detected