Skip to content
Snippets Groups Projects
Commit a70d5fb4 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

fix selenium tests

parent e3ab5d1f
No related branches found
No related tags found
No related merge requests found
Pipeline #9801 failed
......@@ -236,11 +236,15 @@ class ChartTest extends SeleniumTestBase
driver.findElement(By.id("chart-filter-container")).click();
driver.findElement(By.id("section-type")).click();
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#section-type .text-default")));
final WebElement checkBox = driver.findElement(By.cssSelector("#section-type .text-default"));
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", checkBox);
checkBox.click();
final WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
wait = new WebDriverWait(driver, Duration.ofSeconds(5));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("filter-button-reset")));
assertThat(driver.findElement(By.id("filterActiveBadge")).isDisplayed()).isTrue();
......@@ -253,10 +257,12 @@ class ChartTest extends SeleniumTestBase
driver.findElement(By.id("chart-filter-container")).click();
driver.findElement(By.id("section-type")).click();
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#section-type .text-default")));
final WebElement checkBox = driver.findElement(By.cssSelector("#section-type .text-default"));
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", checkBox);
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
wait = new WebDriverWait(driver, Duration.ofSeconds(5));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#section-type .text-default")));
checkBox.click();
......@@ -280,6 +286,9 @@ class ChartTest extends SeleniumTestBase
driver.findElement(By.id("chart-filter-container")).click();
driver.findElement(By.id("section-type")).click();
wait = new WebDriverWait(driver, Duration.ofSeconds(5));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#section-type .text-default")));
final WebElement checkBox = driver.findElement(By.cssSelector("#section-type .text-default"));
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", checkBox);
checkBox.click();
......
......@@ -37,6 +37,7 @@ class MiscSettingsTest extends SeleniumTestBase
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("miscSettingsContainer")));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#miscSettingsContainer button")));
driver.findElement(By.cssSelector("#miscSettingsContainer button")).click();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment