diff --git a/.travis.yml b/.travis.yml index 95f568228..8cda26706 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,9 +69,9 @@ script: - if [ "$KNAPSACK_PRO_CI_NODE_INDEX" == "1" ]; then bundle exec bundle-audit check --update --ignore CVE-2015-9284; fi - if [ "$KNAPSACK_PRO_CI_NODE_INDEX" == "1" ]; then yarn build-storybook; fi - if [ "$KNAPSACK_PRO_CI_NODE_INDEX" == "2" ]; then bin/test-console-check; fi - # - yarn e2e:ci - # Dropping and recreating the database for Capybara/rspecs - export FOREM_OWNER_SECRET="secret" + - yarn e2e:ci + # Dropping and recreating the database for Capybara/rspecs - bundle exec rails db:drop - bundle exec rails db:create - bundle exec rails db:schema:load diff --git a/bin/e2e b/bin/e2e new file mode 100755 index 000000000..c18936433 --- /dev/null +++ b/bin/e2e @@ -0,0 +1,9 @@ +#!/bin/bash +if [ "$KNAPSACK_PRO_TEST_SUITE_TOKEN_CYPRESS" = "" ]; then + KNAPSACK_PRO_ENDPOINT=https://api-disabled-for-fork.knapsackpro.com \ + KNAPSACK_PRO_MAX_REQUEST_RETRIES=0 \ + KNAPSACK_PRO_TEST_SUITE_TOKEN_CYPRESS=disabled-for-fork \ + npx cypress run # run without parallelization +else + npx knapsack-pro-cypress # parallelization is available +fi diff --git a/package.json b/package.json index 031a32a97..e96a98c17 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "test:watch": "jest app/javascript/ bin/ --watch", "postcss": "postcss public/assets/*.css -d public/assets 2> postcss_error.log", "e2e": "cypress open", - "e2e:runner": "knapsack-pro-cypress", + "e2e:runner": "bin/e2e", "e2e:server": "bin/rails s -p 3000 -b 0.0.0.0", "e2e:ci": "start-server-and-test e2e:server http://localhost:3000 e2e:runner" },