mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-02-16 16:39:46 +03:00
feat: run integration tests using nightwatch js
This commit is contained in:
parent
90e60b0486
commit
9cc667851c
2 changed files with 22 additions and 0 deletions
3
Makefile
3
Makefile
|
@ -123,6 +123,9 @@ test: frontend-test frontend ## Run all available tests
|
|||
cargo test --no-fail-fast
|
||||
# ./scripts/tests.sh
|
||||
|
||||
test.integration: ## run integration tests with nightwatch.js
|
||||
./scripts/integration.sh
|
||||
|
||||
xml-test-coverage: migrate ## Generate code coverage report in XML format
|
||||
$(call cache_bust)
|
||||
cargo tarpaulin -t 1200 --out Xml
|
||||
|
|
19
scripts/integration.sh
Executable file
19
scripts/integration.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -Eeuo pipefail
|
||||
trap cleanup SIGINT SIGTERM ERR EXIT
|
||||
|
||||
readonly PROJECT_ROOT=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
|
||||
|
||||
source $PROJECT_ROOT/scripts/lib.sh
|
||||
|
||||
|
||||
|
||||
docker-compose down -v --remove-orphans || true
|
||||
docker-compose up -d
|
||||
cd $(mktemp -d)
|
||||
git clone https://github.com/mCaptcha/integration .
|
||||
yarn install
|
||||
npx nightwatch ./test/mCaptcha.ts
|
||||
cd $PROJECT_ROOT
|
||||
docker-compose down -v --remove-orphans || true
|
Loading…
Add table
Reference in a new issue