From 6e2a8ee604a0e5f8775256e43d982ffcc7a903a9 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 5 Feb 2024 00:10:11 +0000
Subject: [PATCH 1/6] Update dependency gradle to v8.6
---
.../gradle/wrapper/gradle-wrapper.properties | 2 +-
.../artifactory_plugin/quickstart/gradlew.bat | 20 +++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/test/resources/artifactory_plugin/quickstart/gradle/wrapper/gradle-wrapper.properties b/src/test/resources/artifactory_plugin/quickstart/gradle/wrapper/gradle-wrapper.properties
index 1af9e0930b..a80b22ce5c 100644
--- a/src/test/resources/artifactory_plugin/quickstart/gradle/wrapper/gradle-wrapper.properties
+++ b/src/test/resources/artifactory_plugin/quickstart/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/src/test/resources/artifactory_plugin/quickstart/gradlew.bat b/src/test/resources/artifactory_plugin/quickstart/gradlew.bat
index 6689b85bee..7101f8e467 100644
--- a/src/test/resources/artifactory_plugin/quickstart/gradlew.bat
+++ b/src/test/resources/artifactory_plugin/quickstart/gradlew.bat
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
From 84d5c500ca2a8a8864968e52b58fb1dc789baa28 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 13 Feb 2024 11:08:41 +0000
Subject: [PATCH 2/6] Update dependency io.netty:netty-bom to v4.1.107.Final
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 71ed741672..7f451b7f36 100644
--- a/pom.xml
+++ b/pom.xml
@@ -355,7 +355,7 @@
io.netty
netty-bom
- 4.1.104.Final
+ 4.1.107.Final
pom
import
From 3c14fa2a0ea12dd8c285113bbddc2e137f7359f7 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Sat, 17 Feb 2024 15:51:02 +0000
Subject: [PATCH 3/6] Update dependency org.gitlab4j:gitlab4j-api to v5.5.0
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 71ed741672..0262c8d910 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
org.gitlab4j
gitlab4j-api
- 5.2.0
+ 5.5.0
args4j
From 86eb55eac45d10938e2cef9e6a95bd869d96e5a2 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 20 Feb 2024 03:50:38 +0000
Subject: [PATCH 4/6] Update Selenium to v4.18.1
---
pom.xml | 2 +-
.../java/org/jenkinsci/test/acceptance/FallbackConfig.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 71ed741672..ffa641a42a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
999999-SNAPSHOT
true
2.443
- 4.14.0
+ 4.18.1
33.0.0-jre
3.8.1
1.6.2
diff --git a/src/main/java/org/jenkinsci/test/acceptance/FallbackConfig.java b/src/main/java/org/jenkinsci/test/acceptance/FallbackConfig.java
index 408688023c..cab49fd17e 100644
--- a/src/main/java/org/jenkinsci/test/acceptance/FallbackConfig.java
+++ b/src/main/java/org/jenkinsci/test/acceptance/FallbackConfig.java
@@ -112,9 +112,9 @@ private WebDriver createWebDriver(TestCleaner cleaner, TestName testName) throws
GeckoDriverService service = builder.build();
return new FirefoxDriver(service, buildFirefoxOptions(testName));
case "firefox-container":
- return createContainerWebDriver(cleaner, "selenium/standalone-firefox:4.14.1", buildFirefoxOptions(testName));
+ return createContainerWebDriver(cleaner, "selenium/standalone-firefox:4.18.1", buildFirefoxOptions(testName));
case "chrome-container":
- return createContainerWebDriver(cleaner, "selenium/standalone-chrome:4.14.1", new ChromeOptions());
+ return createContainerWebDriver(cleaner, "selenium/standalone-chrome:4.18.1", new ChromeOptions());
case "chrome":
Map prefs = new HashMap();
prefs.put(LANGUAGE_SELECTOR, "en");
From d3ac873b91a91f49e139e1702c15e8039967b22c Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 26 Feb 2024 20:11:51 +0000
Subject: [PATCH 5/6] Update dependency org.jenkins-ci:jenkins to v1.111
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 71ed741672..ef239afd1f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci
jenkins
- 1.108
+ 1.111
acceptance-test-harness
From 7b18e52fe5b024bcf681c9c6345e4002f6269a16 Mon Sep 17 00:00:00 2001
From: Zbynek Konecny
Date: Sat, 9 Mar 2024 14:03:05 +0100
Subject: [PATCH 6/6] Update Java dependencies
---
pom.xml | 8 ++++-
.../test/acceptance/FallbackConfig.java | 8 ++---
.../ConfigFileProvider.java | 2 +-
.../ssh_credentials/SshCredentialDialog.java | 2 +-
.../acceptance/po/ConfigurablePageObject.java | 2 +-
.../test/acceptance/po/JobsMixIn.java | 2 +-
.../test/acceptance/po/SlavesMixIn.java | 2 +-
.../test/acceptance/selenium/Scroller.java | 30 +++++++++++--------
8 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/pom.xml b/pom.xml
index d446a60e3c..d586a1632e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -363,7 +363,13 @@
net.bytebuddy
byte-buddy
- 1.14.11
+ 1.14.12
+
+
+
+ org.javassist
+ javassist
+ 3.29.0-GA
org.apache.commons
diff --git a/src/main/java/org/jenkinsci/test/acceptance/FallbackConfig.java b/src/main/java/org/jenkinsci/test/acceptance/FallbackConfig.java
index cab49fd17e..cf9c050386 100644
--- a/src/main/java/org/jenkinsci/test/acceptance/FallbackConfig.java
+++ b/src/main/java/org/jenkinsci/test/acceptance/FallbackConfig.java
@@ -69,7 +69,7 @@
import org.openqa.selenium.remote.LocalFileDetector;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.safari.SafariDriver;
-import org.openqa.selenium.support.events.EventFiringWebDriver;
+import org.openqa.selenium.support.events.EventFiringDecorator;
import org.openqa.selenium.support.ui.ExpectedConditions;
/**
@@ -320,9 +320,9 @@ public WebDriver createWebDriver(TestCleaner cleaner, TestName testName, Elastic
if (oldSize.height < 1050 || oldSize.width < 1680) {
base.manage().window().setSize(new Dimension(1680, 1050));
}
-
- final EventFiringWebDriver d = new EventFiringWebDriver(base);
- d.register(new Scroller());
+ Scroller scroller = new Scroller(base);
+ final EventFiringDecorator decorator = new EventFiringDecorator<>(scroller);
+ WebDriver d = decorator.decorate(base);
try {
d.manage().timeouts().pageLoadTimeout(Duration.ofMillis(time.seconds(PAGE_LOAD_TIMEOUT)));
diff --git a/src/main/java/org/jenkinsci/test/acceptance/plugins/config_file_provider/ConfigFileProvider.java b/src/main/java/org/jenkinsci/test/acceptance/plugins/config_file_provider/ConfigFileProvider.java
index c2ee0d04d6..8e178a719d 100644
--- a/src/main/java/org/jenkinsci/test/acceptance/plugins/config_file_provider/ConfigFileProvider.java
+++ b/src/main/java/org/jenkinsci/test/acceptance/plugins/config_file_provider/ConfigFileProvider.java
@@ -58,7 +58,7 @@ protected WebElement find(String caption) {
String id = getElement(by.name("config.id")).getAttribute("value");
// clicking the button leads to the load of a new page but it is not a navigation event from the listeners PoV
// so we need to disable the sticky elmements again
- new Scroller().disableStickyElements(driver);
+ new Scroller(driver).disableStickyElements();
return newInstance(type, this, id);
}
}
diff --git a/src/main/java/org/jenkinsci/test/acceptance/plugins/ssh_credentials/SshCredentialDialog.java b/src/main/java/org/jenkinsci/test/acceptance/plugins/ssh_credentials/SshCredentialDialog.java
index 92bf9fcb19..63208fa1f9 100644
--- a/src/main/java/org/jenkinsci/test/acceptance/plugins/ssh_credentials/SshCredentialDialog.java
+++ b/src/main/java/org/jenkinsci/test/acceptance/plugins/ssh_credentials/SshCredentialDialog.java
@@ -59,7 +59,7 @@ private void findAndPerformClick(final By addSubmitButtonLocator) {
final Actions builder = new Actions(driver);
- new Scroller().scrollIntoView(addSubmitButton, driver);
+ new Scroller(driver).scrollIntoView(addSubmitButton);
addSubmitButton.click();
builder.perform();
}
diff --git a/src/main/java/org/jenkinsci/test/acceptance/po/ConfigurablePageObject.java b/src/main/java/org/jenkinsci/test/acceptance/po/ConfigurablePageObject.java
index 96d5d3fe8f..c2356f2f1b 100644
--- a/src/main/java/org/jenkinsci/test/acceptance/po/ConfigurablePageObject.java
+++ b/src/main/java/org/jenkinsci/test/acceptance/po/ConfigurablePageObject.java
@@ -105,7 +105,7 @@ public T configure(final Callable body) {
public void configure() {
// Automatic disabling of sticky elements doesn't seem to occur after a redirect,
// so force it after the configuration page has loaded
- new Scroller().disableStickyElements(driver);
+ new Scroller(driver).disableStickyElements();
if (!driver.getCurrentUrl().equals(getConfigUrl().toExternalForm())) {
visit(getConfigUrl());
diff --git a/src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java b/src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java
index 8761ec953f..f60f166dc5 100644
--- a/src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java
+++ b/src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java
@@ -45,7 +45,7 @@ public T create(Class type, String name) {
// Automatic disabling of sticky elements doesn't seem to occur after a redirect,
// so force it after the configuration page has loaded
- new Scroller().disableStickyElements(driver);
+ new Scroller(driver).disableStickyElements();
final T j = get(type, name);
diff --git a/src/main/java/org/jenkinsci/test/acceptance/po/SlavesMixIn.java b/src/main/java/org/jenkinsci/test/acceptance/po/SlavesMixIn.java
index b616222d35..25b02876da 100644
--- a/src/main/java/org/jenkinsci/test/acceptance/po/SlavesMixIn.java
+++ b/src/main/java/org/jenkinsci/test/acceptance/po/SlavesMixIn.java
@@ -43,7 +43,7 @@ public S create(Class type, String name) {
S s = newInstance(type, jenkins, name);
// Automatic disabling of sticky elements doesn't occur after a redirect
// so force it after the configuration page has loaded
- new Scroller().disableStickyElements(driver);
+ new Scroller(driver).disableStickyElements();
// reasonable starting point values
diff --git a/src/main/java/org/jenkinsci/test/acceptance/selenium/Scroller.java b/src/main/java/org/jenkinsci/test/acceptance/selenium/Scroller.java
index 8fb1b1131e..3bfc981029 100644
--- a/src/main/java/org/jenkinsci/test/acceptance/selenium/Scroller.java
+++ b/src/main/java/org/jenkinsci/test/acceptance/selenium/Scroller.java
@@ -15,7 +15,7 @@
import org.openqa.selenium.UnhandledAlertException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.events.AbstractWebDriverEventListener;
+import org.openqa.selenium.support.events.WebDriverListener;
/**
* Automatically scrolls the element into view.
@@ -71,14 +71,16 @@
* @author ogondza
* @author Kohsuke Kawaguchi
*/
-public class Scroller extends AbstractWebDriverEventListener {
+public class Scroller implements WebDriverListener {
private final Logger LOGGER = Logger.getLogger(Scroller.class.getName());
private final String scrollJs;
private final String disableStickyElementsJs;
+ private final WebDriver driver;
- public Scroller() {
+ public Scroller(WebDriver driver) {
+ this.driver = driver;
try {
scrollJs = IOUtils.toString(getClass()
.getResourceAsStream("scroller.js"), StandardCharsets.UTF_8);
@@ -90,25 +92,29 @@ public Scroller() {
}
@Override
- public void beforeClickOn(WebElement element, WebDriver driver) {
- scrollIntoView(element, driver);
+ public void beforeClick(WebElement element) {
+ scrollIntoView(element);
}
@Override
- public void beforeChangeValueOf(WebElement element, WebDriver driver, CharSequence[] keysToSend) {
- scrollIntoView(element, driver);
+ public void beforeSendKeys(WebElement element, CharSequence[] keysToSend) {
+ scrollIntoView(element);
}
@Override
- public void afterNavigateTo(String url, WebDriver driver) {
- super.afterNavigateTo(url, driver);
+ public void beforeClear(WebElement element) {
+ scrollIntoView(element);
+ }
+
+ @Override
+ public void afterGet(WebDriver driver, String url) {
try {
// if there's an alert we can't run JavaScript
// if we catch the exception from running JavaScript then FormValidationTest hangs
// not the nicest hack, but it works
driver.switchTo().alert();
} catch (NoAlertPresentException e) {
- disableStickyElements(driver);
+ disableStickyElements();
}
}
@@ -117,7 +123,7 @@ public void afterNavigateTo(String url, WebDriver driver) {
* appear on top of other elements, making those elements inaccessible. This method removes the sticky
* nature of these elements meaning that they'll no longer appear on top of other elements.
*/
- public void disableStickyElements(WebDriver driver) {
+ public void disableStickyElements() {
final JavascriptExecutor executor = (JavascriptExecutor) driver;
try {
executor.executeScript(disableStickyElementsJs);
@@ -130,7 +136,7 @@ public void disableStickyElements(WebDriver driver) {
* The framework is expected to take care of the correct scrolling. When you are tempted to scroll from PageObjects
* or tests, there is likely a framework problem to be fixed.
*/
- public void scrollIntoView(WebElement e, WebDriver driver) {
+ public void scrollIntoView(WebElement e) {
WebElement element = e;
if (Objects.equals(element.getTagName(), "option")) {
element = e.findElement(By.xpath("..")); // scroll select into view not option