Skip to content

Commit

Permalink
Merge pull request #403 from crisner/testing/set-up-cypress-with-travis
Browse files Browse the repository at this point in the history
Testing/set up cypress with travis
  • Loading branch information
cesswairimu authored Feb 17, 2020
2 parents e083265 + b9be696 commit a2126f3
Show file tree
Hide file tree
Showing 5 changed files with 232 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,6 @@ typings/
# dotenv environment variables file
.env

# cypress test screenshots and videos
cypress/screenshots
cypress/videos
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
language: node_js
node_js:
- '10'

# if using Ubuntu 16 need this library
# https://github.com/cypress-io/cypress-documentation/pull/1647
addons:
chrome: stable
apt:
packages:
- libgconf-2-4

## Cache NPM folder and Cypress binary
## to avoid downloading Cypress again and again
cache:
directories:
- ~/.npm
- ~/.cache

before_install:
- npm install -g grunt-cli

install:
# use the new "ci" command for fastest installs on CI
- npm ci

before_script:
- grunt build

script:
- grunt transpile
- grunt jasmine
- npm run start:ci &
- npm run cy:run:chrome
1 change: 1 addition & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"baseUrl": "http://localhost:8080",
"modifyObstructiveCode": false
}
199 changes: 198 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"cypress:open": "cypress open",
"start": "http-server -p 8080 -c-1",
"start:ci": "http-server -p 8080 -c-1 --silent",
"cy:open": "cypress open",
"cy:run": "cypress run",
"cy:run:chrome": "cypress run --browser chrome",
"prepublishOnly": "yarn install && grunt build",
"postversion": "echo \"The version is bumped in this commit\"",
"postpublish": "echo \"The version is bumped :)\""
Expand Down Expand Up @@ -47,6 +51,7 @@
"grunt-contrib-uglify": "^2.2.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-template-jasmine-requirejs": "^0.2.3",
"http-server": "^0.12.1",
"jasmine": "^2.5.3",
"jasmine-ajax": "^3.3.1",
"jasmine-jquery": "^2.1.1",
Expand Down

0 comments on commit a2126f3

Please sign in to comment.