Add page creation & check for Docker container status to run e2e tests
This commit is contained in:
parent
5645f5882a
commit
c1b358929b
|
@ -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 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 plugin activate woocommerce;
|
||||||
wp user create customer customer@woocommercecoree2etestsuite.com --user_pass=password --role=customer --path=/var/www/html;
|
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:
|
volumes:
|
||||||
- wordpress:/var/www/html
|
- wordpress:/var/www/html
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/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
|
do
|
||||||
echo "$(date) - Docker container is still being built";
|
echo "$(date) - Docker container is still being built";
|
||||||
sleep 1;
|
sleep 10;
|
||||||
done
|
done
|
||||||
echo "$(date) - Docker container had been built successfully";
|
echo "$(date) - Docker container had been built successfully";
|
||||||
npm run test:e2e;
|
npm run test:e2e;
|
||||||
|
|
Loading…
Reference in New Issue