Skip to content

Commit 9a1f0f6

Browse files
Automated tests (#30)
* feat(loama): setup playwright + basic tests * feat(tests): add public permission test * feat(tests): add control permission + navigation tests * feat(ci): add github action * docs: update changelog * fix(ci): use docker image + update version in package.json * docs: add more test setup documentation * test(permissions): disable page caching on pod route * fix(config): force playwright to run 1 test at a time in one browser * chore(playwright): only test in chromium * fix(tests): set default timeout high + specific timeout's on expected expect's * test(permissionTable): add test for disable & delete button * fix(permissionTableSpec): await to make sure pages are updated * chore: update lock file * chore: update primevue * chore: disable a unfixable check * Modified tests to modified ui; playwright version bump * doc --------- Co-authored-by: Martin Vanbrabant <martin.vanbrabant@ugent.be>
1 parent 934edbb commit 9a1f0f6

22 files changed

+4745
-399
lines changed

.github/workflows/cd.yml

Lines changed: 0 additions & 111 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 166 deletions
This file was deleted.

.github/workflows/playwright.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Playwright Tests
2+
on:
3+
push:
4+
branches: [ development ]
5+
pull_request:
6+
branches: [ development ]
7+
jobs:
8+
test:
9+
timeout-minutes: 60
10+
runs-on: ubuntu-latest
11+
container:
12+
image: mcr.microsoft.com/playwright:v1.47.0-jammy
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: yarn
20+
- name: Run install
21+
uses: borales/actions-yarn@v5
22+
with:
23+
cmd: install
24+
- run: cd loama
25+
- name: Build repo
26+
uses: borales/actions-yarn@v5
27+
with:
28+
cmd: build
29+
- name: Install Playwright Browsers
30+
uses: borales/actions-yarn@v5
31+
with:
32+
cmd: playwright install --with-deps
33+
dir: loama
34+
- name: Run playwright tests
35+
uses: borales/actions-yarn@v5
36+
with:
37+
cmd: test
38+
dir: loama
39+
- uses: actions/upload-artifact@v4
40+
if: ${{ !cancelled() }}
41+
with:
42+
name: playwright-report
43+
path: loama/playwright-report/
44+
retention-days: 30

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ node_modules/
22
dist/
33
build/
44
.env
5+
pods/
56

67
.nx/cache
78
.nx/workspace-data

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add automated UI tests on ./loama
13+
- Add Github action to run UI tests on PR to default branch
14+
1015
## [0.1.0] - 2025-02-20
1116

1217
### Added

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,9 @@ Now you can find loama at <http://localhost:5173>, or in a URL with a path, if y
9696
2. `docker compose up -d --wait`
9797

9898
This will spin up a Community Solid Server on port 3000.
99+
100+
### Automated tests
101+
102+
The `./loama` subproject contains automated tests and these are added to the github workflow.
103+
104+
See the local [README](./loama/README.md) for details to execute these tests locally.

css/config/seeds.json

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
[
2-
{
3-
"email": "hello@example.com",
4-
"password": "abc123",
5-
"pods": [
6-
{ "name": "pod1" }
7-
]
8-
},
9-
{
10-
"email": "hello2@example.com",
11-
"password": "123abc",
12-
"pods": [
13-
{ "name": "pod2" },
14-
{ "name": "pod3" }
15-
]
16-
}
2+
{
3+
"email": "hello@example.com",
4+
"password": "abc123",
5+
"pods": [
6+
{
7+
"name": "pod1"
8+
}
9+
]
10+
},
11+
{
12+
"email": "hello2@example.com",
13+
"password": "123abc",
14+
"pods": [
15+
{
16+
"name": "pod2"
17+
},
18+
{
19+
"name": "pod3"
20+
}
21+
]
22+
}
1723
]

0 commit comments

Comments
 (0)