Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7737e2c
Migrate shopper-subscriptions-purchase-sign-up-fee spec
mgascam Oct 6, 2025
fb8e0c7
Migrate shopper-subscriptions-purchase-sign-up-fee
mgascam Oct 6, 2025
af13a8e
Migrate shopper-subscriptions-purchase-multiple-subscriptions
mgascam Oct 7, 2025
e1a6245
Migrate shopper-subscriptions-purchase-free-trial spec
mgascam Oct 7, 2025
66498bc
WIP shopper-subscriptions-manage-payments
mgascam Oct 7, 2025
9cd5d6e
Migrate shopper-subscriptions-manage-payments
mgascam Oct 7, 2025
07ff3cb
Migrate merchant-subscriptions-settings
mgascam Oct 7, 2025
088c119
Migrate merchant-subscriptions-renew spec
mgascam Oct 7, 2025
666824f
Wip migrate merchant-subscriptions-renew-action-scheduler
mgascam Oct 7, 2025
55615a5
Migrate merchant-subscriptions-renew-action-scheduler
mgascam Oct 7, 2025
c272505
Refactor subscription tests to remove legacy test guards
mgascam Oct 7, 2025
2dc0888
Merge branch 'dev/qit-e2e-merchant-specs-migration' into dev/qit-e2e-…
mgascam Oct 7, 2025
b2b59d2
Update setup paths for subscription products and adjust QIT volume mo…
mgascam Oct 7, 2025
32f192f
Merge branch 'dev/qit-e2e-merchant-specs-migration' into dev/qit-e2e-…
mgascam Oct 8, 2025
ffd7e59
Migrate shopper-myaccount-renew-subscription spec
mgascam Oct 8, 2025
81c0c67
Update woocommerce-subscriptions plugin reference in QIT configuration
mgascam Oct 8, 2025
c68c5ae
Refactor QIT setup scripts: remove WordPress importer installation an…
mgascam Oct 8, 2025
1e0a889
Merge branch 'dev/qit-e2e-merchant-specs-migration' into dev/qit-e2e-…
mgascam Oct 8, 2025
f7e7d90
Merge branch 'dev/qit-e2e-merchant-specs-migration' into dev/qit-e2e-…
mgascam Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions tests/qit/e2e/bootstrap/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ echo "Setting up WooPayments for E2E testing..."
# Ensure environment is marked as development so dev-only CLI commands are available
wp config set WP_ENVIRONMENT_TYPE development --quiet 2>/dev/null || true

echo "Installing WordPress importer for sample data..."
if ! wp plugin is-installed wordpress-importer >/dev/null 2>&1; then
wp plugin install wordpress-importer --activate
else
wp plugin activate wordpress-importer
fi

WC_SAMPLE_DATA_PATH=$(wp eval 'echo trailingslashit( WP_CONTENT_DIR ) . "plugins/woocommerce/sample-data/sample_products.xml";' 2>/dev/null)
if [ -z "$WC_SAMPLE_DATA_PATH" ]; then
echo "Unable to resolve WooCommerce sample data path; skipping import."
Expand All @@ -30,6 +23,31 @@ else
fi
fi

# Import WooCommerce Subscriptions products if the plugin is installed
echo "Checking for WooCommerce Subscriptions plugin..."
if wp plugin is-installed woocommerce-subscriptions 2>/dev/null; then
echo "WooCommerce Subscriptions detected - configuring settings..."

# Allow multiple subscriptions to be purchased in a single order
# This is required for testing scenarios where customers buy multiple subscription products
wp option update woocommerce_subscriptions_multiple_purchase "yes"
echo "✅ Enabled multiple subscription purchases"

# Import subscription products
echo "Importing subscription products..."
# Note: /qit/bootstrap is a volume mount defined in qit.yml pointing to ./e2e/bootstrap
WC_SUBSCRIPTIONS_DATA_PATH="/qit/bootstrap/wc-subscription-products.xml"

if [ -f "$WC_SUBSCRIPTIONS_DATA_PATH" ]; then
wp import "$WC_SUBSCRIPTIONS_DATA_PATH" --authors=skip
echo "✅ Subscription products imported successfully"
else
echo "Warning: Subscription products XML not found at $WC_SUBSCRIPTIONS_DATA_PATH"
fi
else
echo "WooCommerce Subscriptions not installed - skipping subscription products import"
fi

# Ensure WooCommerce core pages exist and capture IDs
echo "Ensuring WooCommerce core pages exist..."
wp wc --user=admin tool run install_pages >/dev/null 2>&1 || true
Expand Down Expand Up @@ -88,14 +106,6 @@ wp option set woocommerce_checkout_company_field "optional" --quiet 2>/dev/null
wp option set woocommerce_coming_soon "no" --quiet 2>/dev/null || true
wp option set woocommerce_store_pages_only "no" --quiet 2>/dev/null || true

# Ensure Storefront theme is active for consistent storefront markup
if ! wp theme is-installed storefront > /dev/null 2>&1; then
wp theme install storefront --force
fi
wp theme activate storefront



# Create a test customer
wp user create testcustomer [email protected] \
--role=customer \
Expand Down
Loading
Loading