Tests: Update test commands

This commit is contained in:
theresa 2022-09-01 10:44:29 +02:00
parent ec34015505
commit f493607b04
2 changed files with 9 additions and 23 deletions

View file

@ -44,16 +44,13 @@ test-pkg: reset-sqlite run-test-pkg
test-api: reset-sqlite run-test-api
test-short: reset-sqlite run-test-short
test-mariadb: reset-acceptance run-test-mariadb
testcafe: testcafe-auth-chromium
testcafe-auth-chromium: storage/acceptance acceptance-sqlite-restart run-testcafe-auth-chromium acceptance-sqlite-stop
testcafe-public-chromium: storage/acceptance acceptance-sqlite-restart run-testcafe-public-chromium acceptance-sqlite-stop
acceptance-run-chromium: storage/acceptance acceptance-auth-sqlite-restart acceptance-auth acceptance-auth-sqlite-stop acceptance-sqlite-restart acceptance acceptance-sqlite-stop
acceptance-run-chromium-short: storage/acceptance acceptance-auth-sqlite-restart acceptance-auth-short acceptance-auth-sqlite-stop acceptance-sqlite-restart acceptance-short acceptance-sqlite-stop
acceptance-auth-run-chromium: storage/acceptance acceptance-auth-sqlite-restart acceptance-auth acceptance-auth-sqlite-stop
acceptance-public-run-chromium: storage/acceptance acceptance-sqlite-restart acceptance acceptance-sqlite-stop
acceptance-run-firefox: storage/acceptance acceptance-auth-sqlite-restart acceptance-auth-firefox acceptance-auth-sqlite-stop acceptance-sqlite-restart acceptance-firefox acceptance-sqlite-stop
acceptance-auth-run-firefox: storage/acceptance acceptance-auth-sqlite-restart acceptance-auth-firefox acceptance-auth-sqlite-stop
acceptance-public-run-firefox: storage/acceptance acceptance-sqlite-restart acceptance-firefox acceptance-sqlite-stop
acceptance-run-chromium-short: storage/acceptance acceptance-auth-sqlite-restart acceptance-auth-short acceptance-auth-sqlite-stop acceptance-sqlite-restart acceptance-short acceptance-sqlite-stop
acceptance-run-chromium: storage/acceptance acceptance-auth-sqlite-restart acceptance-auth acceptance-auth-sqlite-stop acceptance-sqlite-restart acceptance acceptance-sqlite-stop
acceptance-run-firefox: storage/acceptance acceptance-auth-sqlite-restart acceptance-auth-firefox acceptance-auth-sqlite-stop acceptance-sqlite-restart acceptance-firefox acceptance-sqlite-stop
test-all: test acceptance-run-chromium
fmt: fmt-js fmt-go
clean-local: clean-local-config clean-local-cache
@ -205,33 +202,24 @@ watch-js:
test-js:
$(info Running JS unit tests...)
(cd frontend && env NODE_ENV=development BABEL_ENV=test npm run test)
acceptance-old:
$(info Running JS acceptance tests in Chrome...)
(cd frontend && npm run acceptance --first="chromium:headless" --second=plus --third=public && cd ..)
run-testcafe-auth-chromium:
$(info Running auth-mode tests in 'chromium:headless'...)
(cd frontend && npm run testcafe -- chromium:headless --test-grep "^(Common|Core)\:*" --test-meta mode=auth --config-file ./testcaferc.json "tests/acceptance")
run-testcafe-public-chromium:
acceptance:
$(info Running public-mode tests in 'chromium:headless'...)
(cd frontend && npm run testcafe -- chromium:headless --test-grep "^(Common|Core)\:*" --test-meta mode=public --config-file ./testcaferc.json "tests/acceptance")
acceptance:
$(info Running JS acceptance tests in Chrome...)
(cd frontend && npm run acceptance --first="chromium:headless" --second="^(Common|Core)\:*" --third=public --fourth="tests/acceptance" && cd ..)
acceptance-short:
$(info Running JS acceptance tests in Chrome...)
(cd frontend && npm run acceptance-short --first="chromium:headless" --second="^(Common|Core)\:*" --third=public --fourth="tests/acceptance" && cd ..)
(cd frontend && npm run testcafe -- chromium:headless --test-grep "^(Common|Core)\:*" --test-meta mode=public,type=short --config-file ./testcaferc.json "tests/acceptance")
acceptance-firefox:
$(info Running JS acceptance tests in Firefox...)
(cd frontend && npm run acceptance --first="firefox:headless" --second="^(Common|Core)\:*" --third=public --fourth="tests/acceptance" && cd ..)
(cd frontend && npm run testcafe -- firefox:headless --test-grep "^(Common|Core)\:*" --test-meta mode=public --config-file ./testcaferc.json "tests/acceptance")
acceptance-auth:
$(info Running JS acceptance-auth tests in Chrome...)
(cd frontend && npm run acceptance --first="chromium:headless" --second="^(Common|Core)\:*" --third=auth --fourth="tests/acceptance" && cd ..)
(cd frontend && npm run testcafe -- chromium:headless --test-grep "^(Common|Core)\:*" --test-meta mode=auth --config-file ./testcaferc.json "tests/acceptance")
acceptance-auth-short:
$(info Running JS acceptance-auth tests in Chrome...)
(cd frontend && npm run acceptance-short --first="chromium:headless" --second="^(Common|Core)\:*" --third=auth --fourth="tests/acceptance" && cd ..)
(cd frontend && npm run testcafe -- chromium:headless --test-grep "^(Common|Core)\:*" --test-meta mode=auth,type=short --config-file ./testcaferc.json "tests/acceptance")
acceptance-auth-firefox:
$(info Running JS acceptance-auth tests in Firefox...)
(cd frontend && npm run acceptance --first="firefox:headless" --second="^(Common|Core)\:*" --third=auth --fourth="tests/acceptance" && cd ..)
(cd frontend && npm run testcafe -- firefox:headless --test-grep "^(Common|Core)\:*" --test-meta mode=auth --config-file ./testcaferc.json "tests/acceptance")
reset-mariadb-testdb:
$(info Resetting testdb database...)
mysql < scripts/sql/reset-testdb.sql

View file

@ -14,8 +14,6 @@
"test": "karma start",
"upgrade": "npm --depth 10 update && npm audit fix",
"testcafe": "testcafe",
"acceptance": "testcafe $npm_config_first --test-grep $npm_config_second --test-meta mode=$npm_config_third --config-file ./testcaferc.json $npm_config_fourth",
"acceptance-short": "testcafe $npm_config_first --test-grep $npm_config_second --test-meta mode=$npm_config_third,type=short --config-file ./testcaferc.json $npm_config_fourth",
"acceptance-local": "testcafe chromium --selector-timeout 5000 -S -s tests/acceptance/screenshots tests/acceptance",
"gettext-extract": "gettext-extract --output src/locales/translations.pot $(find src -type f \\( -iname \\*.vue -o -iname \\*.js \\) -not -path src/common/vm.js)",
"gettext-compile": "gettext-compile --output src/locales/translations.json src/locales/*.po"