Tests: Update test commands in makefile and package.json
This commit is contained in:
parent
a1a967786a
commit
96cb6eeed6
2 changed files with 23 additions and 5 deletions
27
Makefile
27
Makefile
|
@ -26,22 +26,36 @@ install: install-bin install-assets
|
|||
test: test-js test-go
|
||||
test-go: reset-test-db run-test-go
|
||||
test-short: reset-test-db run-test-short
|
||||
acceptance-run-chromium: acceptance-restart acceptance stop
|
||||
acceptance-run-firefox: acceptance-restart acceptance-firefox stop
|
||||
acceptance-run-chromium: acceptance-restart acceptance acceptance-stop
|
||||
acceptance-run-firefox: acceptance-restart acceptance-firefox acceptance-stop
|
||||
test-all: test acceptance-run-chromium
|
||||
fmt: fmt-js fmt-go fmt-imports
|
||||
upgrade: dep-upgrade-js dep-upgrade
|
||||
clean-local: clean-local-config clean-local-cache
|
||||
clean-install: clean-local dep build-js install-bin install-assets
|
||||
acceptance-start:
|
||||
go run cmd/photoprism/photoprism.go --public --database-driver sqlite --database-dsn ./storage/acceptance/index.db --import-path ./storage/acceptance/import --http-port=2343 --config-path ./storage/acceptance/config --originals-path ./storage/acceptance/originals --disable-exiftool --disable-backups start -d
|
||||
acceptance-restart:
|
||||
cp -f storage/acceptance/backup.db storage/acceptance/index.db
|
||||
cp -f storage/acceptance/config/settingsBackup.yml storage/acceptance/config/settings.yml
|
||||
rm -rf storage/acceptance/originals/2010
|
||||
rm -rf storage/acceptance/originals/2020
|
||||
rm -rf storage/acceptance/originals/2011
|
||||
rm -rf storage/acceptance/originals/2013
|
||||
rm -rf storage/acceptance/originals/2017
|
||||
go run cmd/photoprism/photoprism.go --public --database-driver sqlite --database-dsn ./storage/acceptance/index.db --import-path ./storage/acceptance/import --http-port=2343 --config-path ./storage/acceptance/config --originals-path ./storage/acceptance/originals --disable-exiftool --disable-backups start -d
|
||||
go run cmd/photoprism/photoprism.go --public --upload-nsfw=false --database-driver sqlite --database-dsn ./storage/acceptance/index.db --import-path ./storage/acceptance/import --http-port=2343 --config-path ./storage/acceptance/config --originals-path ./storage/acceptance/originals --storage-path ./storage/acceptance --test --backup-path ./storage/acceptance/backup --disable-exiftool --disable-backups start -d
|
||||
acceptance-stop:
|
||||
go run cmd/photoprism/photoprism.go --public --upload-nsfw=false --database-driver sqlite --database-dsn ./storage/acceptance/index.db --import-path ./storage/acceptance/import --http-port=2343 --config-path ./storage/acceptance/config --originals-path ./storage/acceptance/originals --storage-path ./storage/acceptance --test --backup-path ./storage/acceptance/backup --disable-exiftool --disable-backups stop
|
||||
acceptance-long-restart:
|
||||
cp -f storage/acceptance-long/backup.db storage/acceptance-long/index.db
|
||||
cp -f storage/acceptance-long/config/settingsBackup.yml storage/acceptance-long/config/settings.yml
|
||||
rm -rf storage/acceptance-long/cache/thumbnails
|
||||
rm -rf storage/acceptance-long/cache/json
|
||||
rm -rf storage/acceptance-long/albums/folder
|
||||
rm -rf storage/acceptance-long/albums/month
|
||||
rm -rf storage/acceptance-long/albums/state
|
||||
rm -rf storage/acceptance-long/sidecar
|
||||
go run cmd/photoprism/photoprism.go --public=false --thumb-uncached=false --upload-nsfw=false --database-driver sqlite --database-dsn ./storage/acceptance-long/index.db --import-path ./storage/acceptance-long/import --http-port=2343 --config-path ./storage/acceptance-long/config --originals-path ./storage/acceptance-long/originals --storage-path ./storage/acceptance-long --test --backup-path ./storage/acceptance-long/backup start -d
|
||||
acceptance-long-stop:
|
||||
go run cmd/photoprism/photoprism.go --public=false --thumb-uncached=false --upload-nsfw=false --database-driver sqlite --database-dsn ./storage/acceptance-long/index.db --import-path ./storage/acceptance-long/import --http-port=2343 --config-path ./storage/acceptance-long/config --originals-path ./storage/acceptance-long/originals --storage-path ./storage/acceptance-long --test --backup-path ./storage/acceptance-long/backup stop
|
||||
acceptance-restore-db:
|
||||
cp -f storage/acceptance/config/settingsBackup.yml storage/acceptance/config/settings.yml
|
||||
cp -f storage/acceptance/backup.db storage/acceptance/index.db
|
||||
|
@ -123,6 +137,9 @@ acceptance:
|
|||
acceptance-firefox:
|
||||
$(info Running JS acceptance tests in Firefox...)
|
||||
(cd frontend && npm run acceptance-firefox && cd ..)
|
||||
acceptance-long:
|
||||
$(info Running JS acceptance tests in Chrome...)
|
||||
(cd frontend && npm run acceptance-long && cd ..)
|
||||
reset-photoprism-db:
|
||||
$(info Purging photoprism database...)
|
||||
mysql < scripts/reset-photoprism-db.sql
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"upgrade": "npm --depth 10 update && npm audit fix",
|
||||
"acceptance": "testcafe \"chromium:headless --disable-dev-shm-usage\" --skip-js-errors --selector-timeout 5000 -S -s tests/screenshots tests/acceptance",
|
||||
"acceptance-firefox": "testcafe firefox:headless --skip-js-errors --selector-timeout 5000 -S -s tests/screenshots tests/acceptance",
|
||||
"acceptance-long": "testcafe \"chromium:headless --disable-dev-shm-usage\" --skip-js-errors --selector-timeout 5000 -S -s tests/screenshots tests/acceptance-long",
|
||||
"acceptance-local": "testcafe chrome --selector-timeout 5000 -S -s tests/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"
|
||||
|
|
Loading…
Reference in a new issue