feat(OHIFv3):Add static e2e data (#2665)

This change wraps the E2E test data into a github repository, which is then included in the test builds as static data.
That makes running the e2e tests as simple as:
yarn test:e2e:server
yarn test:e2e

without any need to have docker etc installed/running.
This commit is contained in:
Bill Wallace authored and GitHub committed 2022-01-31 14:29:20 -05:00
1 parent 72bb074f21
commit 0e2c31939c
14 files changed
+888 -108

No files matched your search

+8 -10
View File
@@ -18,18 +18,17 @@ executors:
# Custom executor to override Cypress config
deploy-to-prod-executor:
docker:
- image: 'cypress/browsers:node14.15.0-chrome86-ff82'
- image: cimg/node:14.18
environment:
CYPRESS_BASE_URL: https://ohif-staging.netlify.com/
chrome-and-pacs:
docker:
# Primary container image where all steps run.
- image: 'cypress/browsers:node14.15.0-chrome86-ff82'
- image: 'ohif/viewer-testdata:0.1-test'
defaults: &defaults
docker:
- image: circleci/node:14.15.0
- image: cimg/node:14.18-browsers
environment:
TERM: xterm # Enable colors in term
QUICK_BUILD: true
@@ -335,15 +334,14 @@ workflows:
browser: chrome
pre-steps:
- run: |
# Clear yarn cache; update to latest
# Clear yarn cache; use yarn from image (update image to update yarn)
rm -rf ~/.yarn
npm i -g yarn
yarn -v
yarn: true
record: true
store_artifacts: true
working_directory: platform/viewer
build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build
build: yarn test:data
start: yarn run test:e2e:serve
spec: 'cypress/integration/**/*'
wait-on: 'http://localhost:3000'
@@ -369,12 +367,12 @@ workflows:
executor: cypress/browsers-chrome76
browser: chrome
pre-steps:
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global
add wait-on' # Use yarn latest
- run: 'rm -rf ~/.yarn && yarn -v && yarn global
add wait-on'
yarn: true
store_artifacts: false
working_directory: platform/viewer
build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build
build: yarn test:data && npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build
# start server --> verify running --> percy + chrome + cypress
command: yarn run test:e2e:dist
cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}'
@@ -436,7 +434,7 @@ workflows:
yarn: true
store_artifacts: false
working_directory: platform/viewer
build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build
build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/e2e.js yarn run build
# start server --> verify running --> percy + chrome + cypress
command: yarn run test:e2e:dist
cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}'