Skip to content

Commit

Permalink
update cypress script
Browse files Browse the repository at this point in the history
  • Loading branch information
austenem committed Oct 21, 2024
1 parent 572676d commit 5589c31
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions etc/test/test-cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,10 @@ PORT=8000

start cypress

case $1 in

maintenance)
CYPRESS_ARGS="--spec cypress/e2e/maintenance/*.cy.js --config baseUrl=http://localhost:${PORT}"
cd context
npm run build:maintain
( cd app/static/js/maintenance/public/ ; python -m http.server $PORT & )
cd -
;;

portal)
CYPRESS_ARGS='--spec ./cypress/e2e/portal/*.cy.js'
etc/dev/docker.sh 5001 # Needs to match port in cypress.json.
server_up 5001 # Without this, Cypress gets an undefined content-type and immediately fails.
;;

*)
die "Unexpected argument: $1"
;;
esac
CYPRESS_ARGS='--spec ./cypress/e2e/portal/*.cy.js'
etc/dev/docker.sh 5001 # Needs to match port in cypress.json.
server_up 5001 # Without this, Cypress gets an undefined content-type and immediately fails.


end-to-end/test.sh $CYPRESS_ARGS
docker kill hubmap-portal-ui || true #Kills docker container if it is running, but does not error if the container is not.
Expand Down

0 comments on commit 5589c31

Please sign in to comment.