Skip to content

Commit 023c619

Browse files
committed
Added readme
2 parents 27ba4f4 + 08b7d17 commit 023c619

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Playwright Tests
2+
3+
# Trigger the workflow on every push to any branch
4+
on:
5+
push:
6+
branches:
7+
- '**' # Run on every branch for every commit
8+
pull_request:
9+
branches:
10+
- '**' # Run on every pull request for any branch
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
# Step 1: Check out the repository code
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
21+
# Step 2: Set up JDK 17 (adjust if you're using a different version)
22+
- name: Set up JDK 17
23+
uses: actions/setup-java@v3
24+
with:
25+
java-version: '17'
26+
distribution: 'adopt'
27+
28+
# Step 3: Cache Maven dependencies to speed up future builds
29+
- name: Cache Maven dependencies
30+
uses: actions/cache@v3
31+
with:
32+
path: ~/.m2
33+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
34+
restore-keys: |
35+
${{ runner.os }}-maven
36+
37+
# Step 4: Run Maven to execute Playwright tests
38+
- name: Run Playwright Tests
39+
run: mvn verify

pom.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>org.example</groupId>
8+
<artifactId>my-first-playwright-test</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<maven.compiler.source>17</maven.compiler.source>
13+
<maven.compiler.target>17</maven.compiler.target>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
</properties>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>com.microsoft.playwright</groupId>
20+
<artifactId>playwright</artifactId>
21+
<version>1.47.0</version>
22+
<scope>test</scope>
23+
</dependency>
24+
<dependency>
25+
<groupId>org.junit.jupiter</groupId>
26+
<artifactId>junit-jupiter</artifactId>
27+
<version>5.11.1</version>
28+
<scope>test</scope>
29+
</dependency>
30+
</dependencies>
31+
32+
</project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.serenitydojo.playwright;
2+
3+
import com.microsoft.playwright.Browser;
4+
import com.microsoft.playwright.Page;
5+
import com.microsoft.playwright.Playwright;
6+
import org.junit.jupiter.api.Assertions;
7+
import org.junit.jupiter.api.Test;
8+
9+
public class ASimplePlaywrightTest {
10+
11+
@Test
12+
void shouldShowThePageTitle() {
13+
// TODO: Write your first playwright test here
14+
}
15+
}

0 commit comments

Comments
 (0)