Skip to content

Commit

Permalink
Cypress tests: preset the admin API key to a static value (#3358)
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr authored Jan 28, 2019
1 parent 7278d4b commit ff42ec2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
command: |
npm run cypress start
docker-compose run cypress node ./cypress/cypress.js db-seed
# Make sure the API key is the same so Percy snapshots are consistent
docker-compose -p cypress run postgres psql -U postgres -h postgres -c "update users set api_key = 'secret' where email ='admin@redash.io';"
- run:
name: Execute Cypress tests
command: npm run cypress run-ci
Expand Down
5 changes: 4 additions & 1 deletion cypress/cypress.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ function runCypressCI() {
if (process.env.PERCY_TOKEN_ENCODED) {
process.env.PERCY_TOKEN = atob(`${process.env.PERCY_TOKEN_ENCODED}`);
}
execSync('docker-compose run cypress ./node_modules/.bin/percy exec -- ./node_modules/.bin/cypress run --browser chrome', { stdio: 'inherit' });
execSync(
'docker-compose run cypress ./node_modules/.bin/percy exec -- ./node_modules/.bin/cypress run --browser chrome',
{ stdio: 'inherit' },
);
}

const command = process.argv[2] || 'all';
Expand Down

0 comments on commit ff42ec2

Please sign in to comment.