From 05340524d1ee293c677d7a75878ea3b2b6638dbe Mon Sep 17 00:00:00 2001 From: Andrei Solntsev Date: Wed, 25 Dec 2024 00:58:56 +0200 Subject: [PATCH] run "chrome" task instead of just all tests --- .github/workflows/build.yml | 4 ++-- build.gradle | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf083ae..44a632b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: - name: Compile run: ./gradlew testClasses --no-daemon --console=plain - name: Run tests - run: ./gradlew test --no-daemon --console=plain -Dselenide.headless=true + run: ./gradlew chrome --no-daemon --console=plain -Dselenide.headless=true - name: Upload test report uses: actions/upload-artifact@v4 if: always() @@ -52,7 +52,7 @@ jobs: - name: Compile run: mvn test-compile - name: Run tests - run: mvn test + run: mvn test -P chrome - name: Upload test report uses: actions/upload-artifact@v4 if: always() diff --git a/build.gradle b/build.gradle index 300cd5d..63564b2 100644 --- a/build.gradle +++ b/build.gradle @@ -55,25 +55,25 @@ tasks.withType(Test).configureEach { testTask -> testTask.useJUnitPlatform() } -task chrome(type: Test) { +tasks.register("chrome", Test) { systemProperties['selenide.browser'] = 'chrome' systemProperties['selenide.headless'] = 'true' } -task firefox(type: Test) { +tasks.register("firefox", Test) { systemProperties['selenide.browser'] = 'firefox' systemProperties['selenide.headless'] = 'true' } -task ie(type: Test) { +tasks.register("ie", Test) { systemProperties['selenide.browser'] = 'ie' } -task edge(type: Test) { +tasks.register("edge", Test) { systemProperties['selenide.browser'] = 'edge' } // You must enable the 'Allow Remote Automation' option in Safari's Develop menu to control Safari via WebDriver. -task safari(type: Test) { +tasks.register("safari", Test) { systemProperties['selenide.browser'] = 'safari' }