Skip to content

Commit

Permalink
Stabilize ColorPicker-IT´s (primefaces#10028)
Browse files Browse the repository at this point in the history
  • Loading branch information
christophs78 authored Apr 16, 2023
1 parent c967a5f commit 5b9ad5e
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
*/
package org.primefaces.integrationtests.colorpicker;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.primefaces.selenium.AbstractPrimePageTest;
Expand All @@ -33,8 +35,25 @@
import org.primefaces.selenium.component.model.Msg;
import org.primefaces.util.LangUtils;

import java.time.Duration;

public abstract class AbstractColorPickerTest extends AbstractPrimePageTest {

private Duration defaultImplicitWaitTimeout;

@BeforeEach
public void beforeEach() {
super.beforeEach();

defaultImplicitWaitTimeout = getWebDriver().manage().timeouts().getImplicitWaitTimeout();
getWebDriver().manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
}

@AfterEach
public void afterEach() {
getWebDriver().manage().timeouts().implicitlyWait(defaultImplicitWaitTimeout);
}

protected void assertAriaLabel(WebElement panel, String id, String value) {
WebElement ariaElement = panel.findElement(By.id(id));
assertPresent(ariaElement);
Expand Down

0 comments on commit 5b9ad5e

Please # to comment.