Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions flow-tests/test-devloop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ build on bender.vaadin.com, for `main` and each maintenance branch that has the
dev loop. Any Maven command that names one of them, `spotless:apply` included,
needs `-Pdevloop-nightly`; the Formatter workflow passes it.

The Chrome installed on the bender agents is too old for Vaadin, so the nightly
build passes `-Dtest.chrome.version=stable`: Selenium Manager then downloads the
current Chrome for Testing and its driver for the browser ITs.

## Running

From the repository root, after one `mvn install -DskipTests`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public abstract class AbstractBrowserIT extends BrowserTestBase
public static final int SERVER_PORT = Integer
.parseInt(System.getProperty("serverPort", "8888"));

/**
* System property naming the Chrome version to run, such as {@code stable}.
* When it is set, Selenium Manager downloads that Chrome for Testing and
* its driver instead of using the Chrome installed on the machine, for
* build agents whose Chrome is too old for Vaadin.
*/
public static final String CHROME_VERSION_PROPERTY = "test.chrome.version";

/**
* Supplies the local Chrome driver used by TestBench. The same headless
* options as the JUnit 4 {@code ChromeBrowserTest} are applied so the tests
Expand All @@ -53,6 +61,10 @@ public abstract class AbstractBrowserIT extends BrowserTestBase
@Override
public WebDriver createDriver() {
ChromeOptions options = new ChromeOptions();
String chromeVersion = System.getProperty(CHROME_VERSION_PROPERTY);
if (chromeVersion != null && !chromeVersion.isBlank()) {
options.setBrowserVersion(chromeVersion);
}
options.addArguments("--headless=new", "--disable-gpu",
"--disable-backgrounding-occluded-windows");
// Required when running in CI/containers that disable the Chrome
Expand Down