From 60f207b826804559b406ea19ac5b54c25147e624 Mon Sep 17 00:00:00 2001 From: Przemek Bruski Date: Fri, 10 Jan 2020 20:09:01 +0100 Subject: [PATCH] make native JavaScript conditions available, decrease polling frequency for long running actions --- CHANGELOG.md | 5 ++++- build.gradle.kts | 1 + gradle/dependency-locks/compileClasspath.lockfile | 1 + gradle/dependency-locks/testCompileClasspath.lockfile | 1 + .../tools/jirasoftwareactions/api/page/ViewBacklogPage.kt | 3 ++- .../tools/jirasoftwareactions/api/page/ViewBoardPage.kt | 3 ++- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66fb638..c067d7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,10 @@ Dropping a requirement of a major version of a dependency is a new contract. ## [Unreleased] [Unreleased]: https://github.com/atlassian/jira-software-actions/compare/release-1.3.2...master - +### Added +- Native JavaScript Selenium conditions are now available +### Changed +- decreased polling frequency ### Fixed - Reduce the overhead of handling large boards and backlogs - Upgrade Selenium to 3.141.59 diff --git a/build.gradle.kts b/build.gradle.kts index 1dec31f..eda1cf9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,6 +30,7 @@ dependencies { api("com.github.stephenc.jcip:jcip-annotations:1.0-1") api(webdriver("selenium-api")) + implementation("com.atlassian.performance:selenium-js:[1.0.0,2.0.0)") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") implementation("org.glassfish:javax.json:1.1") implementation(webdriver("selenium-support")) diff --git a/gradle/dependency-locks/compileClasspath.lockfile b/gradle/dependency-locks/compileClasspath.lockfile index c509e90..e8789da 100644 --- a/gradle/dependency-locks/compileClasspath.lockfile +++ b/gradle/dependency-locks/compileClasspath.lockfile @@ -2,6 +2,7 @@ # Manual edits can break the build and are not advised. # This file is expected to be part of source control. com.atlassian.performance.tools:jira-actions:3.10.2 +com.atlassian.performance:selenium-js:1.0.1 com.github.stephenc.jcip:jcip-annotations:1.0-1 com.google.code.findbugs:jsr305:1.3.9 com.google.errorprone:error_prone_annotations:2.1.3 diff --git a/gradle/dependency-locks/testCompileClasspath.lockfile b/gradle/dependency-locks/testCompileClasspath.lockfile index 03843d0..6205265 100644 --- a/gradle/dependency-locks/testCompileClasspath.lockfile +++ b/gradle/dependency-locks/testCompileClasspath.lockfile @@ -3,6 +3,7 @@ # This file is expected to be part of source control. com.atlassian.performance.tools:docker-infrastructure:0.3.2 com.atlassian.performance.tools:jira-actions:3.10.2 +com.atlassian.performance:selenium-js:1.0.1 com.github.stephenc.jcip:jcip-annotations:1.0-1 com.google.code.findbugs:jsr305:1.3.9 com.google.errorprone:error_prone_annotations:2.1.3 diff --git a/src/main/kotlin/com/atlassian/performance/tools/jirasoftwareactions/api/page/ViewBacklogPage.kt b/src/main/kotlin/com/atlassian/performance/tools/jirasoftwareactions/api/page/ViewBacklogPage.kt index a16e27d..2b0821e 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/jirasoftwareactions/api/page/ViewBacklogPage.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/jirasoftwareactions/api/page/ViewBacklogPage.kt @@ -12,7 +12,8 @@ class ViewBacklogPage( ) { fun waitForBacklog() = driver.wait( Duration.ofSeconds(30), - presenceOfElementLocated(By.cssSelector("#ghx-backlog[data-rendered]:not(.browser-metrics-stale)")) + presenceOfElementLocated(By.cssSelector("#ghx-backlog[data-rendered]:not(.browser-metrics-stale)")), + Duration.ofMillis(100) ) fun getIssueKeys(): List { diff --git a/src/main/kotlin/com/atlassian/performance/tools/jirasoftwareactions/api/page/ViewBoardPage.kt b/src/main/kotlin/com/atlassian/performance/tools/jirasoftwareactions/api/page/ViewBoardPage.kt index ca63028..35601d5 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/jirasoftwareactions/api/page/ViewBoardPage.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/jirasoftwareactions/api/page/ViewBoardPage.kt @@ -12,7 +12,8 @@ class ViewBoardPage( ) { fun waitForBoard() = driver.wait( Duration.ofSeconds(30), - presenceOfElementLocated(cssSelector(".ghx-column")) + presenceOfElementLocated(cssSelector(".ghx-column")), + Duration.ofMillis(100) ) fun getIssueKeys(): List {