Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(java): ⚡ upgrade jdk from v11 to v17 #606

Merged
merged 26 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1727098
chore(Internal): :bookmark: new release (#551)
WasiqB Jul 20, 2023
bb22f2a
chore(Internal): :bookmark: released v0.16.0 to maven central
WasiqB Jul 20, 2023
ddaa7b1
chore(Internal): :bookmark: new release candidate (#574)
WasiqB Sep 10, 2023
0575140
chore(Internal): fixed merge conflicts
WasiqB Sep 10, 2023
dad6434
chore(Internal): :bookmark: new release (#600)
WasiqB Sep 10, 2023
9bab8e4
chore(Internal): :bookmark: release new version
WasiqB Sep 11, 2023
6f7b1e0
feat(workflow): :zap: optimizing action workflows
WasiqB Sep 13, 2023
52ca334
fix(workflow): :bug: fixed failing build job for jdk11
WasiqB Sep 13, 2023
6b13b84
fix(Internal): :bug: fixed failing mobile workflow
WasiqB Sep 13, 2023
0c3c9dd
fix(workflow): :bug: fixed failing mobile workflow
WasiqB Sep 13, 2023
bf848d2
fix(workflow): :bug: fixed failing mobile workflow
WasiqB Sep 13, 2023
a26fbe8
fix(workflow): :bug: fixed failing mobile workflow
WasiqB Sep 13, 2023
9799dff
fix(workflow): :bug: fixed failing mobile workflow
WasiqB Sep 13, 2023
72283dd
fix(workflow): :bug: fixed failing mobile workflow
WasiqB Sep 14, 2023
1e25e96
feat(java): :sparkles: optimized for jdk 17
WasiqB Sep 15, 2023
7b2963e
fix(java): :bug: fixed failing web tests
WasiqB Sep 15, 2023
7d5baf2
fix(java): :bug: fixed failing mobile cloud tests
WasiqB Sep 15, 2023
32cf287
fix(java): :bug: fixed failing mobile cloud tests
WasiqB Sep 16, 2023
d172191
test(java): :test_tube: added new test for mobile web
WasiqB Sep 17, 2023
80a6bab
test(java): :test_tube: added more coverage to tests
WasiqB Sep 17, 2023
f249bbd
fix(java): :bug: fixed failing tests
WasiqB Sep 17, 2023
af16767
fix(java): :bug: fixed failing web grid tests
WasiqB Sep 17, 2023
ce2d377
refactor(java): :fire: removed unused code
WasiqB Sep 17, 2023
3161b7c
refactor(java): :fire: removed unused command from service manager
WasiqB Sep 18, 2023
6b41765
chore(Internal): :memo: updated jdk 11 to 17 in enforcer and docs
WasiqB Sep 18, 2023
a6bed2d
docs(website): :memo: updated docs for config changes
WasiqB Sep 18, 2023
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body:
attributes:
label: Issue Version
description: 🔢 What version of the framework is this bug related to?
placeholder: v0.16.0
placeholder: v0.17.0
validations:
required: true

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
java-version:
type: string
description: Java version
default: 11
default: 17
pre-release:
type: boolean
description: Whether the release is pre-release?
Expand Down Expand Up @@ -115,7 +115,8 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: ${{ inputs.java-version }}
distribution: 'adopt'
distribution: 'temurin'
cache: 'maven'

- name: Restore local Maven repository
uses: actions/cache@v3
Expand Down Expand Up @@ -151,7 +152,8 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: ${{ inputs.java-version }}
distribution: 'adopt'
distribution: 'temurin'
cache: 'maven'

- name: Restore local Maven repository
uses: actions/cache@v3
Expand Down
32 changes: 29 additions & 3 deletions .github/workflows/_test-core-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
java-version:
type: string
description: Version of Java to run on
default: 11
default: 17
suite-name:
type: string
description: Test Suite name to run
Expand All @@ -27,6 +27,14 @@ on:
type: string
description: Emulator target image
default: google_apis
emulator-arch:
type: string
description: Emulator target architecture
default: x86_64
emulator-channel:
type: string
description: Emulator SDK channel
default: stable
run-grid:
type: boolean
description: Start Selenium Grid
Expand Down Expand Up @@ -70,6 +78,8 @@ jobs:
npm install -g appium
appium driver install uiautomator2
appium driver install xcuitest
mkdir core-java/logs
appium server --address 127.0.0.1 --port 4724 --use-drivers uiautomator2 --allow-insecure get_server_logs,chromedriver_autodownload > core-java/logs/appium-server.logs 2>&1 &

- name: Start Selenium Grid for Web
if: ${{ inputs.run-grid && ! inputs.run-appium }}
Expand All @@ -85,19 +95,31 @@ jobs:
os_version: 16.2
shutdown_after_job: true

- name: Cache AVD snapshot
uses: actions/cache@v3
if: ${{ inputs.run-android }}
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-30-${{ inputs.emulator-target }}

- name: All Test execution
if: ${{ inputs.run-android }}
uses: reactivecircus/android-emulator-runner@v2
with:
avd-name: Pixel_7_Pro
api-level: 30
target: ${{ inputs.emulator-target }}
arch: x86_64
profile: Nexus 6
arch: ${{ inputs.emulator-arch }}
profile: pixel_6_pro
channel: ${{ inputs.emulator-channel }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: mvn verify org.jacoco:jacoco-maven-plugin:prepare-agent -f core-java/pom.xml -Dsuite-name=${{ inputs.suite-name }} -Pcoverage-test
pre-emulator-launch-script: avdmanager list device

- name: All ${{ inputs.suite-name }} Test execution
if: ${{ ! inputs.run-android }}
Expand All @@ -113,6 +135,10 @@ jobs:
run: |
docker-compose -f core-java/compose/docker-compose.yml down --remove-orphans

- name: Stop Appium Server
if: ${{ inputs.run-appium && always() }}
run: npx kill-port --port 4724

- name: Upload target folder
uses: actions/upload-artifact@v3
if: ${{ failure() }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
if: ${{ matrix.language == 'java' }}
with:
java-version: '11'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/codesee-arch-diagram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ on:

permissions: read-all

concurrency:
group: boyka-CodeSee-${{ github.ref }}-1
cancel-in-progress: true

jobs:
codesee:
runs-on: ubuntu-latest
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: 17
distribution: 'temurin'
cache: 'maven'
check-latest: true
Expand Down Expand Up @@ -104,7 +104,9 @@ jobs:
run-appium: true
run-ios: true
run-android: true
emulator-target: playstore
emulator-channel: canary
emulator-arch: x86
emulator-target: aosp_atd

test-mobile-web:
needs:
Expand Down Expand Up @@ -159,7 +161,7 @@ jobs:
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'temurin'
cache: 'maven'
check-latest: true
Expand Down Expand Up @@ -261,7 +263,7 @@ jobs:
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: 'maven'
check-latest: true
Expand Down
28 changes: 13 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
## v0.16.0 (2023-07-20)
## v0.17.0 (2023-09-11)

#### :rocket: New Feature

- [#545](/~https://github.com/BoykaFramework/boyka-framework/pull/545) feat(java): :sparkles: replaced json schema validator ([@WasiqB](/~https://github.com/WasiqB))
- [#581](/~https://github.com/BoykaFramework/boyka-framework/pull/581) feat(workflow): :sparkles: using with new selenium grid dist ([@WasiqB](/~https://github.com/WasiqB))
- [#579](/~https://github.com/BoykaFramework/boyka-framework/pull/579) feat(Internal): ✨ migrated yarn to pnpm ([@WasiqB](/~https://github.com/WasiqB))

#### :bug: Bug Fix
#### :house: Internal

- [#554](/~https://github.com/BoykaFramework/boyka-framework/pull/554) fix(java): :bug: fixed issue with webdrivermanager ([@github-actions[bot]](/~https://github.com/apps/github-actions))
- [#548](/~https://github.com/BoykaFramework/boyka-framework/pull/548) fix(workflow): :bug: fixed create feature pr issue ([@github-actions[bot]](/~https://github.com/apps/github-actions))
- [#597](/~https://github.com/BoykaFramework/boyka-framework/pull/597) build(deps): bump org.aspectj:aspectjweaver from 1.9.20 to 1.9.20.1 in /core-java ([@dependabot[bot]](/~https://github.com/apps/dependabot))
- [#599](/~https://github.com/BoykaFramework/boyka-framework/pull/599) build(deps): bump org.seleniumhq.selenium:selenium-java from 4.12.0 to 4.12.1 in /core-java ([@dependabot[bot]](/~https://github.com/apps/dependabot))
- [#583](/~https://github.com/BoykaFramework/boyka-framework/pull/583) build(deps): bump org.apache.maven.plugins:maven-enforcer-plugin from 3.3.0 to 3.4.0 in /core-java ([@dependabot[bot]](/~https://github.com/apps/dependabot))
- [#591](/~https://github.com/BoykaFramework/boyka-framework/pull/591) build(deps-dev): bump lint-staged from 13.3.0 to 14.0.1 ([@dependabot[bot]](/~https://github.com/apps/dependabot))
- [#575](/~https://github.com/BoykaFramework/boyka-framework/pull/575) build(deps-dev): bump eslint-config-prettier from 8.10.0 to 9.0.0 ([@dependabot[bot]](/~https://github.com/apps/dependabot))
- [#588](/~https://github.com/BoykaFramework/boyka-framework/pull/588) build(deps-dev): bump prettier from 2.8.8 to 3.0.3 ([@dependabot[bot]](/~https://github.com/apps/dependabot))
- [#598](/~https://github.com/BoykaFramework/boyka-framework/pull/598) build(deps-dev): bump @types/node from 18.17.14 to 18.17.15 ([@dependabot[bot]](/~https://github.com/apps/dependabot))
- [#573](/~https://github.com/BoykaFramework/boyka-framework/pull/573) ci(workflow): ✨ optimize release workflows ([@WasiqB](/~https://github.com/WasiqB))

#### :nail_care: Polish

- [#525](/~https://github.com/BoykaFramework/boyka-framework/pull/525) chore(website): :memo: updated documentation with a note for browsers ([@WasiqB](/~https://github.com/WasiqB))

#### :memo: Documentation

- [#549](/~https://github.com/BoykaFramework/boyka-framework/pull/549) docs(website): :memo: updating documentations ([@github-actions[bot]](/~https://github.com/apps/github-actions))

#### Committers: 2
#### Committers: 1

- Wasiq Bhamla ([@WasiqB](/~https://github.com/WasiqB))
- [@github-actions[bot]](/~https://github.com/apps/github-actions)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<a href="https://mvnrepository.com/artifact/com.github.wasiqb.boyka/boyka-framework">
<img src="https://img.shields.io/maven-central/v/com.github.wasiqb.boyka/boyka-framework.svg?style=for-the-badge" alt="Maven Central" />
</a>
<a href="/~https://github.com/BoykaFramework/boyka-framework/releases/tag/v0.16.0">
<img src="https://img.shields.io/github/downloads/BoykaFramework/boyka-framework/v0.16.0/total?color=brightgreen&label=Downloads%20for%20v0.16.0&logo=GitHub&style=for-the-badge" alt="GitHub releases" />
<a href="/~https://github.com/BoykaFramework/boyka-framework/releases/tag/v0.17.0">
<img src="https://img.shields.io/github/downloads/BoykaFramework/boyka-framework/v0.17.0/total?color=brightgreen&label=Downloads%20for%20v0.17.0&logo=GitHub&style=for-the-badge" alt="GitHub releases" />
</a>
<a href="/~https://github.com/BoykaFramework/boyka-framework/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/BoykaFramework/boyka-framework.svg?style=for-the-badge" alt="license" />
Expand Down Expand Up @@ -89,7 +89,7 @@ Use this space to tell a little more about your project and how it can be used.
<dependency>
<groupId>com.github.wasiqb.boyka</groupId>
<artifactId>boyka-framework</artifactId>
<version>0.16.0</version>
<version>0.17.0</version>
</dependency>
```

Expand Down
14 changes: 7 additions & 7 deletions core-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.wasiqb.boyka</groupId>
<artifactId>boyka-framework</artifactId>
<version>0.16.0</version>
<version>0.17.0</version>
<inceptionYear>2022</inceptionYear>
<name>${project.groupId}:${project.artifactId}</name>
<description>🎉 Ultimate test automation framework for testing any application on any platform</description>
Expand All @@ -41,11 +41,11 @@
<json-path.version>2.8.0</json-path.version>
<log4j-core.version>2.20.0</log4j-core.version>
<log4j-api.version>2.20.0</log4j-api.version>
<faker.version>1.9.0</faker.version>
<faker.version>2.0.1</faker.version>
<jackson-dataformat-yaml.version>2.15.2</jackson-dataformat-yaml.version>
<jackson-databind.version>2.15.2</jackson-databind.version>
<ok2curl.version>0.8.0</ok2curl.version>
<json-schema-validator.version>1.0.86</json-schema-validator.version>
<json-schema-validator.version>1.0.87</json-schema-validator.version>
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
Expand All @@ -71,8 +71,8 @@
<sonar.report>${project.basedir}/reports/${suite-name}-jacoco.exec</sonar.report>
<jacoco.report>${project.reporting.outputDirectory}/jacoco</jacoco.report>
<maven-enforcer.version>3.4.0</maven-enforcer.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<sonar.version>5.14.0.18788</sonar.version>
<sonar.maven.version>3.9.1.2184</sonar.maven.version>
<jacoco.version>0.8.10</jacoco.version>
Expand Down Expand Up @@ -358,7 +358,7 @@
<version>3.8</version>
</requireMavenVersion>
<requireJavaVersion>
<version>11</version>
<version>17</version>
</requireJavaVersion>
</rules>
</configuration>
Expand Down Expand Up @@ -405,7 +405,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>
<release>17</release>
<encoding>UTF-8</encoding>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public boolean isSelected () {

@Override
public void scrollIntoView () {
LOGGER.info ("Scrolling element located by: [{}] into view", this.locator.getName ());
LOGGER.info ("Scrolling element located by [{}] into view", this.locator.getName ());
ofNullable (this.listener).ifPresent (l -> l.onScrollIntoView (this.locator));
performElementAction (e -> withDriver ().executeScript ("arguments[0].scrollIntoView(true);", e), this.locator);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
package com.github.wasiqb.boyka.actions.elements;

import static com.github.wasiqb.boyka.enums.Message.ELEMENT_NOT_FOUND;
import static com.github.wasiqb.boyka.enums.WaitStrategy.CLICKABLE;
import static com.github.wasiqb.boyka.manager.ParallelSession.getSession;
import static com.github.wasiqb.boyka.utils.ErrorHandler.handleAndThrow;
import static com.github.wasiqb.boyka.utils.ErrorHandler.throwError;
import static java.text.MessageFormat.format;
import static java.util.Objects.requireNonNull;
import static org.apache.logging.log4j.LogManager.getLogger;
import static org.openqa.selenium.support.ui.ExpectedConditions.elementToBeClickable;
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOfElementLocated;
Expand Down Expand Up @@ -109,13 +111,10 @@ private static <D extends WebDriver> List<WebElement> finds (final D driver, fin
private static void waitForElement (final Locator locator, final WaitStrategy waitStrategy) {
try {
final var wait = getSession ().getWait ();
switch (waitStrategy) {
case CLICKABLE:
wait.until (elementToBeClickable (locator.getLocator ()));
break;
case VISIBLE:
default:
wait.until (visibilityOfElementLocated (locator.getLocator ()));
if (requireNonNull (waitStrategy, "Wait Strategy is null") == CLICKABLE) {
wait.until (elementToBeClickable (locator.getLocator ()));
} else {
wait.until (visibilityOfElementLocated (locator.getLocator ()));
}
} catch (final TimeoutException e) {
handleAndThrow (ELEMENT_NOT_FOUND, e, locator.getName (), getSession ().getPlatformType ());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
import com.github.wasiqb.boyka.actions.interfaces.listeners.BoykaListener;
import org.openqa.selenium.WindowType;

/**
* Handle windows action events.
*
* @author Wasiq Bhamla
* @since 29-Apr-2023
*/
public interface IWindowActionsListener extends BoykaListener {
default void onClose () {
// not implemented.
Expand Down

This file was deleted.

Loading