Relocate helper (child) themes (#47080)
* Relocate helper (child) themes * Add changefile(s) from automation for the following project(s): woocommerce-blocks * Correct wrong template slugs --------- Co-authored-by: github-actions <github-actions@github.com>
|
@ -21,8 +21,14 @@
|
|||
"https://downloads.wordpress.org/theme/storefront.latest-stable.zip",
|
||||
"https://downloads.wordpress.org/theme/twentytwentyone.latest-stable.zip",
|
||||
"https://downloads.wordpress.org/theme/twentytwentyfour.latest-stable.zip",
|
||||
"./tests/mocks/emptytheme",
|
||||
"./tests/mocks/theme-with-woo-templates"
|
||||
"./tests/e2e/themes/emptytheme",
|
||||
"./tests/e2e/themes/storefront-child__block-notices-filter",
|
||||
"./tests/e2e/themes/storefront-child__block-notices-template",
|
||||
"./tests/e2e/themes/storefront-child__classic-notices-template",
|
||||
"./tests/e2e/themes/theme-with-woo-templates",
|
||||
"./tests/e2e/themes/twentytwentyfour-child__block-notices-filter",
|
||||
"./tests/e2e/themes/twentytwentyfour-child__block-notices-template",
|
||||
"./tests/e2e/themes/twentytwentyfour-child__classic-notices-template"
|
||||
],
|
||||
"config": {
|
||||
"JETPACK_AUTOLOAD_DEV": true,
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Get the directory of the current script.
|
||||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# The theme dir is two levels up from where this script is running.
|
||||
themes_dir="$script_dir/../../themes"
|
||||
|
||||
# Delete the child themes if they already exist.
|
||||
wp theme delete storefront-child__block-notices-filter
|
||||
wp theme delete storefront-child__block-notices-template
|
||||
wp theme delete storefront-child__classic-notices-template
|
||||
wp theme delete twentytwentyfour-child__block-notices-filter
|
||||
wp theme delete twentytwentyfour-child__block-notices-template
|
||||
wp theme delete twentytwentyfour-child__classic-notices-template
|
||||
|
||||
# Install the child themes.
|
||||
wp theme install "$themes_dir/storefront-child__block-notices-filter.zip"
|
||||
wp theme install "$themes_dir/storefront-child__block-notices-template.zip"
|
||||
wp theme install "$themes_dir/storefront-child__classic-notices-template.zip"
|
||||
wp theme install "$themes_dir/twentytwentyfour-child__block-notices-filter.zip"
|
||||
wp theme install "$themes_dir/twentytwentyfour-child__block-notices-template.zip"
|
||||
wp theme install "$themes_dir/twentytwentyfour-child__classic-notices-template.zip"
|
|
@ -6,34 +6,6 @@ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||
head_dir=$(cd "$(dirname "$script_dir")" && cd ../../.. && pwd)
|
||||
relative_path=${script_dir#$head_dir/}
|
||||
|
||||
# Generate the child themes zip files before running the tests.
|
||||
# By doing so, we ensure that the zip files are up-to-date.
|
||||
themes_dir="$script_dir/themes"
|
||||
themes=(
|
||||
"storefront-child__block-notices-filter"
|
||||
"storefront-child__block-notices-template"
|
||||
"storefront-child__classic-notices-template"
|
||||
"twentytwentyfour-child__block-notices-filter"
|
||||
"twentytwentyfour-child__block-notices-template"
|
||||
"twentytwentyfour-child__classic-notices-template"
|
||||
)
|
||||
for theme in "${themes[@]}"; do
|
||||
# Define the path to the theme directory and the zip file.
|
||||
theme_dir="$themes_dir/$theme"
|
||||
zip_file="$themes_dir/$theme.zip"
|
||||
|
||||
# Check if the zip file exists. If it does, delete it.
|
||||
if [ -f "$zip_file" ]; then
|
||||
echo "Deleting existing zip file for $theme."
|
||||
rm "$zip_file"
|
||||
fi
|
||||
|
||||
# Navigate to the themes directory to ensure the zip contains only the theme folder name.
|
||||
# Then, create a fresh zip file.
|
||||
echo "Creating zip file for $theme."
|
||||
(cd "$themes_dir" && zip -r "$zip_file" "$theme" -x "*.git*" -x "*node_modules*")
|
||||
done
|
||||
|
||||
# Run the main script in the container for better performance.
|
||||
wp-env run tests-cli -- bash wp-content/plugins/woocommerce/blocks-bin/playwright/scripts/index.sh
|
||||
wp-env run tests-cli wp option update woocommerce_coming_soon 'no'
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
/*
|
||||
Theme Name: Storefront Child (Block Notices by filter)
|
||||
Template: storefront
|
||||
*/
|
|
@ -1,4 +0,0 @@
|
|||
/*
|
||||
Theme Name: Storefront Child (Block Notices by template)
|
||||
Template: storefront
|
||||
*/
|
|
@ -1,4 +0,0 @@
|
|||
/*
|
||||
Theme Name: Storefront Child (Classic Notices by template)
|
||||
Template: storefront
|
||||
*/
|
|
@ -1,4 +0,0 @@
|
|||
/*
|
||||
Theme Name: Twenty Twenty-Four Child (Block Notices by filter)
|
||||
Template: twentytwentyfour
|
||||
*/
|
|
@ -1,4 +0,0 @@
|
|||
/*
|
||||
Theme Name: Twenty Twenty-Four Child (Block Notices by template)
|
||||
Template: twentytwentyfour
|
||||
*/
|
|
@ -1,4 +0,0 @@
|
|||
/*
|
||||
Theme Name: Twenty Twenty-Four Child (Classic Notices by template)
|
||||
Template: twentytwentyfour
|
||||
*/
|
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Theme Name: Storefront Child (block notices by filter)
|
||||
* Theme URI: https://github.com/woocommerce/woocommerce/
|
||||
* Template: storefront
|
||||
* Description: Storefront child theme to test block notices by filter.
|
||||
* Version: 1.0
|
||||
* Author: WooCommerce
|
||||
* Author URI: https://woo.com
|
||||
* Requires at least: 5.3
|
||||
* Requires PHP: 5.6
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Theme Name: Storefront Child (block notices by template)
|
||||
* Theme URI: https://github.com/woocommerce/woocommerce/
|
||||
* Template: storefront
|
||||
* Description: Storefront child theme to test block notices by template.
|
||||
* Version: 1.0
|
||||
* Author: WooCommerce
|
||||
* Author URI: https://woo.com
|
||||
* Requires at least: 5.3
|
||||
* Requires PHP: 5.6
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Theme Name: Storefront Child (classic notices by template)
|
||||
* Theme URI: https://github.com/woocommerce/woocommerce/
|
||||
* Template: storefront
|
||||
* Description: Storefront child theme to test classic notices by template.
|
||||
* Version: 1.0
|
||||
* Author: WooCommerce
|
||||
* Author URI: https://woo.com
|
||||
* Requires at least: 5.3
|
||||
* Requires PHP: 5.6
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Theme Name: Twenty Twenty-Four Child (block notices by filter)
|
||||
* Theme URI: https://github.com/woocommerce/woocommerce/
|
||||
* Template: twentytwentyfour
|
||||
* Description: Twenty Twenty-Four child theme to test block notices by filter.
|
||||
* Version: 1.0
|
||||
* Author: WooCommerce
|
||||
* Author URI: https://woo.com
|
||||
* Requires at least: 5.3
|
||||
* Requires PHP: 5.6
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Theme Name: Twenty Twenty-Four Child (block notices by template)
|
||||
* Theme URI: https://github.com/woocommerce/woocommerce/
|
||||
* Template: twentytwentyfour
|
||||
* Description: Twenty Twenty-Four child theme to test block notices by template.
|
||||
* Version: 1.0
|
||||
* Author: WooCommerce
|
||||
* Author URI: https://woo.com
|
||||
* Requires at least: 5.3
|
||||
* Requires PHP: 5.6
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Theme Name: Twenty Twenty-Four Child (classic notices by template)
|
||||
* Theme URI: https://github.com/woocommerce/woocommerce/
|
||||
* Template: twentytwentyfour
|
||||
* Description: Twenty Twenty-Four child theme to test classic notices by template.
|
||||
* Version: 1.0
|
||||
* Author: WooCommerce
|
||||
* Author URI: https://woo.com
|
||||
* Requires at least: 5.3
|
||||
* Requires PHP: 5.6
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
Before Width: | Height: | Size: 149 KiB |
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Load e2e test helper (child) themes via .wp-json instead of via WP-CLI.
|