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

Method testTypeAutocompleteTypingAndCommit

tests/test_editor.cpp:595–613  ·  view source on GitHub ↗

── Test: type autocomplete accepts typed input and commits ──

Source from the content-addressed store, hash-verified

593
594 // ── Test: type autocomplete accepts typed input and commits ──
595 void testTypeAutocompleteTypingAndCommit() {
596 m_editor->applyDocument(m_result);
597
598 QSignalSpy spy(m_editor, &RcxEditor::typePickerRequested);
599
600 // Type edit now emits typePickerRequested for TypeSelectorPopup
601 bool ok = m_editor->beginInlineEdit(EditTarget::Type, kFirstDataLine);
602 QVERIFY(ok);
603 QCOMPARE(spy.count(), 1);
604
605 // Verify signal carries valid nodeIdx (second arg)
606 QList<QVariant> args = spy.first();
607 QVERIFY(args.at(1).toInt() >= 0);
608
609 // No inline edit state — popup handles everything
610 QVERIFY(!m_editor->isEditing());
611
612 m_editor->applyDocument(m_result);
613 }
614
615 // ── Test: type edit click-away commits original (no change) ──
616 void testTypeEditClickAwayNoChange() {

Callers

nothing calls this directly

Calls 3

applyDocumentMethod · 0.80
beginInlineEditMethod · 0.80
isEditingMethod · 0.80

Tested by

no test coverage detected