Add ability to use 3rd party plugin functions in acceptance tests
All plugins that we keep active during acceptance tests bootstrap are then loaded by WP Browser extension and that gives us ability to use their functions and classes within the acceptance tests. [MAILPOET-3471]
This commit is contained in:
committed by
Veljko V
parent
94450d1aff
commit
6ba56ad15b
@@ -59,7 +59,7 @@ if [[ $CIRCLE_JOB == *"_latest" ]]; then
|
|||||||
WOOCOMMERCE_VERSION="latest"
|
WOOCOMMERCE_VERSION="latest"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install WooCommerce (activate & deactivate it to populate DB for backup)
|
# install WooCommerce
|
||||||
if [[ ! -d "/wp-core/wp-content/plugins/woocommerce" ]]; then
|
if [[ ! -d "/wp-core/wp-content/plugins/woocommerce" ]]; then
|
||||||
cd /wp-core/wp-content/plugins
|
cd /wp-core/wp-content/plugins
|
||||||
WOOCOMMERCE_SOURCE_ZIP="/wp-core/wp-content/plugins/mailpoet/tools/vendor/woocommerce.zip"
|
WOOCOMMERCE_SOURCE_ZIP="/wp-core/wp-content/plugins/mailpoet/tools/vendor/woocommerce.zip"
|
||||||
@@ -80,8 +80,6 @@ if [[ ! -d "/wp-core/wp-content/plugins/woocommerce" ]]; then
|
|||||||
echo "Unzip Woocommerce plugin from $WOOCOMMERCE_TARGET_ZIP"
|
echo "Unzip Woocommerce plugin from $WOOCOMMERCE_TARGET_ZIP"
|
||||||
unzip -q -o "$WOOCOMMERCE_TARGET_ZIP"
|
unzip -q -o "$WOOCOMMERCE_TARGET_ZIP"
|
||||||
fi
|
fi
|
||||||
wp plugin activate woocommerce
|
|
||||||
wp plugin deactivate woocommerce
|
|
||||||
|
|
||||||
# Install WooCommerce Subscriptions
|
# Install WooCommerce Subscriptions
|
||||||
if [[ ! -d "/wp-core/wp-content/plugins/woocommerce-subscriptions" ]]; then
|
if [[ ! -d "/wp-core/wp-content/plugins/woocommerce-subscriptions" ]]; then
|
||||||
@@ -96,6 +94,10 @@ if [[ ! -d "/wp-core/wp-content/plugins/woocommerce-subscriptions" ]]; then
|
|||||||
unzip -q -o "$WOOCOMMERCE_SUBS_ZIP" -d /wp-core/wp-content/plugins/
|
unzip -q -o "$WOOCOMMERCE_SUBS_ZIP" -d /wp-core/wp-content/plugins/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# activate all plugins which source code want to access in tests runtime
|
||||||
|
wp plugin activate woocommerce
|
||||||
|
wp plugin activate woocommerce-subscriptions
|
||||||
|
|
||||||
# add configuration
|
# add configuration
|
||||||
CONFIG=''
|
CONFIG=''
|
||||||
CONFIG+="define('WP_DEBUG', true);\n"
|
CONFIG+="define('WP_DEBUG', true);\n"
|
||||||
|
Reference in New Issue
Block a user