From c1b358929b3e4a455458ebbcbefabc2395be744e Mon Sep 17 00:00:00 2001 From: Julia Amosova Date: Sun, 15 Dec 2019 16:44:40 +0000 Subject: [PATCH] Add page creation & check for Docker container status to run e2e tests --- docker-compose.yaml | 2 +- tests/bin/run-e2e-CI.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 20d12a66d10..8ebacae3f59 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -44,7 +44,7 @@ services: wp core install --url=http://localhost:8084 --title="WooCommerce Core E2E Test Suite" --admin_user=admin --admin_password=password --admin_email=admin@woocommercecoree2etestsuite.com --path=/var/www/html --skip-email; wp plugin activate woocommerce; wp user create customer customer@woocommercecoree2etestsuite.com --user_pass=password --role=customer --path=/var/www/html; - wp post create --post_type=post --post_title='Ready'; + wp post create --post_type=page --post_status=publish --post_title='Ready' --post_content='E2E-tests.'; ' volumes: - wordpress:/var/www/html diff --git a/tests/bin/run-e2e-CI.sh b/tests/bin/run-e2e-CI.sh index 097601e07f3..8079d7ed470 100755 --- a/tests/bin/run-e2e-CI.sh +++ b/tests/bin/run-e2e-CI.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8084/?p=5)" != "200" ]]; +while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8084/?page_id=4)" != "200" ]]; do echo "$(date) - Docker container is still being built"; - sleep 1; + sleep 10; done echo "$(date) - Docker container had been built successfully"; npm run test:e2e;