Add page creation & check for Docker container status to run e2e tests

This commit is contained in:
Julia Amosova 2019-12-15 16:44:40 +00:00
parent 5645f5882a
commit c1b358929b
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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;