Skip to content

Commit

Permalink
TS-47 test cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Tkachev committed Dec 13, 2024
1 parent 9d95715 commit f24bdaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 38 deletions.
37 changes: 0 additions & 37 deletions .github/oxid-esales/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,6 @@ function error() {
exit 1
}

function add_cypress_to_docker_compose() {
echo "Adding Cypress configuration to docker-compose.yml..."

# Define the Cypress service block
cypress_service=$(cat <<EOF
cypress:
image: cypress/included:latest
working_dir: /var/www/extensions/telecash/tests/e2e
volumes:
- ./source/extensions/telecash:/var/www/extensions/telecash:cached
- /tmp/.X11-unix:/tmp/.X11-unix
environment:
- CYPRESS_baseUrl=https://oxidshop.local
ports:
- "5900:5900" # VNC port
command: cypress open
depends_on:
apache:
condition: service_started
php:
condition: service_started
entrypoint: [ "npx", "cypress", "run", "--config-file", "/var/www/extensions/telecash/tests/e2e/cypress.config.js" ]
EOF
)

# Append the Cypress configuration to docker-compose.yml
if [ -f "docker-compose.yml" ]; then
echo "$cypress_service" >> docker-compose.yml
echo "Cypress configuration added to docker-compose.yml successfully."
else
echo "docker-compose.yml not found in the current directory."
exit 1
fi
}

function init() {
for VAR in install_container_method install_container_options install_container_name \
install_config_idebug install_is_enterprise; do
Expand Down Expand Up @@ -82,8 +47,6 @@ function init() {
fi
}

add_cypress_to_docker_compose

init
# Run Install Shop
docker compose "${install_container_method}" -T \
Expand Down
6 changes: 5 additions & 1 deletion .github/oxid-esales/telecash_module.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
global:
git:
git_sdk_ref: 'osc/cypress'

install_shop_with_modules:
cache:
prepared_shop: false

add_services: 'cypress'
composer:
transform: |
{
Expand Down

0 comments on commit f24bdaf

Please sign in to comment.