From 2752323738871fa131ac89e51aa191e7b3c50257 Mon Sep 17 00:00:00 2001 From: melloware Date: Mon, 28 Oct 2024 09:11:39 -0400 Subject: [PATCH] Refactor to no longer have Test jar --- README.md | 4 +-- .../deployment/PlaywrightProcessor.java | 2 +- docs/modules/ROOT/pages/index.adoc | 4 +-- integration-tests/pom.xml | 11 ++++---- .../org/acme/WithDefaultPlaywrightTest.java | 2 +- .../org/acme/WithFirefoxPlaywrightTest.java | 2 +- pom.xml | 3 +-- runtime/pom.xml | 11 +++++++- .../playwright/InjectPlaywright.java | 0 .../{runtime => }/PlaywrightRecorder.java | 2 +- .../playwright/QuarkusPlaywrightManager.java | 0 .../playwright/WithPlaywright.java | 0 testing/pom.xml | 25 ------------------- 13 files changed, 24 insertions(+), 42 deletions(-) rename {testing => runtime}/src/main/java/io/quarkiverse/playwright/InjectPlaywright.java (100%) rename runtime/src/main/java/io/quarkiverse/playwright/{runtime => }/PlaywrightRecorder.java (98%) rename {testing => runtime}/src/main/java/io/quarkiverse/playwright/QuarkusPlaywrightManager.java (100%) rename {testing => runtime}/src/main/java/io/quarkiverse/playwright/WithPlaywright.java (100%) delete mode 100644 testing/pom.xml diff --git a/README.md b/README.md index 87f58b1..d790cf0 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ All the information you need to use Quarkus Playwright is in the [user documenta The primary use case for Playwright is integration with `@QuarkusTest` for end-to-end testing of your application. You can easily create effective cross-browser end-to-end tests for your Quarkus web application using Playwright with frameworks such as Qute, Quinoa, Renarde, Web-Bundler, and MyFaces. Playwright Test was specifically designed to meet the requirements of end-to-end testing. It supports all modern rendering engines, including Chromium, WebKit, and Firefox. You can run tests on Windows, Linux, and macOS—either locally or in CI—both in headless and headed modes, with native mobile emulation for Google Chrome on Android and Mobile Safari. -Just add the `test` dependency to pom.xml: +Just add the dependency as `test` to pom.xml: ```xml io.quarkiverse.playwright - quarkus-playwright-test + quarkus-playwright ${playwright.version} test diff --git a/deployment/src/main/java/io/quarkiverse/playwright/deployment/PlaywrightProcessor.java b/deployment/src/main/java/io/quarkiverse/playwright/deployment/PlaywrightProcessor.java index c88ba00..fc54ecd 100644 --- a/deployment/src/main/java/io/quarkiverse/playwright/deployment/PlaywrightProcessor.java +++ b/deployment/src/main/java/io/quarkiverse/playwright/deployment/PlaywrightProcessor.java @@ -18,7 +18,7 @@ import com.microsoft.playwright.options.Timing; import com.microsoft.playwright.options.ViewportSize; -import io.quarkiverse.playwright.runtime.PlaywrightRecorder; +import io.quarkiverse.playwright.PlaywrightRecorder; import io.quarkus.deployment.IsNormal; import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index d7ced97..a858fea 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -11,13 +11,13 @@ https://playwright.dev/[Playwright] is an open-source automation library designe The primary use case for Playwright is integration with `@QuarkusTest` for end-to-end testing of your application. You can easily create effective cross-browser end-to-end tests for your Quarkus web application using Playwright with frameworks such as Qute, Quinoa, Renarde, Web-Bundler, and MyFaces. Playwright Test was specifically designed to meet the requirements of end-to-end testing. It supports all modern rendering engines, including Chromium, WebKit, and Firefox. You can run tests on Windows, Linux, and macOS—either locally or in CI—both in headless and headed modes, with native mobile emulation for Google Chrome on Android and Mobile Safari. -Just add the `test` dependency to `pom.xml`: +Just add the dependency as `test` to your `pom.xml`: [source,xml,subs=attributes+] ---- io.quarkiverse.playwright - quarkus-playwright-test + quarkus-playwright {project-version} test diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index a06f3fd..4f8c93d 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -40,17 +40,16 @@ 3.7.1 provided - - io.quarkiverse.playwright - quarkus-playwright-test - ${project.version} - test - io.rest-assured rest-assured test + + io.quarkus + quarkus-junit5 + true + diff --git a/integration-tests/src/test/java/org/acme/WithDefaultPlaywrightTest.java b/integration-tests/src/test/java/org/acme/WithDefaultPlaywrightTest.java index 21eecd2..73b5345 100644 --- a/integration-tests/src/test/java/org/acme/WithDefaultPlaywrightTest.java +++ b/integration-tests/src/test/java/org/acme/WithDefaultPlaywrightTest.java @@ -42,4 +42,4 @@ public void testIndex() { Assertions.assertEquals("Hello from RESTEasy Reactive", greeting); } -} +} \ No newline at end of file diff --git a/integration-tests/src/test/java/org/acme/WithFirefoxPlaywrightTest.java b/integration-tests/src/test/java/org/acme/WithFirefoxPlaywrightTest.java index 9b059e7..2812983 100644 --- a/integration-tests/src/test/java/org/acme/WithFirefoxPlaywrightTest.java +++ b/integration-tests/src/test/java/org/acme/WithFirefoxPlaywrightTest.java @@ -44,4 +44,4 @@ public void testIndex() { Assertions.assertEquals("Hello from RESTEasy Reactive", greeting); } -} +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index e0c2190..9016db9 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,6 @@ deployment runtime - testing scm:git:git@github.com:quarkiverse/quarkus-playwright.git @@ -106,4 +105,4 @@ - + \ No newline at end of file diff --git a/runtime/pom.xml b/runtime/pom.xml index cd25e7b..de53efa 100644 --- a/runtime/pom.xml +++ b/runtime/pom.xml @@ -23,6 +23,15 @@ com.microsoft.playwright driver-bundle + + org.apache.commons + commons-lang3 + + + io.quarkus + quarkus-junit5 + true + @@ -63,4 +72,4 @@ - + \ No newline at end of file diff --git a/testing/src/main/java/io/quarkiverse/playwright/InjectPlaywright.java b/runtime/src/main/java/io/quarkiverse/playwright/InjectPlaywright.java similarity index 100% rename from testing/src/main/java/io/quarkiverse/playwright/InjectPlaywright.java rename to runtime/src/main/java/io/quarkiverse/playwright/InjectPlaywright.java diff --git a/runtime/src/main/java/io/quarkiverse/playwright/runtime/PlaywrightRecorder.java b/runtime/src/main/java/io/quarkiverse/playwright/PlaywrightRecorder.java similarity index 98% rename from runtime/src/main/java/io/quarkiverse/playwright/runtime/PlaywrightRecorder.java rename to runtime/src/main/java/io/quarkiverse/playwright/PlaywrightRecorder.java index c0570f5..59560f3 100644 --- a/runtime/src/main/java/io/quarkiverse/playwright/runtime/PlaywrightRecorder.java +++ b/runtime/src/main/java/io/quarkiverse/playwright/PlaywrightRecorder.java @@ -1,4 +1,4 @@ -package io.quarkiverse.playwright.runtime; +package io.quarkiverse.playwright; import java.io.IOException; import java.net.URI; diff --git a/testing/src/main/java/io/quarkiverse/playwright/QuarkusPlaywrightManager.java b/runtime/src/main/java/io/quarkiverse/playwright/QuarkusPlaywrightManager.java similarity index 100% rename from testing/src/main/java/io/quarkiverse/playwright/QuarkusPlaywrightManager.java rename to runtime/src/main/java/io/quarkiverse/playwright/QuarkusPlaywrightManager.java diff --git a/testing/src/main/java/io/quarkiverse/playwright/WithPlaywright.java b/runtime/src/main/java/io/quarkiverse/playwright/WithPlaywright.java similarity index 100% rename from testing/src/main/java/io/quarkiverse/playwright/WithPlaywright.java rename to runtime/src/main/java/io/quarkiverse/playwright/WithPlaywright.java diff --git a/testing/pom.xml b/testing/pom.xml deleted file mode 100644 index 973dcff..0000000 --- a/testing/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - 4.0.0 - - io.quarkiverse.playwright - quarkus-playwright-parent - 999-SNAPSHOT - - quarkus-playwright-test - Quarkus Playwright - Testing - - - com.microsoft.playwright - playwright - - - com.microsoft.playwright - driver-bundle - - - io.quarkus - quarkus-junit5 - - -