mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
Move cypress to client folder (#3566)
This commit is contained in:
@@ -6,7 +6,7 @@ WORKDIR $APP
|
|||||||
COPY package.json $APP/package.json
|
COPY package.json $APP/package.json
|
||||||
RUN npm run cypress:install > /dev/null
|
RUN npm run cypress:install > /dev/null
|
||||||
|
|
||||||
COPY cypress $APP/cypress
|
COPY client/cypress $APP/client/cypress
|
||||||
COPY cypress.json $APP/cypress.json
|
COPY cypress.json $APP/cypress.json
|
||||||
|
|
||||||
RUN ./node_modules/.bin/cypress verify
|
RUN ./node_modules/.bin/cypress verify
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ jobs:
|
|||||||
name: Setup Redash server
|
name: Setup Redash server
|
||||||
command: |
|
command: |
|
||||||
npm run cypress start
|
npm run cypress start
|
||||||
docker-compose run cypress node ./cypress/cypress.js db-seed
|
docker-compose run cypress npm run cypress db-seed
|
||||||
- run:
|
- run:
|
||||||
name: Execute Cypress tests
|
name: Execute Cypress tests
|
||||||
command: npm run cypress run-ci
|
command: npm run cypress run-ci
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -24,5 +24,5 @@ node_modules
|
|||||||
.sass-cache
|
.sass-cache
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
cypress/screenshots
|
client/cypress/screenshots
|
||||||
cypress/videos
|
client/cypress/videos
|
||||||
|
|||||||
@@ -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({
|
Cypress.Commands.add('login', (email = 'admin@redash.io', password = 'password') => cy.request({
|
||||||
url: '/login',
|
url: '/login',
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
{
|
{
|
||||||
"baseUrl": "http://localhost:5000",
|
"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"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"test": "TZ=Africa/Khartoum jest",
|
"test": "TZ=Africa/Khartoum jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"cypress:install": "npm install --no-save cypress@^3.1.5 @percy/cypress@^0.2.3 atob@2.1.2",
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -155,9 +155,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"client/app/**/*.{js,jsx}": [
|
"linters": {
|
||||||
|
"client/**/*.{js,jsx}": [
|
||||||
"npm run lint:base",
|
"npm run lint:base",
|
||||||
"npm run test -- --bail --findRelatedTests"
|
"npm run test -- --bail --findRelatedTests"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"ignore": ["client/dist/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user