Skip to content
Snippets Groups Projects
Commit 4cd83280 authored by jurgenhaas's avatar jurgenhaas
Browse files

Integrate Cypress testing

parent 1b7e6f48
No related branches found
No related tags found
1 merge request!39Merging develop into main
Pipeline #628627 passed
......@@ -20,3 +20,7 @@ commands:
imports:
- ahoy.traefik.yml
usage: Traefik commands
cypress:
imports:
- ahoy.cypress.yml
usage: Cypress
ahoyapi: v2
commands:
on:
cmd: |
CYPRESS=1
echo "CYPRESS=1" >>.env
env -i $(cat .env | xargs) >.env
composer lakedrops:docker4drupal --no-interaction
ahoy d4d up cypress
usage: Turn on Cypress
off:
cmd: |
CYPRESS=0
echo "CYPRESS=0" >>.env
env -i $(cat .env | xargs) >.env
composer lakedrops:docker4drupal --no-interaction
echo "You may have to close the Cypress window manually"
ahoy d4d stop cypress
usage: Turn off Cypress
......@@ -184,6 +184,10 @@ class Handler extends BaseHandler {
'yearly' => 30,
],
],
'cypress' => [
'enable' => $this->env->receiveGlobal('CYPRESS', 'Cypress', '0'),
'version' => '10.8.0',
],
];
}
......
......@@ -520,3 +520,22 @@ services:
env_file: ../backup/.env
{% endif %}
{% endif %}
{% if cypress.enable|default(0) %}
cypress:
image: 'cypress/included:{{ cypress.version }}'
environment:
- CYPRESS_baseUrl={{ projectprotocol }}://{{ projectdomain }}{{ projectport }}
{% if not drupal.live|default(0) %}
- DISPLAY=:0
network_mode: host
{% endif %}
working_dir: '/e2e'
volumes:
- {{ projectroot }}/tests/:/e2e
{% if not drupal.live|default(0) %}
- ~/.Xauthority:/root/.Xauthority:ro
entrypoint: cypress open --project /e2e
user: '1000'
{% endif %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment