Skip to content

Commit

Permalink
ci(simulator-ui): add playwright test suite to ensure ui is behaving …
Browse files Browse the repository at this point in the history
…correctly

use `npm run e2e` in `simulator-ui` to run the tests.

Co-authored-by: phos-web <[email protected]>
Co-authored-by: flumiii <[email protected]>
  • Loading branch information
3 people committed Sep 30, 2024
1 parent 11d06b5 commit a646c0f
Show file tree
Hide file tree
Showing 40 changed files with 2,152 additions and 1,912 deletions.
31 changes: 30 additions & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------

name: main
name: frontend
on:
pull_request:
branches:
Expand Down Expand Up @@ -62,3 +62,32 @@ jobs:
- name: Frontend Tests
run: npm run ci:frontend:test
working-directory: simulator-ui
e2e:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci --cache .npm --force
working-directory: simulator-ui
- name: Install Playwright Browsers
run: npx playwright install --with-deps
working-directory: simulator-ui
- name: Run Playwright tests
run: npm run e2e
working-directory: simulator-ui
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: test-results
path: simulator-ui/test-results/
retention-days: 30
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: simulator-ui/playwright-report/
retention-days: 30
1 change: 1 addition & 0 deletions simulator-ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"sourceType": "module",
"project": ["./tsconfig.app.json", "./tsconfig.spec.json"]
},
"ignorePatterns": ["playwright-report"],
"rules": {
"@angular-eslint/component-selector": [
"error",
Expand Down
4 changes: 3 additions & 1 deletion simulator-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ Desktop.ini
.eslintcache

######################
# Code coverage
# Test results
######################
/coverage/
/.nyc_output/
/test-results/
/playwright-report/
Loading

0 comments on commit a646c0f

Please sign in to comment.