diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ee1980..3ecb95d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,7 +67,7 @@ test:e2e: needs: ["install", "build"] stage: test script: - - npm run test:e2e + - npm run testcafe artifacts: paths: - e2e-screenshots diff --git a/package.json b/package.json index 986b08e..5376a84 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,8 @@ "start": "next dev", "start-prod": "next start --port ${SERVER_PORT:=80}", "serve": "next start --port 3000", - "test": "npm run test:e2e:verbose", - "test:e2e": "testcafe --list-browsers && npm-run-all -p -r serve testcafe", - "test:e2e:verbose": "npm-run-all -p -r serve testcafe:verbose", - "testcafe": "testcafe --skip-js-errors -S -s 'e2e-screenshots' --app-init-delay 2000 chrome:headless tests/testcafe", - "testcafe:verbose": "testcafe --skip-js-errors -S -s 'e2e-screenshots' --app-init-delay 2000 chrome tests/testcafe", + "test": "npm run testcafe", + "testcafe": "testcafe --config-file testcafe.json", "build-analyze": "ANALYZE=true npm run build", "prepare": "husky install" }, diff --git a/testcafe.json b/testcafe.json new file mode 100644 index 0000000..7b77f37 --- /dev/null +++ b/testcafe.json @@ -0,0 +1,11 @@ +{ + "src": "tests/testcafe", + "browsers": "all", + "concurrency": 1, + "screenshots": { + "path": "e2e-screenshots" + }, + "skipJsErrors": false, + "appCommand": "npm run serve", + "appInitDelay": 2000 +}