Skip to content

Commit

Permalink
Move cypress to client folder (#3566)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldutra authored Mar 24, 2019
1 parent 8e5ba80 commit 25910e7
Show file tree
Hide file tree
Showing 23 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/Dockerfile.cypress
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR $APP
COPY package.json $APP/package.json
RUN npm run cypress:install > /dev/null

COPY cypress $APP/cypress
COPY client/cypress $APP/client/cypress
COPY cypress.json $APP/cypress.json

RUN ./node_modules/.bin/cypress verify
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
name: Setup Redash server
command: |
npm run cypress start
docker-compose run cypress node ./cypress/cypress.js db-seed
docker-compose run cypress npm run cypress db-seed
- run:
name: Execute Cypress tests
command: npm run cypress run-ci
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ node_modules
.sass-cache
npm-debug.log

cypress/screenshots
cypress/videos
client/cypress/screenshots
client/cypress/videos
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@percy/cypress';
import '@percy/cypress'; // eslint-disable-line import/no-extraneous-dependencies

Cypress.Commands.add('login', (email = 'admin@redash.io', password = 'password') => cy.request({
url: '/login',
Expand Down
File renamed without changes.
8 changes: 7 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"baseUrl": "http://localhost:5000",
"video": false
"video": false,
"fixturesFolder": "client/cypress/fixtures",
"integrationFolder": "client/cypress/integration",
"pluginsFile": "client/cypress/plugins/index.js",
"screenshotsFolder": "client/cypress/screenshots",
"videosFolder": "client/cypress/videos",
"supportFile": "client/cypress/support/index.js"
}
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"test": "TZ=Africa/Khartoum jest",
"test:watch": "jest --watch",
"cypress:install": "npm install --no-save cypress@^3.1.5 @percy/cypress@^0.2.3 atob@2.1.2",
"cypress": "node cypress/cypress.js"
"cypress": "node client/cypress/cypress.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -155,9 +155,12 @@
}
},
"lint-staged": {
"client/app/**/*.{js,jsx}": [
"npm run lint:base",
"npm run test -- --bail --findRelatedTests"
]
"linters": {
"client/**/*.{js,jsx}": [
"npm run lint:base",
"npm run test -- --bail --findRelatedTests"
]
},
"ignore": ["client/dist/*"]
}
}

0 comments on commit 25910e7

Please sign in to comment.