Skip to content

Commit

Permalink
Include Docker Compose CI files when running Cypress tests
Browse files Browse the repository at this point in the history
Otherwise the dev:cli will not run in the required CI environment/mode.

This will cause tests to fail because setting username and password will
not work as expected.
  • Loading branch information
kasperg committed Dec 4, 2023
1 parent 5f052a3 commit 6b5e823
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ tasks:
# All tests that delete mappings and make their own run afterwards.
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm -e CYPRESS_DRUPAL_USERNAME=$CYPRESS_DRUPAL_USERNAME -e CYPRESS_DRUPAL_PASSWORD=$CYPRESS_DRUPAL_PASSWORD cypress --spec "cypress/e2e/*.ts"
env:
DOCKER_COMPOSE_FILES: "{{ .DOCKER_COMPOSE_FILES_CI }}"
CYPRESS_DRUPAL_USERNAME: admin
CYPRESS_DRUPAL_PASSWORD: admin

Expand All @@ -264,6 +265,7 @@ tasks:
- task dev:cli -- drush user:password $CYPRESS_DRUPAL_USERNAME $CYPRESS_DRUPAL_PASSWORD
- http_proxy={{ .WIREMOCK_HOST_LOCAL }} https_proxy={{ .WIREMOCK_HOST_LOCAL_HTTPS }} npx cypress open
env:
DOCKER_COMPOSE_FILES: "{{ .DOCKER_COMPOSE_FILES_CI }}"
CYPRESS_BASE_URL: http://localhost:{{ .CYPRESS_BASE_PORT }}
CYPRESS_WIREMOCK_URL: '{{ .WIREMOCK_HOST_LOCAL }}'
CYPRESS_DRUPAL_USERNAME: admin
Expand Down

0 comments on commit 6b5e823

Please sign in to comment.