Skip to content

Commit d7413bd

Browse files
authored
Merge pull request #63 from Diokuz/github-actions
migrate to playwright only
2 parents 1782623 + bff728d commit d7413bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1631
-6027
lines changed

.github/workflows

-22
This file was deleted.

.github/workflows/ci.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Node.js CI
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [16.x, 18.x]
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- name: yarn install
22+
run: yarn --frozen-lockfile
23+
- name: run unit tests
24+
run: yarn jest
25+
- name: install playwright browsers
26+
run: npx playwright install --with-deps
27+
- name: run browser tests
28+
run: yarn playwright test
29+
- name: Archive artifacts
30+
uses: actions/upload-artifact@v3
31+
with:
32+
name: playwright report
33+
path: |
34+
test-results
35+
playwright-report

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ coverage
1111
dist
1212
.yarn
1313
.yarnrc
14+
/test-results
15+
/playwright-report

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pretty-check:
1414
.PHONY: test
1515
test:
1616
NODE_OPTIONS="--unhandled-rejections=strict" yarn jest
17-
NODE_OPTIONS="--unhandled-rejections=strict" yarn jest --config __tests__/jest.playwright.config.js
17+
NODE_OPTIONS="--unhandled-rejections=strict" yarn playwright test
1818

1919
.PHONY: prepare
2020
prepare: ts pretty-write

__teremocks-playwright__/localhost-api/get-q-a.json

-29
This file was deleted.

__teremocks-playwright__/localhost-api/get-q-ab.json

-29
This file was deleted.

__teremocks-playwright__/localhost-api/get-q-abc.json

-29
This file was deleted.

__teremocks-playwright__/localhost-api/get-q-abcd.json

-29
This file was deleted.

__teremocks-post__/localhost-api/post-diet-sink-color.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"url": "http://localhost:3000/api",
44
"method": "POST",
55
"headers": {
6-
"accept": "application/json",
7-
"referer": "http://localhost:3000/",
8-
"content-type": "application/json"
6+
"content-type": "application/json",
7+
"origin": "http://localhost:3000",
8+
"referer": "http://localhost:3000/"
99
},
1010
"body": {
1111
"q": "abc"

__teremocks-post__/localhost-api/post-enemy-miss-fillet.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"url": "http://localhost:3000/api",
44
"method": "POST",
55
"headers": {
6-
"accept": "application/json",
7-
"referer": "http://localhost:3000/",
8-
"content-type": "application/json"
6+
"content-type": "application/json",
7+
"origin": "http://localhost:3000",
8+
"referer": "http://localhost:3000/"
99
},
1010
"body": {
1111
"q": "ab"

__teremocks-post__/localhost-api/post-jupiter-kitten-iowa.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"url": "http://localhost:3000/api",
44
"method": "POST",
55
"headers": {
6-
"accept": "application/json",
7-
"referer": "http://localhost:3000/",
8-
"content-type": "application/json"
6+
"content-type": "application/json",
7+
"origin": "http://localhost:3000",
8+
"referer": "http://localhost:3000/"
99
},
1010
"body": {
1111
"q": "a"

__teremocks-post__/localhost-api/post-social-december-moon.json

-28
This file was deleted.

__teremocks__/custom-mock-id/w.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"headers": {
66
"referer": "http://localhost:3000/"
77
},
8+
"body": null,
89
"resourceType": "fetch"
910
},
1011
"response": {

__teremocks__/localhost-api/get-bark-seven-emma.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"headers": {
66
"referer": "http://localhost:3000/"
77
},
8+
"body": null,
89
"resourceType": "fetch"
910
},
1011
"response": {

__teremocks__/localhost-api/get-q-a.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"headers": {
66
"referer": "http://localhost:3000/"
77
},
8+
"body": null,
89
"resourceType": "fetch"
910
},
1011
"response": {

__teremocks__/localhost-api/get-q-ab.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"headers": {
66
"referer": "http://localhost:3000/"
77
},
8+
"body": null,
89
"resourceType": "fetch"
910
},
1011
"response": {

__teremocks__/localhost-api/get-q-abc.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"headers": {
66
"referer": "http://localhost:3000/"
77
},
8+
"body": null,
89
"resourceType": "fetch"
910
},
1011
"response": {

__teremocks__/localhost-api/get-q-abcd.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"headers": {
66
"referer": "http://localhost:3000/"
77
},
8+
"body": null,
89
"resourceType": "fetch"
910
},
1011
"response": {

__teremocks__/localhost-api/get-q-click.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"headers": {
66
"referer": "http://localhost:3000/"
77
},
8+
"body": null,
89
"resourceType": "fetch"
910
},
1011
"response": {

0 commit comments

Comments
 (0)