Skip to content

Commit

Permalink
Use quarkus-playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
ia3andy committed Sep 12, 2023
1 parent 1160e46 commit 48e3315
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 84 deletions.
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ The library also brings a very elegant way to do e2e testing using https://githu
import com.microsoft.playwright.BrowserContext;
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Response;
import io.quarkiverse.quinoa.testing.QuarkusPlaywrightManager;
import io.quarkiverse.playwright.WithPlaywright;
import io.quarkiverse.quinoa.testing.QuinoaTestProfiles;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkiverse.playwright.InjectPlaywright;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
Expand All @@ -367,7 +367,7 @@ import java.net.URL;
@TestProfile(QuinoaTestProfiles.Enable.class)
@QuarkusTestResource(QuarkusPlaywrightManager.class)
public class MyWebUITest {
@QuarkusPlaywrightManager.InjectPlaywright
@InjectPlaywright
BrowserContext context;
@TestHTTPResource("/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Response;

import io.quarkiverse.quinoa.testing.QuarkusPlaywrightManager;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkiverse.playwright.WithPlaywright;
import io.quarkiverse.playwright.InjectPlaywright;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;

@QuarkusTest
@TestProfile(TestProfiles.RootPathTests.class)
@QuarkusTestResource(QuarkusPlaywrightManager.class)
@WithPlaywright
public class QuinoaRootPathTest {

@QuarkusPlaywrightManager.InjectPlaywright
@InjectPlaywright
BrowserContext context;

@TestHTTPResource("/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Response;

import io.quarkiverse.quinoa.testing.QuarkusPlaywrightManager;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkiverse.playwright.WithPlaywright;
import io.quarkiverse.playwright.InjectPlaywright;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
Expand All @@ -24,7 +24,7 @@
@QuarkusTestResource(QuarkusPlaywrightManager.class)
public class QuinoaUIAngularTest {

@QuarkusPlaywrightManager.InjectPlaywright
@InjectPlaywright
BrowserContext context;

@TestHTTPResource("/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Response;

import io.quarkiverse.quinoa.testing.QuarkusPlaywrightManager;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkiverse.playwright.WithPlaywright;
import io.quarkiverse.playwright.InjectPlaywright;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
Expand All @@ -21,7 +21,7 @@
@QuarkusTestResource(QuarkusPlaywrightManager.class)
public class QuinoaUILitTest {

@QuarkusPlaywrightManager.InjectPlaywright
@InjectPlaywright
BrowserContext context;

@TestHTTPResource("/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Response;

import io.quarkiverse.quinoa.testing.QuarkusPlaywrightManager;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkiverse.playwright.WithPlaywright;
import io.quarkiverse.playwright.InjectPlaywright;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
import io.restassured.http.ContentType;

@QuarkusTest
@TestProfile(TestProfiles.ReactTests.class)
@QuarkusTestResource(QuarkusPlaywrightManager.class)
@WithPlaywright
public class QuinoaUIReactTest {

@QuarkusPlaywrightManager.InjectPlaywright
@InjectPlaywright
BrowserContext context;

@TestHTTPResource("/index.html")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Response;

import io.quarkiverse.quinoa.testing.QuarkusPlaywrightManager;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkiverse.playwright.WithPlaywright;
import io.quarkiverse.playwright.InjectPlaywright;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;

@QuarkusTest
@TestProfile(TestProfiles.VueTests.class)
@QuarkusTestResource(QuarkusPlaywrightManager.class)
@WithPlaywright
public class QuinoaUIVueTest {

@QuarkusPlaywrightManager.InjectPlaywright
@InjectPlaywright
BrowserContext context;

@TestHTTPResource("/")
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.version>3.3.0</quarkus.version>
<playright.version>1.37.0</playright.version>
<quarkus-playright.version>0.0.1</quarkus-playright.version>
<assertj.version>3.24.2</assertj.version>
<frontend-plugin.version>1.14.0</frontend-plugin.version>
</properties>
Expand Down
11 changes: 3 additions & 8 deletions testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@
<name>Quarkus - Quinoa - Testing</name>
<dependencies>
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>${playright.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>driver-bundle</artifactId>
<version>${playright.version}</version>
<groupId>io.quarkiverse.playwright</groupId>
<artifactId>quarkus-playwright</artifactId>
<version>${quarkus-playright.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down

This file was deleted.

0 comments on commit 48e3315

Please sign in to comment.