src/integrationTests/kotlin/UseCase4Test.kt [136:161]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - assertThat(mainBranchPanel.branchName).isEqualTo("main") // to select a branch to add to the view val mainBranchPanelListener = mainBranchPanel.mouseListeners[0] val mouseEvent = MouseEvent(mainBranchPanel, 444, 0L, 0, 2, 2, 1, false) mainBranchPanelListener.mouseClicked(mouseEvent) Awaitility.await() .atMost(15000, TimeUnit.MILLISECONDS) .pollDelay(50, TimeUnit.MILLISECONDS) .alias("adding a second branch to the view and refreshing") .pollInSameThread() .until { modelService.graphInfo.addedBranch != null } // check if the correct information about the 2 branches is added to the model val addedBranch = modelService.graphInfo.addedBranch Awaitility.await() .pollInSameThread() .alias("add main to view") .atMost(15000, TimeUnit.MILLISECONDS) .pollDelay(50, TimeUnit.MILLISECONDS) .until { addedBranch?.name == "main" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - src/integrationTests/kotlin/UseCase5Test.kt [157:179]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - assertThat(mainBranchPanel.branchName).isEqualTo("main") val mainBranchPanelListener = mainBranchPanel.mouseListeners[0] val mouseEvent = MouseEvent(mainBranchPanel, 444, 0L, 0, 2, 2, 1, false) mainBranchPanelListener.mouseClicked(mouseEvent) Awaitility.await() .atMost(15000, TimeUnit.MILLISECONDS) .pollDelay(50, TimeUnit.MILLISECONDS) .alias("adding a second branch to the view and refreshing") .pollInSameThread() .until { modelService.graphInfo.addedBranch != null } val addedBranch = modelService.graphInfo.addedBranch Awaitility.await() .pollInSameThread() .alias("add main to view") .atMost(15000, TimeUnit.MILLISECONDS) .pollDelay(50, TimeUnit.MILLISECONDS) .until { addedBranch?.name == "main" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -