Skip to content

Commit 91f230f

Browse files
4manasamanasa
andauthored
added e2e automation testcases for portal and embedded mediaco app (#70)
* added e2e automation testcases for portal and embedded mediaco app * added e2e testcases * updated the readme file * updated the readme file * added e2e testcases * modified as per comments * added .angular to .gitignore file Co-authored-by: manasa <[email protected]>
1 parent 5d8545b commit 91f230f

Some content is hidden

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

41 files changed

+1326
-47
lines changed

.github/workflows/playwright.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Playwright Tests
2+
on:
3+
push:
4+
branches: [ main, master ]
5+
pull_request:
6+
branches: [ main, master ]
7+
jobs:
8+
test:
9+
timeout-minutes: 60
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: '14.x'
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Install Playwright
19+
run: npx playwright install --with-deps
20+
- uses: actions/upload-artifact@v2
21+
if: always()
22+
with:
23+
name: playwright-report
24+
path: playwright-report/
25+
retention-days: 30

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,7 @@ constellation/*
5555
# localhost cert files
5656
/private.*
5757
/ssl.conf
58+
test-results/
59+
playwright-report/
60+
61+
.angular

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,58 @@ Note that the examples above are for the default configuration. If you change th
121121
122122
---
123123
124+
## Testing the application
125+
<br>
126+
127+
You can test both **Portal** and **Embedded** scenarios by executing the following commands in the terminal:
128+
129+
1. ```
130+
$ npm run build:dev:ci
131+
```
132+
133+
2. ```
134+
$ npm run start-dev (and leave it running)
135+
```
136+
137+
3. Open a different terminal window or tab (since start-dev is still running)
138+
139+
4. **Executing the tests**:
140+
141+
4.1 Execute the Portal test-
142+
```
143+
$ npm run test -- portal
144+
```
145+
146+
or <br>
147+
148+
4.2 Execute the Embedded test:
149+
```
150+
$ npm run test -- embedded
151+
```
152+
153+
or <br>
154+
155+
4.3 Execute both tests simultaneously-
156+
```
157+
$ npm run test
158+
```
159+
160+
<br>
161+
162+
5. **Getting the test report**:
163+
164+
To get the test report of last run:
165+
166+
```
167+
npx playwright show-report
168+
```
169+
170+
> **NOTE**: These tests execute the sample **MediaCo** application.
171+
172+
<br>
173+
174+
---
175+
124176
## Some setup and troubleshooting tips
125177
<br>
126178

0 commit comments

Comments
 (0)