| 282 | // ── Multiple duplicates each add exactly one ── |
| 283 | |
| 284 | void testMultipleDuplicates() { |
| 285 | int before = countNodes(); |
| 286 | int healthIdx = findNode("health"); |
| 287 | QVERIFY(healthIdx >= 0); |
| 288 | |
| 289 | m_ctrl->duplicateNode(healthIdx); |
| 290 | QApplication::processEvents(); |
| 291 | QCOMPARE(countNodes(), before + 1); |
| 292 | |
| 293 | int copyIdx = findNode("health_copy"); |
| 294 | QVERIFY(copyIdx >= 0); |
| 295 | |
| 296 | m_ctrl->duplicateNode(copyIdx); |
| 297 | QApplication::processEvents(); |
| 298 | QCOMPARE(countNodes(), before + 2); |
| 299 | |
| 300 | int copy2Idx = findNode("health_copy_copy"); |
| 301 | QVERIFY(copy2Idx >= 0); |
| 302 | } |
| 303 | |
| 304 | // ── Duplicate copy has correct parent ── |
| 305 |
nothing calls this directly
no test coverage detected