2021-10-28 19:32:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo "Initializing WooCommerce E2E"
|
|
|
|
|
2021-11-05 15:56:38 +00:00
|
|
|
# This is a workaround to accommodate different directory names.
|
|
|
|
wp plugin activate --all
|
|
|
|
wp plugin deactivate akismet
|
|
|
|
wp plugin deactivate hello
|
|
|
|
|
2021-10-28 19:32:31 +00:00
|
|
|
wp theme install twentynineteen --activate
|
|
|
|
wp user create customer customer@woocommercecoree2etestsuite.com \
|
|
|
|
--user_pass=password \
|
|
|
|
--role=subscriber \
|
|
|
|
--first_name='Jane' \
|
|
|
|
--last_name='Smith' \
|
|
|
|
--path=/var/www/html
|
|
|
|
|
|
|
|
# we cannot create API keys for the API, so we using basic auth, this plugin allows that.
|
|
|
|
wp plugin install https://github.com/WP-API/Basic-Auth/archive/master.zip --activate
|
|
|
|
|
2022-03-24 17:11:18 +00:00
|
|
|
# Reset plugin that allows us to reset WooCommerce state between tests.
|
2022-03-23 12:50:56 +00:00
|
|
|
wp plugin install https://github.com/woocommerce/woocommerce-reset/zipball/trunk/ --activate
|
|
|
|
|
2021-10-28 19:32:31 +00:00
|
|
|
# install the WP Mail Logging plugin to test emails
|
|
|
|
wp plugin install wp-mail-logging --activate
|
|
|
|
|
|
|
|
# initialize pretty permalinks
|
|
|
|
wp rewrite structure /%postname%/
|