Cherry pick 51021 into release/9.3 (#51031)
* [tests] Execute test env setup on host instead of wp-env container (reverts #50445) (#51021) * Prep for cherry pick 51021 --------- Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com> Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
This commit is contained in:
parent
e88474b437
commit
fe8bd470e4
|
@ -16,8 +16,8 @@
|
|||
"test-data/images/": "./tests/e2e-pw/test-data/images/"
|
||||
},
|
||||
"lifecycleScripts": {
|
||||
"afterStart": "wp-env run tests-cli bash wp-content/plugins/woocommerce/tests/e2e-pw/bin/test-env-setup.sh",
|
||||
"afterClean": "wp-env run tests-cli bash wp-content/plugins/woocommerce/tests/e2e-pw/bin/test-env-setup.sh"
|
||||
"afterStart": "./tests/e2e-pw/bin/test-env-setup.sh",
|
||||
"afterClean": "./tests/e2e-pw/bin/test-env-setup.sh"
|
||||
},
|
||||
"env": {
|
||||
"development": {
|
||||
|
|
|
@ -302,6 +302,7 @@ WooCommerce comes with some sample data you can use to see how products look; im
|
|||
* Update - Update core profiler continue button container on extension screen [#50582](https://github.com/woocommerce/woocommerce/pull/50582)
|
||||
* Update - Update Store Alert actions to have unique keys. [#50424](https://github.com/woocommerce/woocommerce/pull/50424)
|
||||
* Update - Update WooCommercePayments task is_supported to use default suggestions [#50585](https://github.com/woocommerce/woocommerce/pull/50585)
|
||||
* Dev - Execute test env setup on host instead of wp-env container [#51021](https://github.com/woocommerce/woocommerce/pull/51021)
|
||||
* Dev - Added code docs with examples to the Analytics classes [#49425](https://github.com/woocommerce/woocommerce/pull/49425)
|
||||
* Dev - Add lost password e2e tests [#50611](https://github.com/woocommerce/woocommerce/pull/50611)
|
||||
* Dev - Add unit tests for the product_add_publish track. [#49916](https://github.com/woocommerce/woocommerce/pull/49916)
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo -e 'Activate default theme \n'
|
||||
wp theme activate twentytwentythree
|
||||
wp-env run tests-cli wp theme activate twentytwentythree
|
||||
|
||||
echo -e 'Update URL structure \n'
|
||||
wp rewrite structure '/%postname%/' --hard
|
||||
wp-env run tests-cli wp rewrite structure '/%postname%/' --hard
|
||||
|
||||
echo -e 'Activate Filter Setter utility plugin \n'
|
||||
wp plugin activate filter-setter
|
||||
wp-env run tests-cli wp plugin activate filter-setter
|
||||
|
||||
# This plugin allows you to process queued scheduled actions immediately.
|
||||
# It's used in the analytics e2e tests so that order numbers are shown in Analytics.
|
||||
echo -e 'Activate Process Waiting Actions utility plugin \n'
|
||||
wp plugin activate process-waiting-actions
|
||||
wp-env run tests-cli wp plugin activate process-waiting-actions
|
||||
|
||||
echo -e 'Activate Test Helper APIs utility plugin \n'
|
||||
wp plugin activate test-helper-apis
|
||||
wp-env run tests-cli wp plugin activate test-helper-apis
|
||||
|
||||
echo -e 'Add Customer user \n'
|
||||
wp user create customer customer@woocommercecoree2etestsuite.com \
|
||||
wp-env run tests-cli wp user create customer customer@woocommercecoree2etestsuite.com \
|
||||
--user_pass=password \
|
||||
--role=customer \
|
||||
--first_name='Jane' \
|
||||
|
@ -26,17 +26,17 @@ wp user create customer customer@woocommercecoree2etestsuite.com \
|
|||
--user_registered='2022-01-01 12:23:45'
|
||||
|
||||
echo -e 'Update Blog Name \n'
|
||||
wp option update blogname 'WooCommerce Core E2E Test Suite'
|
||||
wp-env run tests-cli wp option update blogname 'WooCommerce Core E2E Test Suite'
|
||||
|
||||
echo -e 'Preparing Test Files \n'
|
||||
sudo cp /var/www/html/wp-content/plugins/woocommerce/tests/legacy/unit-tests/importer/sample.csv /var/www/sample.csv
|
||||
wp-env run tests-cli sudo cp /var/www/html/wp-content/plugins/woocommerce/tests/legacy/unit-tests/importer/sample.csv /var/www/sample.csv
|
||||
|
||||
ENABLE_TRACKING="${ENABLE_TRACKING:-0}"
|
||||
|
||||
if [ $ENABLE_TRACKING == 1 ]; then
|
||||
echo -e 'Enable tracking\n'
|
||||
wp option update woocommerce_allow_tracking 'yes'
|
||||
wp-env run tests-cli wp option update woocommerce_allow_tracking 'yes'
|
||||
fi
|
||||
|
||||
echo -e 'Upload test images \n'
|
||||
wp media import './test-data/images/image-01.png' './test-data/images/image-02.png' './test-data/images/image-03.png'
|
||||
wp-env run tests-cli wp media import './test-data/images/image-01.png' './test-data/images/image-02.png' './test-data/images/image-03.png'
|
||||
|
|
Loading…
Reference in New Issue