── Test: type autocomplete accepts typed input and commits ──
| 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() { |
nothing calls this directly
no test coverage detected