Skip to content

Commit

Permalink
add maintenance back
Browse files Browse the repository at this point in the history
  • Loading branch information
austenem committed Oct 22, 2024
1 parent cf70bc2 commit e108d05
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
6 changes: 6 additions & 0 deletions end-to-end/cypress/e2e/maintenance/maintenance.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
describe("portal-ui-maintenance", () => {
it("has expected text", () => {
cy.visit("http://localhost:8000");
cy.contains("Portal Maintenance");
});
});
24 changes: 20 additions & 4 deletions etc/test/test-cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,26 @@ PORT=8000

start cypress

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.

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

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 e108d05

Please sign in to comment.