test: add integration tests

This commit is contained in:
Elio Bischof
2023-06-15 22:42:13 +02:00
parent 667f120843
commit 91e43465c7
20 changed files with 931 additions and 879 deletions

View File

@@ -7,10 +7,15 @@
"test:watch": "concurrently --kill-others 'npm:test:unit:watch' 'npm:test:integration:watch'",
"test:unit": "jest",
"test:unit:watch": "jest --watch",
"test:integration": "ZITADEL_API_URL=http://localhost:50051 ZITADEL_ORG_ID=none ZITADEL_SERVICE_USER_TOKEN=none start-server-and-test dev http://localhost:3000 \"test:integration:run\"",
"test:integration:watch": "start-server-and-test dev http://localhost:3000 \"pnpm nodemon -e js,jsx,ts,tsx,css,scss --ignore \\\"__test__/**\\\" --exec \\\"pnpm run test:integration:run\\\"\"",
"test:integration": "pnpm mock:build && concurrently --names 'mock,test' --success command-test --kill-others 'pnpm:mock' 'ZITADEL_API_URL=http://localhost:22222 start-server-and-test dev http://localhost:3000 \"test:integration:run\"'",
"test:integration:watch": "concurrently --kill-others 'pnpm:mock' 'ZITADEL_API_URL=http://localhost:22222 start-server-and-test dev http://localhost:3000 \"pnpm nodemon -e js,jsx,ts,tsx,css,scss --ignore \\\"__test__/**\\\" --exec \\\"pnpm test:integration:run\\\"\"'",
"test:integration:run": "cypress run --quiet",
"test:integration:open": "cypress open",
"mock": "pnpm mock:build && pnpm mock:run",
"mock:run": "pnpm mock:destroy && docker run --rm --name zitadel-mock-grpc-server --publish 22220:22220 --publish 22222:22222 zitadel-mock-grpc-server",
"mock:build": "DOCKER_BUILDKIT=1 docker build --tag zitadel-mock-grpc-server ./mock",
"mock:build:nocache": "pnpm mock:build --no-cache",
"mock:destroy": "docker rm --force zitadel-mock-grpc-server 2>/dev/null",
"lint": "next lint && prettier --check .",
"lint:fix": "prettier --write .",
"lint-staged": "lint-staged",