2023-04-17 12:01:41 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-08-22 10:32:05 +00:00
|
|
|
# Extract the relative path from the plugin root to this script directory.
|
|
|
|
# By doing so, we can run this script from anywhere.
|
2023-04-17 12:01:41 +00:00
|
|
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
2023-08-22 10:32:05 +00:00
|
|
|
head_dir=$(cd "$(dirname "$script_dir")" && cd ../../.. && pwd)
|
|
|
|
relative_path=${script_dir#$head_dir/}
|
2023-04-17 12:01:41 +00:00
|
|
|
|
2024-05-13 15:19:15 +00:00
|
|
|
# Remove the database snapshot if it exists.
|
|
|
|
wp-env run tests-cli -- rm blocks_e2e.sql 2> /dev/null
|
2023-08-22 10:32:05 +00:00
|
|
|
# Run the main script in the container for better performance.
|
2023-12-15 17:34:29 +00:00
|
|
|
wp-env run tests-cli -- bash wp-content/plugins/woocommerce/blocks-bin/playwright/scripts/index.sh
|
2024-05-13 15:19:15 +00:00
|
|
|
# Disable the LYS Coming Soon banner.
|
2024-04-12 11:26:12 +00:00
|
|
|
wp-env run tests-cli wp option update woocommerce_coming_soon 'no'
|