| 262 | } |
| 263 | |
| 264 | void EditorTest::renameTabs() |
| 265 | { |
| 266 | QString file_xml = readFile(":/crossdoor_with_subtree.xml"); |
| 267 | main_win->on_actionClear_triggered(); |
| 268 | main_win->loadFromXML( file_xml ); |
| 269 | |
| 270 | testMessageBox(500, TEST_LOCATION(), [&]() |
| 271 | { |
| 272 | // Two tabs with same name would exist |
| 273 | main_win->onTabRenameRequested( 0 , "DoorClosed" ); |
| 274 | }); |
| 275 | testMessageBox(500, TEST_LOCATION(), [&]() |
| 276 | { |
| 277 | // Two tabs with same name would exist |
| 278 | main_win->onTabRenameRequested( 1 , "MainTree" ); |
| 279 | }); |
| 280 | |
| 281 | main_win->onTabRenameRequested( 0 , "MainTree2" ); |
| 282 | main_win->onTabRenameRequested( 1 , "DoorClosed2" ); |
| 283 | |
| 284 | QVERIFY( main_win->getTabByName("MainTree") == nullptr); |
| 285 | QVERIFY( main_win->getTabByName("DoorClosed") == nullptr); |
| 286 | |
| 287 | QVERIFY( main_win->getTabByName("MainTree2") != nullptr); |
| 288 | QVERIFY( main_win->getTabByName("DoorClosed2") != nullptr); |
| 289 | |
| 290 | sleepAndRefresh( 500 ); |
| 291 | } |
| 292 | |
| 293 | void EditorTest::testSubtree() |
| 294 | { |
nothing calls this directly
no test coverage detected