Skip to content

Commit

Permalink
fix(e2e): inserts learning content in database before running e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
laura-bergoens authored and nlepage committed Dec 4, 2024
1 parent 2deb874 commit 1a70085
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,21 @@ jobs:
background: true
command: npm start

- run:
name: Prepare database
working_directory: ~/pix/api
environment:
DATABASE_URL: 'postgres://circleci@localhost:5432/circleci'
command: npm run db:prepare

- run:
name: Refresh cache
environment:
JOBS: 1
DATABASE_URL: 'postgres://circleci@localhost:5432/circleci'
working_directory: ~/pix/api
command: npm run cache:refresh

- run:
name: Run tests
environment:
Expand Down Expand Up @@ -900,6 +915,21 @@ jobs:
background: true
command: npm start

- run:
name: Prepare database
working_directory: ~/pix/api
environment:
DATABASE_URL: 'postgres://circleci@localhost:5432/circleci'
command: npm run db:prepare

- run:
name: Refresh cache
environment:
JOBS: 1
DATABASE_URL: 'postgres://circleci@localhost:5432/circleci'
working_directory: ~/pix/api
command: npm run cache:refresh

- run:
name: Run tests
environment:
Expand Down
6 changes: 3 additions & 3 deletions high-level-tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"start:api": "cd ../../api && DATABASE_URL=postgresql://postgres@localhost/pix_test npm run start:watch",
"start:mon-pix": "cd ../../mon-pix && npm start",
"start:orga": "cd ../../orga && npm start",
"test:ci:app": "npm run db:initialize && npx wait-on http://localhost:3000/api http://localhost:4200 && npm run cy:run:ci:app",
"test:ci:orga": "npm run db:initialize && npx wait-on http://localhost:3000/api http://localhost:4201 && npm run cy:run:ci:orga"
"test:ci:app": "npx wait-on http://localhost:3000/api http://localhost:4200 && npm run cy:run:ci:app",
"test:ci:orga": "npx wait-on http://localhost:3000/api http://localhost:4201 && npm run cy:run:ci:orga"
},
"devDependencies": {
"@badeball/cypress-cucumber-preprocessor": "^20.0.0",
Expand All @@ -49,4 +49,4 @@
"dependencies": {
"jsonwebtoken": "8.5.1"
}
}
}

0 comments on commit 1a70085

Please sign in to comment.