Skip to content

frontend: implement deleteUser() without checks + tests #5112

frontend: implement deleteUser() without checks + tests

frontend: implement deleteUser() without checks + tests #5112

name: 'Frontend tests'
on: [push]
jobs:
unit-tests:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{vars.NODE_VERSION}}
- name: Npm install
run: npm ci
- name: Run unit tests
run: npm test
e2e:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK ${{vars.JAVA_VERSION}}
uses: actions/setup-java@v4
with:
java-version: ${{vars.JAVA_VERSION}}
distribution: 'adopt'
- uses: abhi1693/[email protected]
with:
browser: chrome
version: latest
- name: run keycloak docker
run: |
docker run -d \
--name my_keycloak \
-e KC_BOOTSTRAP_ADMIN_USERNAME=admin26 \
-e KC_BOOTSTRAP_ADMIN_PASSWORD=keycloak26 \
-v ./docker/config/realm-export-pitc.json:/opt/keycloak/data/import/realm-pitc.json \
-p 8544:8080 \
quay.io/keycloak/keycloak:26.0.1 \
start-dev --import-realm
- name: start backend
run: cd ./backend && mvn spring-boot:run -Dspring-boot.run.profiles=integration-test &
- name: Cypress run e2e tests
uses: cypress-io/github-action@v6
with:
working-directory: frontend
start: npm start
wait-on: 'http://pitc.okr.localhost:8080/config, http://pitc.okr.localhost:4200, http://localhost:8544'
wait-on-timeout: 120
browser: chrome
headed: true
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-screenshots
path: frontend/cypress/screenshots
- name: remove docker containers
run: docker ps -aq | xargs -r docker rm -f