Lets get rid of the favs test with mulit branch. Its essentially the pipeline test, but more confusing and less stable
@@ -138,88 +138,4 @@ public class FavoritesCardsTest extends AbstractFavoritesTest {
}
};
}
-
- @Test
- public void testMultibranch() throws IOException, GitAPIException, InterruptedException {
- File tmpFile = File.createTempFile(UUID.randomUUID().toString(), "");
- String tmpFileName = tmpFile.getAbsolutePath();
-
- String branchOther = "feature/1";
-
- git.writeJenkinsFile(resources.loadJenkinsFile().replaceAll("%TMPFILENAME%", tmpFileName));
- git.addAll();
- git.commit("First");
- git.createBranch(branchOther);
-
- String jobName = "navigation-multibranch";
- MultiBranchPipeline pipeline = multibranchFactory.pipeline(FOLDER, jobName).createPipeline(git);
- String fullNameMaster = pipeline.getFullName();
- String fullNameOther = pipeline.getFullName(branchOther);
-
- dashboardPage.open();
- dashboardPage.togglePipelineListFavorite(jobName);
- dashboardPage.getFavoriteCard(fullNameMaster);
- dashboardPage.clickFavoriteCardActivityLink(fullNameMaster);
-
- activityPageFactory
- .withPipeline(pipeline)
- .clickBranchTab()
- .toggleFavoriteStatus(branchOther);
- dashboardPage.open();
-
- List<String> cardFullnames = ImmutableList.of(fullNameMaster, fullNameOther);
- int count = 2;
-
- tmpFile.createNewFile();
- sseClientRule.untilEvents(pipeline.buildsFinished);
- sseClientRule.clear();
-
- dashboardPage.open(); // FIXME - because sse is not yet registered (started before the page was loaded)
-
- dashboardPage.checkFavoriteCardStatus(fullNameMaster, SUCCESS);
- dashboardPage.checkFavoriteCardStatus(fullNameOther, SUCCESS);
-
- //Check that favorite actions are hidden until pointer is hovering the row
- JavascriptExecutor js = (JavascriptExecutor) driver;
- Object backgroundColor = js.executeScript(
- "return getComputedStyle(document.querySelectorAll('.actions-container')[0], ':after').getPropertyValue('background-color')"
- );
-
- //check that background color of overlay is NOT transparent when pointer is NOT hovering the favorite row
- Assert.assertNotEquals(backgroundColor, "rgba(0, 0, 0, 0)");
-
- logger.info("move pointer over favorite card actions");
-
- Actions action = new Actions(driver);
- WebElement we = wait.until(By.xpath("//*[@class=\"pipeline-card success-bg-lite\"]"));
- action.moveToElement(we).perform();
-
- //check that background color of overlay is transparent when pointer is hovering the favorite row
- wait.until(hoverBackgroundColor());
-
- tmpFile.delete();
- for (String fullName : cardFullnames) {
- logger.info(String.format("running tests against favorited branch: %s", fullName));
- count--;
- dashboardPage.clickFavoriteCardRunButton(fullName);
- dashboardPage.checkFavoriteCardStatus(fullName, RUNNING);
- tmpFile.createNewFile();
- sseClientRule.untilEvents(pipeline.buildsFinished);
- sseClientRule.clear();
- dashboardPage.checkFavoriteCardStatus(fullName, SUCCESS);
- tmpFile.delete();
-
- dashboardPage.clickFavoriteCardReplayButton(fullName);
- dashboardPage.checkFavoriteCardStatus(fullName, RUNNING);
- tmpFile.createNewFile();
- sseClientRule.untilEvents(pipeline.buildsFinished);
- sseClientRule.clear();
- dashboardPage.checkFavoriteCardStatus(fullName, SUCCESS);
- tmpFile.delete();
- dashboardPage.removeFavoriteCard(fullName);
- dashboardPage.checkFavoriteCardCount(count);
- dashboardPage.checkIsPipelineListItemFavorited(jobName, false);
- }
- }
-
}
