Skip to content

Commit

Permalink
cypress upgrade, better start commands (chaskiq#648)
Browse files Browse the repository at this point in the history
* cypress upgrade, better start commands

* output node version
  • Loading branch information
michelson authored Feb 22, 2022
1 parent c251ea3 commit c86d30c
Show file tree
Hide file tree
Showing 6 changed files with 289 additions and 281 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
- name: Build and run E2E tests
run: |
echo "node version:"
echo `node -v`
# curl ifconfig.me
bundle exec rails server -e test -p 5002 -d
./node_modules/.bin/cypress install
Expand Down
4 changes: 4 additions & 0 deletions Procfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
web: bin/rails server -e test -p 5002 -b 0.0.0.0
js: node esbuild.config.mjs --watch
css: bin/rails tailwindcss:watch
cypress: yarn cypress:open
9 changes: 9 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

if ! command -v foreman &> /dev/null
then
echo "Installing foreman..."
gem install foreman
fi

foreman start -f Procfile.test
4 changes: 2 additions & 2 deletions cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"ignoreTestFiles": "*.hot-update.js",
"integrationFolder": "./spec/cypress/integration/",
"modifyObstructiveCode": true,
"nodeVersion": "default",
"nodeVersion": "system",
"numTestsKeptInMemory": 50,
"pageLoadTimeout": 60000,
"pluginsFile": "./spec/cypress/plugins",
Expand All @@ -36,4 +36,4 @@
"viewportWidth": 1000,
"waitForAnimations": true,
"watchForFileChanges": true
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"@rollup/plugin-node-resolve": "^13.0.0",
"autoprefixer": "^10.2.6",
"babel-eslint": "^10.1.0",
"cypress": "6.1.0",
"cypress": "9.5.0",
"cypress-xpath": "^1.4.0",
"dotenv": "^8.2.0",
"eslint": "^6.8.0",
Expand Down Expand Up @@ -155,7 +155,7 @@
"format:ruby": "rubocop -A",
"format:prettier": "prettier --write './app/javascript/**/*.{js,ts,tsx,css,scss,json,yml}'",
"format:all": "yarn format:prettier ; yarn format:ruby",
"rails-cy": "bundle exec rails server -e test -p 5002",
"rails-cy": "./bin/test",
"cypress:open": "./node_modules/.bin/cypress open",
"cypress:run": "./node_modules/.bin/cypress run --headless --browser chrome",
"cypress:ci": "./node_modules/.bin/cypress run --headless --browser chrome --record --key 0998a03f-f6fe-4acf-8444-b81533c950cd --parallel --ci-build-id $TRAVIS_BUILD_ID",
Expand Down
Loading

0 comments on commit c86d30c

Please sign in to comment.