Skip to content

Commit 994fa0d

Browse files
authored
Create Playwright test harness (#38)
* added a github action for tests * added playwright test and github action to execute test * changed command for playwright github action * trying run github action again * changing port for playwright test * changed port for playwright tests * removed port * changed the playwright config file because github action keeps failing * restored old playwright config file * changed script * reinstalled playwright * added port * changed port * added a waitForSelector in the test * reverted start command and added a test readme file * changed test readme * updated with recommendations from Fran * updated github action to run on all branches
1 parent 306348a commit 994fa0d

File tree

7 files changed

+185
-14399
lines changed

7 files changed

+185
-14399
lines changed

.github/workflows/playwright.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Playwright Tests
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Triggers the workflow on push or pull request and nightly
6+
push:
7+
pull_request:
8+
schedule:
9+
# nightly
10+
- cron: '0 0 * * *'
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
16+
jobs:
17+
# This workflow contains a single job called "build"
18+
playwright_tests:
19+
# Runs on an ubuntu runner
20+
runs-on: ubuntu-latest
21+
22+
strategy:
23+
matrix:
24+
node-version: [14.x, 16.x, 18.x]
25+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: actions/setup-node@v3
30+
- name: Install dependencies
31+
run: npm ci
32+
- name: Install Playwright
33+
run: npx playwright install --with-deps
34+
- name: Build production build
35+
run: npm run build
36+
- name: Run playwright tests
37+
run: npm run playwright_test

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,10 @@ testem.log
4444

4545
# System Files
4646
.DS_Store
47-
Thumbs.db
47+
Thumbs.db
48+
/test-results/
49+
/playwright-report/
50+
/playwright/.cache/
51+
/test-results/
52+
/playwright-report/
53+
/playwright/.cache/

0 commit comments

Comments
 (0)