diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..8c61eaa4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,354 @@ +# Main CI +name: Java CI with Gradle + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + + configure_sonar: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + + steps: + - name: Save Sonar config on PR + run: | + mkdir -p ./prInfo + echo ${{ github.event.number }} > ./prInfo/PR + echo ${{ github.base_ref }} > ./prInfo/base_ref + echo ${{ github.head_ref }} > ./prInfo/head_ref + - uses: actions/upload-artifact@v4 + with: + name: prInfo + path: prInfo/ + + mainidewindow_idestatusbar_screenshot: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Run integration tests on Linux + run: | + export DISPLAY=:99.0 + Xvfb -ac :99 -screen 0 1920x1080x24 & + sleep 10 + cd src/test-project + mkdir -p build/reports + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.utils.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.idestatusbar.* + if: runner.os == 'Linux' + - name: Run integration tests on Windows + run: | + cd src\test-project + chmod +x gradlew.bat + .\gradlew.bat integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.utils.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.mainidewindow.idestatusbar.* + if: runner.os == 'Windows' + - name: Run integration tests on MacOS + run: | + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.utils.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.mainidewindow.idestatusbar.* + if: runner.os == 'macOS' + - name: Archiving tests reports + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-mainidewindow-idestatusbar-test-reports + path: src/test-project/build/reports/tests/* + if: always() + - name: Archiving screenshots + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-mainidewindow-idestatusbar-screenshots + path: src/test-project/build/screenshots/* + if: always() + - name: Archiving StepLogger logs + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-mainidewindow-idestatusbar-steplogger-logs + path: src/test-project/build/test-results/* + if: always() + + dialogs_information_settings: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Run integration tests on Linux + run: | + export DISPLAY=:99.0 + Xvfb -ac :99 -screen 0 1920x1080x24 & + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.information.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.settings.* + if: runner.os == 'Linux' + - name: Run integration tests on Windows + run: | + cd src\test-project + chmod +x gradlew.bat + .\gradlew.bat integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.information.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.settings.* + if: runner.os == 'Windows' + - name: Run integration tests on MacOS + run: | + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.information.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.settings.* + if: runner.os == 'macOS' + - name: Archiving tests reports + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-dialogs-information-settings-test-reports + path: src/test-project/build/reports/tests/* + if: always() + - name: Archiving screenshots + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-dialogs-information-settings-screenshots + path: src/test-project/build/screenshots/* + if: always() + - name: Archiving StepLogger logs + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-dialogs-information-settings-steplogger-logs + path: src/test-project/build/test-results/* + if: always() + + dialogs_project_manipulation: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 11 # Java 11 is only used for test NewProjectDialogTest/setProjectSdkIfAvailableTest + uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: 'temurin' + cache: 'gradle' + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Run integration tests on Linux + run: | + export DISPLAY=:99.0 + Xvfb -ac :99 -screen 0 1920x1080x24 & + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation.* + if: runner.os == 'Linux' + - name: Run integration tests on Windows + run: | + cd src\test-project + chmod +x gradlew.bat + .\gradlew.bat integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation.* + if: runner.os == 'Windows' + - name: Run integration tests on MacOS + run: | + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation.* + if: runner.os == 'macOS' + - name: Archiving tests reports + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-dialogs-project-manipulation-test-reports + path: src/test-project/build/reports/tests/* + if: always() + - name: Archiving screenshots + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-dialogs-project-manipulation-screenshots + path: src/test-project/build/screenshots/* + if: always() + - name: Archiving StepLogger logs + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-dialogs-project-manipulation-steplogger-logs + path: src/test-project/build/test-results/* + if: always() + + dialogs: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Run integration tests on Linux + run: | + export DISPLAY=:99.0 + Xvfb -ac :99 -screen 0 1920x1080x24 & + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.FlatWelcomeFrameTest + if: runner.os == 'Linux' + - name: Run integration tests on Windows + run: | + cd src\test-project + chmod +x gradlew.bat + .\gradlew.bat integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.FlatWelcomeFrameTest + if: runner.os == 'Windows' + - name: Run integration tests on MacOS + run: | + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.FlatWelcomeFrameTest + if: runner.os == 'macOS' + - name: Archiving tests reports + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-dialogs-test-reports + path: src/test-project/build/reports/tests/* + if: always() + - name: Archiving screenshots + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-dialogs-screenshots + path: src/test-project/build/screenshots/* + if: always() + - name: Archiving StepLogger logs + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-dialogs-steplogger-logs + path: src/test-project/build/test-results/* + if: always() + + mainidewindow-menubar: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Run integration tests on Linux + run: | + export DISPLAY=:99.0 + Xvfb -ac :99 -screen 0 1920x1080x24 & + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.menubar.* + if: runner.os == 'Linux' + - name: Run integration tests on Windows + run: | + cd src\test-project + chmod +x gradlew.bat + .\gradlew.bat integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.menubar.* + if: runner.os == 'Windows' + - name: Run integration tests on MacOS + run: | + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.menubar.* + if: runner.os == 'macOS' + - name: Archiving tests reports + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-mainidewindow-menubar-test-reports + path: src/test-project/build/reports/tests/* + if: always() + - name: Archiving screenshots + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-mainidewindow-menubar-screenshots + path: src/test-project/build/screenshots/* + if: always() + - name: Archiving StepLogger logs + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-mainidewindow-menubar-steplogger-logs + path: src/test-project/build/test-results/* + if: always() + + + mainidewindow-toolwindowspane: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Run integration tests on Linux + run: | + export DISPLAY=:99.0 + Xvfb -ac :99 -screen 0 1920x1080x24 & + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane.* + if: runner.os == 'Linux' + - name: Run integration tests on Windows + run: | + cd src\test-project + chmod +x gradlew.bat + .\gradlew.bat integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane.* + if: runner.os == 'Windows' + - name: Run integration tests on MacOS + run: | + cd src/test-project + chmod +x gradlew + ./gradlew integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane.* + if: runner.os == 'macOS' + - name: Archiving tests reports + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-mainidewindow-toolwindowspane-test-reports + path: src/test-project/build/reports/tests/* + if: always() + - name: Archiving screenshots + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-mainidewindow-toolwindowspane-screenshots + path: src/test-project/build/screenshots/* + if: always() + - name: Archiving StepLogger logs + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-mainidewindow-toolwindowspane-steplogger-logs + path: src/test-project/build/test-results/* + if: always() diff --git a/.github/workflows/dialogs.information_settings.yml b/.github/workflows/dialogs.information_settings.yml deleted file mode 100644 index 37dc4f4a..00000000 --- a/.github/workflows/dialogs.information_settings.yml +++ /dev/null @@ -1,118 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - dialogs.information, dialogs.settings - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.information.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.settings.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.information.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.settings.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.information.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.settings.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/dialogs.information_settings_ultimate.yml b/.github/workflows/dialogs.information_settings_ultimate.yml deleted file mode 100644 index e0fff754..00000000 --- a/.github/workflows/dialogs.information_settings_ultimate.yml +++ /dev/null @@ -1,127 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - dialogs.information, dialogs.settings ULTIMATE - -on: - workflow_run: - workflows: [ "Sonar" ] - types: - - completed - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.information.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.settings.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.information.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.settings.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - gpg --decrypt --passphrase "$env:GPG_PASSPHRASE" --pinentry-mode loopback --output src\test-project\idea_license_token\idea.key src\test-project\idea_license_token\idea.key.gpg - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.information.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.settings.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/dialogs.project_manipulation.yml b/.github/workflows/dialogs.project_manipulation.yml deleted file mode 100644 index 7d18f17f..00000000 --- a/.github/workflows/dialogs.project_manipulation.yml +++ /dev/null @@ -1,124 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - dialogs.project_manipulation - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 # Java 11 is only used for test NewProjectDialogTest/setProjectSdkIfAvailableTest - uses: actions/setup-java@v4 - with: - java-version: 11 - distribution: 'temurin' - cache: 'gradle' - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/dialogs.project_manipulation_ultimate.yml b/.github/workflows/dialogs.project_manipulation_ultimate.yml deleted file mode 100644 index 2d8f2714..00000000 --- a/.github/workflows/dialogs.project_manipulation_ultimate.yml +++ /dev/null @@ -1,133 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - dialogs.project_manipulation ULTIMATE - -on: - workflow_run: - workflows: [ "Sonar" ] - types: - - completed - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 # Java 11 is only used for test NewProjectDialogTest/setProjectSdkIfAvailableTest - uses: actions/setup-java@v4 - with: - java-version: 11 - distribution: 'temurin' - cache: 'gradle' - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - gpg --decrypt --passphrase "$env:GPG_PASSPHRASE" --pinentry-mode loopback --output src\test-project\idea_license_token\idea.key src\test-project\idea_license_token\idea.key.gpg - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/dialogs.yml b/.github/workflows/dialogs.yml deleted file mode 100644 index 6f00988b..00000000 --- a/.github/workflows/dialogs.yml +++ /dev/null @@ -1,118 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - dialogs - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.FlatWelcomeFrameTest - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.FlatWelcomeFrameTest - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.FlatWelcomeFrameTest - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/dialogs_ultimate.yml b/.github/workflows/dialogs_ultimate.yml deleted file mode 100644 index 9e80a88e..00000000 --- a/.github/workflows/dialogs_ultimate.yml +++ /dev/null @@ -1,127 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - dialogs ULTIMATE - -on: - workflow_run: - workflows: [ "Sonar" ] - types: - - completed - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.FlatWelcomeFrameTest - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.FlatWelcomeFrameTest - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - gpg --decrypt --passphrase "$env:GPG_PASSPHRASE" --pinentry-mode loopback --output src\test-project\idea_license_token\idea.key src\test-project\idea_license_token\idea.key.gpg - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.FlatWelcomeFrameTest - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/mainidewindow.idestatusbar_screenshot.yml b/.github/workflows/mainidewindow.idestatusbar_screenshot.yml deleted file mode 100644 index d961c490..00000000 --- a/.github/workflows/mainidewindow.idestatusbar_screenshot.yml +++ /dev/null @@ -1,134 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - mainidewindow.idestatusbar, screenshot - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - configure_sonar: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - - steps: - - name: Save Sonar config on PR - run: | - mkdir -p ./prInfo - echo ${{ github.event.number }} > ./prInfo/PR - echo ${{ github.base_ref }} > ./prInfo/base_ref - echo ${{ github.head_ref }} > ./prInfo/head_ref - - uses: actions/upload-artifact@v4 - with: - name: prInfo - path: prInfo/ - - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.utils.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.idestatusbar.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.utils.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.mainidewindow.idestatusbar.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.utils.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.mainidewindow.idestatusbar.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/mainidewindow.idestatusbar_screenshot_ultimate.yml b/.github/workflows/mainidewindow.idestatusbar_screenshot_ultimate.yml deleted file mode 100644 index 0ab9ba4c..00000000 --- a/.github/workflows/mainidewindow.idestatusbar_screenshot_ultimate.yml +++ /dev/null @@ -1,143 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - mainidewindow.idestatusbar, screenshot ULTIMATE - -on: - workflow_run: - workflows: [ "Sonar" ] - types: - - completed - -jobs: - configure_sonar: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - - steps: - - name: Save Sonar config on PR - run: | - mkdir -p ./prInfo - echo ${{ github.event.number }} > ./prInfo/PR - echo ${{ github.base_ref }} > ./prInfo/base_ref - echo ${{ github.head_ref }} > ./prInfo/head_ref - - uses: actions/upload-artifact@v4 - with: - name: prInfo - path: prInfo/ - - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.utils.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.idestatusbar.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.utils.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.mainidewindow.idestatusbar.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - gpg --decrypt --passphrase "$env:GPG_PASSPHRASE" --pinentry-mode loopback --output src\test-project\idea_license_token\idea.key src\test-project\idea_license_token\idea.key.gpg - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.utils.* --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.mainidewindow.idestatusbar.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/mainidewindow.menubar.yml b/.github/workflows/mainidewindow.menubar.yml deleted file mode 100644 index 4cd7dcf3..00000000 --- a/.github/workflows/mainidewindow.menubar.yml +++ /dev/null @@ -1,118 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - mainidewindow.menubar - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.menubar.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.menubar.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.menubar.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/mainidewindow.menubar_ultimate.yml b/.github/workflows/mainidewindow.menubar_ultimate.yml deleted file mode 100644 index 34f5f903..00000000 --- a/.github/workflows/mainidewindow.menubar_ultimate.yml +++ /dev/null @@ -1,127 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - mainidewindow.menubar ULTIMATE - -on: - workflow_run: - workflows: [ "Sonar" ] - types: - - completed - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.menubar.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.menubar.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - gpg --decrypt --passphrase "$env:GPG_PASSPHRASE" --pinentry-mode loopback --output src\test-project\idea_license_token\idea.key src\test-project\idea_license_token\idea.key.gpg - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.menubar.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/mainidewindow.toolwindowspane.yml b/.github/workflows/mainidewindow.toolwindowspane.yml deleted file mode 100644 index 7cc525c1..00000000 --- a/.github/workflows/mainidewindow.toolwindowspane.yml +++ /dev/null @@ -1,118 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - mainidewindow.toolwindowspane - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - run: | - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITest --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/mainidewindow.toolwindowspane_ultimate.yml b/.github/workflows/mainidewindow.toolwindowspane_ultimate.yml deleted file mode 100644 index 8ce2583b..00000000 --- a/.github/workflows/mainidewindow.toolwindowspane_ultimate.yml +++ /dev/null @@ -1,127 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - mainidewindow.toolwindowspane ULTIMATE - -on: - workflow_run: - workflows: [ "Sonar" ] - types: - - completed - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - export DISPLAY=:99.0 - Xvfb -ac :99 -screen 0 1920x1080x24 & - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-macos: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output src/test-project/idea_license_token/idea.key src/test-project/idea_license_token/idea.key.gpg - cd src/test-project - chmod +x gradlew - ./gradlew clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane.* - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src/test-project/build/reports/tests/test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src/test-project/build/screenshots/* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src/test-project/build/test-results/* - if: always() - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Run integration tests - env: - GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }} - run: | - gpg --decrypt --passphrase "$env:GPG_PASSPHRASE" --pinentry-mode loopback --output src\test-project\idea_license_token\idea.key src\test-project\idea_license_token\idea.key.gpg - cd src\test-project - chmod +x gradlew.bat - .\gradlew.bat clean integrationUITestUltimate --warning-mode none --tests com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane.* - shell: powershell - - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-test-reports - path: src\test-project\build\reports\tests\test - if: always() - - name: Archiving screenshots - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-screenshots - path: src\test-project\build\screenshots\* - if: always() - - name: Archiving StepLogger logs - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-steplogger-logs - path: src\test-project\build\test-results\* - if: always() diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 69d9ea8c..ce0dbe31 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -1,7 +1,7 @@ name: Sonar on: workflow_run: - workflows: ["Java CI with Gradle - mainidewindow.idestatusbar, screenshot"] + workflows: [Java CI with Gradle] types: - completed jobs: @@ -13,42 +13,25 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis ref: ${{github.event.workflow_run.head_sha}} - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: 'temurin' cache: 'gradle' - - name: Download artifacts - uses: actions/github-script@v7.0.1 + - name: Download 'mainidewindow.idestatusbar, screenshot' report + uses: actions/download-artifact@v4 with: - script: | - var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id}}, - }); - for (var artifact of artifacts.data.artifacts) { - if (artifact.name == 'linux-integration-test-reports' || artifact.name == 'ubuntu-latest-test-reports' || artifact.name == 'prInfo') { - var zipfile = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: artifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - var path = require('path'); - var pathFile = path.format({ - root: '${{github.workspace}}/', - name: artifact.name, - ext: '.zip' - }); - fs.writeFileSync(pathFile, Buffer.from(zipfile.data)); - } - } - - name: Unzip artifacts - run: | - find . -name '*.zip' -exec sh -c 'unzip -d "${{github.workspace}}/build" "$1"' _ {} \; + path: reports + pattern: mainidewindow.idestatusbar-test-reports + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{github.event.workflow_run.id}} + - name: Download PrInfo + uses: actions/download-artifact@v4 + with: + pattern: prInfo + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{github.event.workflow_run.id}} - name: Run Sonar analysis env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index c7579082..7ff38414 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ build/ target/ pom.xml +/src/test-project/.intellijPlatform/self-update.lock diff --git a/build.gradle.kts b/build.gradle.kts index 3f47e1bc..42d7c0af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,7 +23,6 @@ dependencies { api(libs.remote.fixtures) } - java { toolchain { languageVersion = JavaLanguageVersion.of(17) diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/UITestRunner.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/UITestRunner.java index fe3168cf..ade49a16 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/UITestRunner.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/UITestRunner.java @@ -72,15 +72,17 @@ public static RemoteRobot runIde(IntelliJVersion ideaVersion, int port) { UITestRunner.ideaVersion = ideaVersion; acceptAllTermsAndConditions(); - if (ideaVersion.isUltimate()) { - activateEvaluateForFree(); - } String fileExtension = OS_NAME.contains("windows") ? ".bat" : ""; String[] platformTypeVersion = generatePlatformTypeVersion(); - ProcessBuilder pb = new ProcessBuilder("." + File.separator + "gradlew" + fileExtension, "runIdeForUiTests", "-PideaVersion=" + ideaVersion, "-Drobot-server.port=" + port, "-PplatformType=" + platformTypeVersion[0], "-PplatformVersion=" + platformTypeVersion[1]); + ProcessBuilder pb; + if (ideaVersion.toInt() < 20242) { + pb = new ProcessBuilder("." + File.separator + "gradlew" + fileExtension, "runIdeForUiTests", "-PideaVersion=" + ideaVersion, "-Drobot-server.port=" + port); + } else { + pb = new ProcessBuilder("." + File.separator + "gradlew" + fileExtension, "runIdeForUiTests", "-Drobot-server.port=" + port, "-PplatformType=" + platformTypeVersion[0], "-PplatformVersion=" + platformTypeVersion[1]); + } boolean isDebugOn = Boolean.parseBoolean(System.getProperty("intellij_debug", "false")); // For more info on intellij_debug please check README if (isDebugOn) { redirectProcessOutputs(pb); @@ -171,18 +173,14 @@ public static RemoteRobot getRemoteRobotConnection(int port) { private static void acceptAllTermsAndConditions() { String osxPlistSourceLocation; - if (ideaVersion.isUltimate()) { - osxPlistSourceLocation = "plist/ultimate_all/com.apple.java.util.prefs.plist"; - } else if (ideaVersion.toInt() <= 20213) { + if (ideaVersion.toInt() <= 20213) { osxPlistSourceLocation = "plist/2021_3_and_older/com.apple.java.util.prefs.plist"; } else { osxPlistSourceLocation = "plist/2022_1/com.apple.java.util.prefs.plist"; } String linuxPrefsXmlSourceLocation; - if (ideaVersion.isUltimate()) { - linuxPrefsXmlSourceLocation = "prefs_xml/ultimate_all/prefs.xml"; - } else if (ideaVersion.toInt() <= 20213) { + if (ideaVersion.toInt() <= 20213) { linuxPrefsXmlSourceLocation = "prefs_xml/2021_3_and_older/prefs.xml"; } else { linuxPrefsXmlSourceLocation = "prefs_xml/2022_1/prefs.xml"; @@ -254,18 +252,6 @@ private static void acceptAllTermsAndConditions() { } } - private static void activateEvaluateForFree() { - String targetEvaluationKeysDir = System.getProperty("user.dir") + "/build/idea-sandbox/config-uiTest/eval/"; - createDirectoryHierarchy(targetEvaluationKeysDir); - - for (String ideaVersionSubstring : new String[]{"202", "203", "211", "212"}) { - String keyFilename = "idea" + ideaVersionSubstring + ".evaluation.key"; - String sourcePathToKey = "evaluate_for_free_keys/" + keyFilename; - String targetPathToKey = targetEvaluationKeysDir + keyFilename; - copyFileFromJarResourceDir(sourcePathToKey, targetPathToKey); - } - } - private static void waitUntilIntelliJStarts(int port) { waitFor(Duration.ofSeconds(600), Duration.ofSeconds(3), "The IntelliJ Idea did not start in 10 minutes.", () -> isIntelliJUIVisible(port)); } @@ -303,14 +289,16 @@ private static void createDirectoryHierarchy(String location) { } private static void copyFileFromJarResourceDir(String sourceFileLocation, String destFileLocation) { - InputStream resourceStream = UITestRunner.class.getClassLoader().getResourceAsStream(sourceFileLocation); - try (OutputStream outStream = new FileOutputStream(new File(destFileLocation))) { - byte[] buffer = new byte[resourceStream.available()]; - int count = resourceStream.read(buffer); - if (count == 0) { - throw new UITestException("Reading from buffer was unsuccessful."); + try (OutputStream outStream = new FileOutputStream(destFileLocation); + InputStream resourceStream = UITestRunner.class.getClassLoader().getResourceAsStream(sourceFileLocation)) { + if (resourceStream != null) { + byte[] buffer = new byte[resourceStream.available()]; + int count = resourceStream.read(buffer); + if (count == 0) { + throw new UITestException("Reading from buffer was unsuccessful."); + } + outStream.write(buffer); } - outStream.write(buffer); } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } @@ -319,7 +307,7 @@ private static void copyFileFromJarResourceDir(String sourceFileLocation, String /** * Redirect stdout and stderr of running subprocess to files * - * @param pb Process builder of running subprocess + * @param pb Process builder of running subprocess */ private static void redirectProcessOutputs(ProcessBuilder pb) { String outDir = System.getProperty("user.dir") + File.separator + "intellij_debug"; @@ -341,7 +329,7 @@ private static void redirectProcessOutputs(ProcessBuilder pb) { */ private static String[] generatePlatformTypeVersion() { String[] platformTypeVersion = ideaVersion.toString().split("-", 2); - if (2 > platformTypeVersion.length){ + if (2 > platformTypeVersion.length) { throw new UITestException("ideaVersion is not recognized."); } return platformTypeVersion; diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/FlatWelcomeFrame.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/FlatWelcomeFrame.java index 8681a433..f3890f69 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/FlatWelcomeFrame.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/FlatWelcomeFrame.java @@ -23,18 +23,20 @@ import com.redhat.devtools.intellij.commonuitest.utils.constants.ButtonLabels; import com.redhat.devtools.intellij.commonuitest.utils.constants.XPathDefinitions; import com.redhat.devtools.intellij.commonuitest.utils.project.CreateCloseUtils; -import com.redhat.devtools.intellij.commonuitest.utils.runner.IntelliJVersion; import com.redhat.devtools.intellij.commonuitest.utils.steps.SharedSteps; import org.jetbrains.annotations.NotNull; import java.io.File; import java.io.IOException; import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; import java.time.Duration; +import java.util.Comparator; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; +import java.util.stream.Stream; import static com.intellij.remoterobot.search.locators.Locators.byXpath; @@ -50,14 +52,12 @@ public class FlatWelcomeFrame extends CommonContainerFixture { private static final String PROJECTS_BUTTON = "Projects"; private static final String TIP_OF_THE_DAY = "Tip of the Day"; private final RemoteRobot remoteRobot; - private final IntelliJVersion intelliJVersion; private final int ideaVersion; public FlatWelcomeFrame(@NotNull RemoteRobot remoteRobot, @NotNull RemoteComponent remoteComponent) { super(remoteRobot, remoteComponent); this.remoteRobot = remoteRobot; - this.intelliJVersion = UITestRunner.getIdeaVersion(); - this.ideaVersion = intelliJVersion.toInt(); + this.ideaVersion = UITestRunner.getIdeaVersion().toInt(); } /** @@ -100,11 +100,16 @@ public void clearWorkspace() { // Remove projects on disk try { String pathToDirToMakeEmpty = CreateCloseUtils.PROJECT_LOCATION; - boolean doesProjectDirExists = Files.exists(Paths.get(pathToDirToMakeEmpty)); + Path path = Paths.get(pathToDirToMakeEmpty); + boolean doesProjectDirExists = Files.exists(path); if (doesProjectDirExists) { - Files.delete(new File(pathToDirToMakeEmpty).toPath()); + try (Stream pathStream = Files.walk(new File(pathToDirToMakeEmpty).toPath())) { + pathStream.sorted(Comparator.reverseOrder()) + .map(Path::toFile) + .forEach(File::delete); + } } else { - Files.createDirectories(Paths.get(pathToDirToMakeEmpty)); + Files.createDirectories(path); } } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/NewProjectFirstPage.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/NewProjectFirstPage.java index 28deff58..53f66c7a 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/NewProjectFirstPage.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/NewProjectFirstPage.java @@ -30,6 +30,7 @@ import java.time.Duration; import java.util.List; +import java.util.Optional; import static com.intellij.remoterobot.search.locators.Locators.byXpath; import static com.intellij.remoterobot.stepsProcessing.StepWorkerKt.step; @@ -121,21 +122,21 @@ public ComboBoxFixture getProjectJdkComboBox() { * @param targetSdkName name of the SDK to which will be changed the current settings */ public void setProjectSdkIfAvailable(String targetSdkName) { - step("Select the '" + targetSdkName + "' as new project SDK", () -> { - - waitFor( - Duration.ofSeconds(20), - Duration.ofSeconds(5), - "Waiting for 'resolving jdk' dialog to disappear.", - () -> "Expected exactly one dialog but found " + remoteRobot.findAll(CommonContainerFixture.class, byXpath(XPathDefinitions.MY_DIALOG)).size(), - () -> remoteRobot.findAll(CommonContainerFixture.class, byXpath(XPathDefinitions.MY_DIALOG)).size() == 1 - ); - - ComboBoxFixture projectJdkComboBox = getProjectJdkComboBox(); - String currentlySelectedProjectSdk = TextUtils.listOfRemoteTextToString(projectJdkComboBox.findAllText()); - if (currentlySelectedProjectSdk.contains(targetSdkName)) { - return; - } + step("Select the '" + targetSdkName + "' as new project SDK", () -> { + + waitFor( + Duration.ofSeconds(20), + Duration.ofSeconds(5), + "Waiting for 'resolving jdk' dialog to disappear.", + () -> "Expected exactly one dialog but found " + remoteRobot.findAll(CommonContainerFixture.class, byXpath(XPathDefinitions.MY_DIALOG)).size(), + () -> remoteRobot.findAll(CommonContainerFixture.class, byXpath(XPathDefinitions.MY_DIALOG)).size() == 1 + ); + + ComboBoxFixture projectJdkComboBox = getProjectJdkComboBox(); + String currentlySelectedProjectSdk = TextUtils.listOfRemoteTextToString(projectJdkComboBox.findAllText()); + if (currentlySelectedProjectSdk.contains(targetSdkName)) { + return; + } if (UITestRunner.getIdeaVersionInt() >= 20221) { projectJdkComboBox.click(); @@ -152,17 +153,9 @@ public void setProjectSdkIfAvailable(String targetSdkName) { CommonContainerFixture parentFixture = waitFor(Duration.ofSeconds(20), Duration.ofSeconds(2), "Wait for the 'Project SDK' list to finish loading all items.", "The project JDK list did not load all items in 20 seconds.", this::didProjectSdkListLoadAllItems); JPopupMenuFixture projectSdkList = parentFixture.jPopupMenus(byXpath(XPathDefinitions.HEAVY_WEIGHT_WINDOW)).get(0); // issue https://github.com/JetBrains/intellij-ui-test-robot/issues/104 - List sdkItems = projectSdkList.findAllText(); - for (RemoteText sdkItem : sdkItems) { - if (sdkItem.getText().contains(targetSdkName)) { - try { - sdkItem.click(); - } catch (Exception e) { - // issue #83 in the Remote-Robot framework - https://github.com/JetBrains/intellij-ui-test-robot/issues/83 - break; - } - } - } + List sdkItems = projectSdkList.jList().collectItems(); + Optional item = sdkItems.stream().filter(s -> s.startsWith(targetSdkName)).findFirst(); + item.ifPresent(s -> projectSdkList.jList().clickItem(s, true)); }); } diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/MainIdeWindow.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/MainIdeWindow.java index 8c12ca10..2d916eea 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/MainIdeWindow.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/MainIdeWindow.java @@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull; import java.awt.event.KeyEvent; -import java.time.Duration;; +import java.time.Duration; import com.redhat.devtools.intellij.commonuitest.utils.internalerror.IdeInternalErrorUtils; diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/constants/XPathDefinitions.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/constants/XPathDefinitions.java index 63d511ba..39fc8329 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/constants/XPathDefinitions.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/constants/XPathDefinitions.java @@ -11,6 +11,7 @@ package com.redhat.devtools.intellij.commonuitest.utils.constants; import com.redhat.devtools.intellij.commonuitest.exceptions.UITestException; +import org.intellij.lang.annotations.Language; /** * XPath definitions @@ -39,19 +40,31 @@ public class XPathDefinitions { public static final String IDE_FATAL_ERRORS_DIALOG = "//div[@accessiblename='IDE Fatal Errors' and @class='MyDialog']"; public static final String PROJECT_STRUCTURE_DIALOG = "//div[@accessiblename='Project Structure' and @class='MyDialog']"; public static final String TIP_DIALOG = "//div[@accessiblename='Tip of the Day' and @class='MyDialog']"; + @Language("XPath") public static final String TIP_DIALOG_2 = "//div[@text='Tip of the Day']"; + @Language("XPath") public static final String RECENT_PROJECTS = "//div[@accessiblename='Recent Projects']"; + @Language("XPath") public static final String RECENT_PROJECT_PANEL_NEW = "//div[@class='NewRecentProjectPanel']"; + @Language("XPath") public static final String RECENT_PROJECT_PANEL_NEW_2 = "//div[@class='JBViewport']/*"; + @Language("XPath") public static final String IDE_ERROR_ICON = "//div[@class='IdeErrorsIcon']"; public static final String BUILD_VIEW_EDITOR = "//div[@accessiblename='Editor']"; public static final String JCOMBOBOX = "//div[@class='JComboBox']"; + @Language("XPath") public static final String MORE_SETTINGS_TITLED_SEPARATOR = "//div[@class='TitledSeparator']/../../*"; + @Language("XPath") public static final String ARTIFACTS_COORDINATES_DIALOG_PANEL = "//div[@class='DialogPanel']/*"; + @Language("XPath") public static final String HEAVY_WEIGHT_WINDOW = "//div[@class='HeavyWeightWindow']"; + @Language("XPath") public static final String JDK_COMBOBOX = "//div[@class='JdkComboBox']"; + @Language("XPath") public static final String JDK_COMBOBOX_PROJECT_WIZARD = "//div[@class='ProjectWizardJdkComboBox']"; // works for IntelliJ Idea 2024.1 and higher + @Language("XPath") public static final String MY_DIALOG = "//div[@class='MyDialog']"; + @Language("XPath") public static final String TREE = "//div[@class='Tree']"; public static final String TOOLTIP_TEXT_PROJECT = "//div[@tooltiptext='Project']"; public static final String TOOLTIP_TEXT_HIDE = "//div[contains(@myvisibleactions, 'View),')]//div[@tooltiptext='Hide']"; @@ -68,11 +81,15 @@ public class XPathDefinitions { public static final String MY_ICON_LOCATE_SVG = "//div[@myicon='locate.svg']"; public static final String MY_ICON_REFRESH = "//div[@myicon='refresh.svg']"; public static final String CONTENT_COMBO_LABEL = "//div[@class='ContentComboLabel']"; + @Language("XPath") public static final String JBLIST = "//div[@class='JBList']"; + @Language("XPath") public static final String DIALOG_PANEL = "//div[@class='DialogPanel']"; + @Language("XPath") public static final String MY_LIST = "//div[@class='MyList']"; public static final String CODE_WITH_ME_JPANEL = "//div[@class='Wrapper'][.//div[@class='JBLabel']]//div[@class='JPanel']"; public static final String BREAD_CRUMBS = "//div[@class='Breadcrumbs']"; + @Language("XPath") public static final String EMPTY_PROJECT = "//div[@visible_text='Empty Project']"; public static final String SINGLE_HEIGHT_LABEL = "//div[@class='SingleHeightLabel']"; public static final String COLLAPSIBLE_TITLED_SEPARATOR = "//div[@class='CollapsibleTitledSeparator']"; @@ -80,15 +97,21 @@ public class XPathDefinitions { public static final String COLLAPSIBLE_TITLED_SEPARATOR_SIBLINGS = COLLAPSIBLE_TITLED_SEPARATOR + "/../*"; public static final String COLLAPSIBLE_TITLED_SEPARATOR_NEW_SIBLINGS = COLLAPSIBLE_TITLED_SEPARATOR_NEW + "/../*"; public static final String EXTENDABLE_TEXT_FIELD = "//div[@class='ExtendableTextField']"; + @Language("XPath") public static final String JBTEXT_FIELD = "//div[@class='JBTextField']"; + @Language("XPath") public static final String REMOVE_PROJECT_BUTTON = "//div[contains(@text.key, 'button.remove')]"; + @Language("XPath") public static final String SET_LANGUAGE = "//div[@class='SegmentedButtonComponent'][.//div[contains(@action.key, 'language.groovy')]]"; + @Language("XPath") public static final String SET_BUILD_SYSTEM = "//div[@class='SegmentedButtonComponent'][.//div[@action.key='buildsystem.type.intellij']]"; + @Language("XPath") public static final String SET_BUILD_SYSTEM_2024_2_AND_NEWER = "//div[@accessiblename='Build system:' and @class='SegmentedButtonComponent']"; // works for IntelliJ Idea 2024.1 and higher public static final String GET_SET_MODULE_NAME = "//div[@accessiblename='Module name:' and @class='JBTextField']"; public static final String GET_SET_MODULE_NAME_2024_2_AND_NEWER = "//div[@accessiblename='Module name:' and @class='JBTextField']"; public static final String GET_SET_CONTENT_ROOT = "//div[@accessiblename='Content root:' and @class='ExtendableTextField']"; public static final String GET_SET_MODULE_FILE_LOCATION = "//div[@accessiblename='Module file location:' and @class='ExtendableTextField']"; + @Language("XPath") public static final String CREATE_NEW_PROJECT = "//div[@defaulticon='createNewProjectTab.svg']"; // works for IntelliJ Idea 2024.1 and higher private XPathDefinitions() { diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/runner/IntelliJVersion.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/runner/IntelliJVersion.java index 4a2b95aa..36a964de 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/runner/IntelliJVersion.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/runner/IntelliJVersion.java @@ -28,17 +28,10 @@ public enum IntelliJVersion { COMMUNITY_V_2023_2("IC-2023.2"), COMMUNITY_V_2024_1("IC-2024.1"), COMMUNITY_V_2024_2("IC-2024.2"), - ULTIMATE_V_2020_2("IU-2020.2"), - ULTIMATE_V_2020_3("IU-2020.3"), - ULTIMATE_V_2021_1("IU-2021.1"), - ULTIMATE_V_2021_2("IU-2021.2"), - ULTIMATE_V_2023_2("IU-2023.2"), - ULTIMATE_V_2024_1("IU-2024.1"), - ULTIMATE_V_2024_2("IU-2024.2"); + COMMUNITY_V_2024_3("IC-2024.3"); private final String ideaVersionStringRepresentation; private final int ideaVersionIntRepresentation; - private final boolean isIdeaUltimate; IntelliJVersion(String ideaVersionStringRepresentation) { this.ideaVersionStringRepresentation = ideaVersionStringRepresentation; @@ -46,7 +39,6 @@ public enum IntelliJVersion { String ideaVersionString = this.ideaVersionStringRepresentation.substring(3).replace(".", ""); this.ideaVersionIntRepresentation = Integer.parseInt(ideaVersionString); - this.isIdeaUltimate = this.ideaVersionStringRepresentation.charAt(1) == 'U'; } @Override @@ -58,7 +50,4 @@ public int toInt() { return this.ideaVersionIntRepresentation; } - public boolean isUltimate() { - return this.isIdeaUltimate; - } } diff --git a/src/test-project/build.gradle b/src/test-project/build.gradle deleted file mode 100644 index 8fa97669..00000000 --- a/src/test-project/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -plugins { - id 'java' - id 'org.jetbrains.intellij' version '1.17.0' -} - -group 'com.redhat.devtools.intellij' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() - maven { - url 'https://packages.jetbrains.team/maven/p/ij/intellij-dependencies' - } -} - -dependencies { - testImplementation 'com.redhat.devtools.intellij:intellij-common-ui-test-library' - testImplementation 'org.junit.platform:junit-platform-launcher:1.8.0' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -intellij { - version = ideaVersion //for a full list of IntelliJ IDEA releases please see https://www.jetbrains.com/intellij-repository/releases -} - -patchPluginXml { - changeNotes = """ - Add change notes here.
- most HTML tags may be used""" -} - -test { - systemProperties['intellij_debug'] = 'true' - useJUnitPlatform() -} - -tasks.register('integrationUITestUltimate', Test) { - dependsOn copyKey - group = 'verification' - systemProperties['task.name'] = 'integrationUITestUltimate' - systemProperties['intellij_debug'] = 'true' - useJUnitPlatform() -} - -tasks.register('integrationUITest', Test) { - systemProperties['intellij_debug'] = 'true' - group = 'verification' - useJUnitPlatform() -} - -tasks.register('copyKey', Copy) { - from "idea_license_token/idea.key" - into "build/idea-sandbox/config-uiTest" -} - -runIdeForUiTests { - systemProperty "ide.mac.message.dialogs.as.sheets", "false" - systemProperty "jb.privacy.policy.text", "" - systemProperty "jb.consents.confirmation.enabled", "false" - systemProperty "ide.mac.file.chooser.native", "false" - systemProperty "jbScreenMenuBar.enabled", "false" - systemProperty "apple.laf.useScreenMenuBar", "false" - systemProperty "idea.trust.all.projects", "true" - systemProperty "ide.show.tips.on.startup.default.value", "false" -} - diff --git a/src/test-project/build.gradle.kts b/src/test-project/build.gradle.kts new file mode 100644 index 00000000..2ee3afea --- /dev/null +++ b/src/test-project/build.gradle.kts @@ -0,0 +1,85 @@ +import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType + +plugins { + id("java") + id("org.jetbrains.intellij.platform") version ("2.0.1") +} + +group = "com.redhat.devtools.intellij" +version = "1.0-SNAPSHOT" +val platformVersion = providers.gradleProperty("ideaVersion").get() + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } +} + +repositories { + mavenCentral() + intellijPlatform { + defaultRepositories() + } +} + +dependencies { + intellijPlatform { + create(IntelliJPlatformType.IntellijIdeaCommunity, platformVersion) + instrumentationTools() + } + testImplementation("com.redhat.devtools.intellij:intellij-common-ui-test-library") + testImplementation("org.junit.platform:junit-platform-launcher:1.8.0") + testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0") +} + +tasks { + test { + systemProperty("intellij_debug", "true") + useJUnitPlatform() + } + + register("copyKey", Copy::class.java) { + from("idea_license_token/idea.key") + into("build/idea-sandbox/config-uiTest") + } +} + +val integrationUITestUltimate by intellijPlatformTesting.testIde.registering { + task { + systemProperty("intellij_debug", "true") + group = "verification" + useJUnitPlatform() + dependsOn(tasks["copyKey"]) + } +} + +val integrationUITest by intellijPlatformTesting.testIde.registering { + task { + systemProperty("intellij_debug", "true") + group = "verification" + useJUnitPlatform() + } +} + +// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-tasks.html#runIdeForUiTests +val runIdeForUiTests by intellijPlatformTesting.runIde.registering { + task { + jvmArgumentProviders += CommandLineArgumentProvider { + listOf( + "-Dide.mac.message.dialogs.as.sheets=false", + "-Djb.privacy.policy.text=", + "-Djb.consents.confirmation.enabled=false", + "-Dide.mac.file.chooser.native=false", + "-DjbScreenMenuBar.enabled=false", + "-Dapple.laf.useScreenMenuBar=false", + "-Didea.trust.all.projects=true", + "-Dide.show.tips.on.startup.default.value=false", + ) + } + } + plugins { + robotServerPlugin() + } +} + diff --git a/src/test-project/gradle.properties b/src/test-project/gradle.properties index 9b9a9072..81b5009b 100644 --- a/src/test-project/gradle.properties +++ b/src/test-project/gradle.properties @@ -1 +1 @@ -ideaVersion=IC-2024.2 +ideaVersion=2024.2 diff --git a/src/test-project/gradle/wrapper/gradle-wrapper.jar b/src/test-project/gradle/wrapper/gradle-wrapper.jar index e708b1c0..943f0cbf 100644 Binary files a/src/test-project/gradle/wrapper/gradle-wrapper.jar and b/src/test-project/gradle/wrapper/gradle-wrapper.jar differ diff --git a/src/test-project/gradle/wrapper/gradle-wrapper.properties b/src/test-project/gradle/wrapper/gradle-wrapper.properties index f42e62f3..3499ded5 100644 --- a/src/test-project/gradle/wrapper/gradle-wrapper.properties +++ b/src/test-project/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/test-project/gradlew b/src/test-project/gradlew index 4f906e0c..65dcd68d 100755 --- a/src/test-project/gradlew +++ b/src/test-project/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,105 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/src/test-project/gradlew.bat b/src/test-project/gradlew.bat index 107acd32..93e3f59f 100644 --- a/src/test-project/gradlew.bat +++ b/src/test-project/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/src/test-project/settings.gradle b/src/test-project/settings.gradle deleted file mode 100644 index 0e5dee6f..00000000 --- a/src/test-project/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'test-project' -includeBuild '../..' diff --git a/src/test-project/settings.gradle.kts b/src/test-project/settings.gradle.kts new file mode 100644 index 00000000..0f7d0222 --- /dev/null +++ b/src/test-project/settings.gradle.kts @@ -0,0 +1,2 @@ +rootProject.name = "test-project" +includeBuild("../..") diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/LibraryTestBase.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/LibraryTestBase.java index 2e34d871..faf9239d 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/LibraryTestBase.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/LibraryTestBase.java @@ -21,7 +21,6 @@ import org.junit.jupiter.api.extension.ExtendWith; import java.time.Duration; -import java.util.logging.Level; import java.util.logging.Logger; /** @@ -33,25 +32,16 @@ public class LibraryTestBase { protected static final Logger LOGGER = Logger.getLogger(LibraryTestBase.class.getName()); private static final IntelliJVersion communityIdeaVersion = IntelliJVersion.COMMUNITY_V_2024_2; - private static final IntelliJVersion ultimateIdeaVersion = IntelliJVersion.ULTIMATE_V_2024_2; protected static RemoteRobot remoteRobot; protected static int ideaVersionInt; private static boolean intelliJHasStarted = false; - private static final int port = 8580; + private static final int TEST_RUNNER_PORT = 8580; @BeforeAll protected static void startIntelliJ() { if (!intelliJHasStarted) { - String taskName = System.getProperty("task.name"); - if (taskName != null && taskName.equalsIgnoreCase("integrationUITestUltimate")) { - // Run UI tests for ultimate version - ideaVersionInt = ultimateIdeaVersion.toInt(); - remoteRobot = UITestRunner.runIde(ultimateIdeaVersion, port); - } else { - // Run UI tests for community version - ideaVersionInt = communityIdeaVersion.toInt(); - remoteRobot = UITestRunner.runIde(communityIdeaVersion, port); - } + ideaVersionInt = communityIdeaVersion.toInt(); + remoteRobot = UITestRunner.runIde(communityIdeaVersion, TEST_RUNNER_PORT); intelliJHasStarted = true; Runtime.getRuntime().addShutdownHook(new CloseIntelliJBeforeQuit()); diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/information/CodeWithMeDialogTest.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/information/CodeWithMeDialogTest.java index 183a5f7f..e353a9cd 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/information/CodeWithMeDialogTest.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/information/CodeWithMeDialogTest.java @@ -50,10 +50,10 @@ public static void prepareProject() { newProjectFirstPage.setProjectLocation(CreateCloseUtils.PROJECT_LOCATION); newProjectFirstPage.setLanguage("Java"); newProjectFirstPage.setBuildSystem("IntelliJ"); - newProjectFirstPage.setProjectSdkIfAvailable("11"); + newProjectFirstPage.setProjectSdkIfAvailable("17"); } else { newProjectFirstPage.selectNewProjectType("Java"); - newProjectFirstPage.setProjectSdkIfAvailable("17"); + newProjectFirstPage.setProjectSdkIfAvailable("11"); newProjectDialogWizard.next(); newProjectDialogWizard.next(); AbstractNewProjectFinalPage finalPage = getFinalPage(newProjectDialogWizard, CreateCloseUtils.NewProjectType.PLAIN_JAVA); diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/project_manipulation/NewProjectDialogTest.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/project_manipulation/NewProjectDialogTest.java index 2026541e..913abecf 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/project_manipulation/NewProjectDialogTest.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/project_manipulation/NewProjectDialogTest.java @@ -27,7 +27,6 @@ import com.redhat.devtools.intellij.commonuitest.utils.constants.ButtonLabels; import com.redhat.devtools.intellij.commonuitest.utils.constants.XPathDefinitions; import com.redhat.devtools.intellij.commonuitest.utils.project.CreateCloseUtils; -import com.redhat.devtools.intellij.commonuitest.utils.screenshot.ScreenshotUtils; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -38,6 +37,7 @@ import static com.intellij.remoterobot.search.locators.Locators.byXpath; import static com.redhat.devtools.intellij.commonuitest.utils.texttranformation.TextUtils.listOfRemoteTextToString; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -167,7 +167,7 @@ public void getSetModuleNameTest() { String newModuleName = currentModuleName + "1"; javaFinalPage.setModuleName(newModuleName); currentModuleName = javaFinalPage.getModuleName(); - assertTrue(currentModuleName.equals(newModuleName), "Currently set module name should be '" + newModuleName + BUT_IS + currentModuleName + "'."); + assertEquals(currentModuleName, newModuleName, "Currently set module name should be '" + newModuleName + BUT_IS + currentModuleName + "'."); } @Test @@ -184,7 +184,7 @@ public void getSetContentRootTest() { String newContentRoot = currentContentRoot + "1"; javaFinalPage.setContentRoot(newContentRoot); currentContentRoot = javaFinalPage.getContentRoot(); - assertTrue(currentContentRoot.equals(newContentRoot), "Currently set content root location should be '" + newContentRoot + BUT_IS + currentContentRoot + "'."); + assertEquals(currentContentRoot, newContentRoot, "Currently set content root location should be '" + newContentRoot + BUT_IS + currentContentRoot + "'."); } @Test @@ -201,7 +201,7 @@ public void getSetModuleFileLocationTest() { String newModuleFileLocation = currentModuleFileLocation + "1"; javaFinalPage.setModuleFileLocation(newModuleFileLocation); currentModuleFileLocation = javaFinalPage.getModuleFileLocation(); - assertTrue(currentModuleFileLocation.equals(newModuleFileLocation), "Currently set module file location should be '" + newModuleFileLocation + BUT_IS + currentModuleFileLocation + "'."); + assertEquals(currentModuleFileLocation, newModuleFileLocation, "Currently set module file location should be '" + newModuleFileLocation + BUT_IS + currentModuleFileLocation + "'."); } @Test @@ -213,10 +213,10 @@ public void getSetProjectFormat() { javaFinalPage.setProjectFormat(AbstractNewProjectFinalPage.ProjectFormatType.IPR_FILE_BASED); AbstractNewProjectFinalPage.ProjectFormatType currentlySetProjectFormatType = javaFinalPage.getProjectFormat(); - assertTrue(currentlySetProjectFormatType.equals(AbstractNewProjectFinalPage.ProjectFormatType.IPR_FILE_BASED), "Currently set value in the 'Project format' combo box should be '" + AbstractNewProjectFinalPage.ProjectFormatType.IPR_FILE_BASED + BUT_IS + currentlySetProjectFormatType + "'."); + assertEquals(AbstractNewProjectFinalPage.ProjectFormatType.IPR_FILE_BASED, currentlySetProjectFormatType, "Currently set value in the 'Project format' combo box should be '" + AbstractNewProjectFinalPage.ProjectFormatType.IPR_FILE_BASED + BUT_IS + currentlySetProjectFormatType + "'."); javaFinalPage.setProjectFormat(AbstractNewProjectFinalPage.ProjectFormatType.IDEA_DIRECTORY_BASED); currentlySetProjectFormatType = javaFinalPage.getProjectFormat(); - assertTrue(currentlySetProjectFormatType.equals(AbstractNewProjectFinalPage.ProjectFormatType.IDEA_DIRECTORY_BASED), "Currently set value in the 'Project format' combo box should be '" + AbstractNewProjectFinalPage.ProjectFormatType.IDEA_DIRECTORY_BASED + BUT_IS + currentlySetProjectFormatType + "'."); + assertEquals(AbstractNewProjectFinalPage.ProjectFormatType.IDEA_DIRECTORY_BASED, currentlySetProjectFormatType, "Currently set value in the 'Project format' combo box should be '" + AbstractNewProjectFinalPage.ProjectFormatType.IDEA_DIRECTORY_BASED + BUT_IS + currentlySetProjectFormatType + "'."); } @Test @@ -343,10 +343,10 @@ public void setProjectSdkIfAvailableTest() { newProjectFirstPage.setProjectSdkIfAvailable("11"); ComboBoxFixture projectJdkComboBox = newProjectFirstPage.getProjectJdkComboBox(); String currentlySelectedProjectSdk = listOfRemoteTextToString(projectJdkComboBox.findAllText()); - assertTrue(currentlySelectedProjectSdk.contains("11"), "Selected project SDK should be Java 11 but is '" + currentlySelectedProjectSdk + "'"); + assertTrue(currentlySelectedProjectSdk.startsWith("11"), "Selected project SDK should be Java 11 but is '" + currentlySelectedProjectSdk + "'"); newProjectFirstPage.setProjectSdkIfAvailable("17"); currentlySelectedProjectSdk = listOfRemoteTextToString(projectJdkComboBox.findAllText()); - assertTrue(currentlySelectedProjectSdk.contains("17"), "Selected project SDK should be Java 17 but is '" + currentlySelectedProjectSdk + "'"); + assertTrue(currentlySelectedProjectSdk.startsWith("17"), "Selected project SDK should be Java 17 but is '" + currentlySelectedProjectSdk + "'"); } } @@ -426,13 +426,13 @@ private void testProjectNameAndLocationInputField(CreateCloseUtils.NewProjectTyp String newProjectName = currentProjectName + "1"; finalPage.setProjectName(newProjectName); currentProjectName = finalPage.getProjectName(); - assertTrue(currentProjectName.equals(newProjectName), "Currently set project name should be '" + newProjectName + BUT_IS + currentProjectName + "'."); + assertEquals(currentProjectName, newProjectName, "Currently set project name should be '" + newProjectName + BUT_IS + currentProjectName + "'."); String currentProjectLocation = finalPage.getProjectLocation(); String newProjectLocation = currentProjectLocation + "2"; finalPage.setProjectLocation(newProjectLocation); currentProjectLocation = finalPage.getProjectLocation(); - assertTrue(currentProjectLocation.equals(newProjectLocation), "Currently set project location should be '" + newProjectLocation + BUT_IS + currentProjectLocation + "'."); + assertEquals(currentProjectLocation, newProjectLocation, "Currently set project location should be '" + newProjectLocation + BUT_IS + currentProjectLocation + "'."); } private void testOpenArtifactCoordinatesMavenGradle(CreateCloseUtils.NewProjectType newProjectType) { @@ -484,7 +484,7 @@ private void testArtifactCoordinatesAttributes(CreateCloseUtils.NewProjectType n currentValue = mavenGradleFinalPage.getVersion(); break; } - assertTrue(currentValue.equals(newValue), "Currently set '" + attribute + "' should be '" + newValue + BUT_IS + currentValue + "'."); + assertEquals(currentValue, newValue, "Currently set '" + attribute + "' should be '" + newValue + BUT_IS + currentValue + "'."); } private boolean isMoreSettingsOpened(JavaNewProjectFinalPage javaFinalPage) { @@ -511,15 +511,15 @@ private enum ArtifactCoordinatesAttributes { ARTIFACT_ID("artifact ID"), VERSION("version"); - private final String textReperentation; + private final String textRepresentation; ArtifactCoordinatesAttributes(String textRepresentation) { - this.textReperentation = textRepresentation; + this.textRepresentation = textRepresentation; } @Override public String toString() { - return this.textReperentation; + return this.textRepresentation; } } }