-
Notifications
You must be signed in to change notification settings - Fork 221
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: 0 B Total Size: 1.42 MB ℹ️ View Unchanged
|
bash $script_dir/attributes.sh | ||
|
||
# Run all scripts in parallel at maximum 10 at a time | ||
find $script_dir/parallel/*.sh -maxdepth 1 -type f | xargs -P10 -n1 bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dinhtungdu, for your effort in improving E2E test infrastructure! Great work and LGTM!
I just added a comment because I'm not sure that all products page
is necessary, but I'm pre-approving the PR.
wp post create \ | ||
--menu_order=0 \ | ||
--post_type=page \ | ||
--post_status=publish \ | ||
--post_author=1 \ | ||
--post_title='All Products block' \ | ||
${script_dir}/all-products.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. In this PR, I'm trying to convert the old script to the new one only. Searching our tests, look like we aren't using that page anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gigitux and @dinhtungdu In https://github.com/nielslange/woo-test-environment, the All Products block
is used for the shop page, see https://github.com/nielslange/woo-test-environment/blob/5cfa23af4a4aa426f71b7a626ad8a3786f722ccb/command.php#L212-L216
I'll try to review this PR later today and will double-check if the All Products block
is needed or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gigitux and @dinhtungdu These are the only places, where we interact with the All Products block
:
woocommerce-blocks/tests/e2e/tests/price-filter/price-filter.block_theme.side_effects.spec.ts
Line 31 in 1d0af20
await editor.insertBlock( { name: 'woocommerce/all-products' } ); |
woocommerce-blocks/tests/e2e/tests/price-filter/price-filter.block_theme.side_effects.spec.ts
Lines 46 to 48 in 1d0af20
const allProductsBlock = await frontendUtils.getBlockByName( | |
'woocommerce/all-products' | |
); |
woocommerce-blocks/tests/e2e/tests/price-filter/price-filter.block_theme.side_effects.spec.ts
Lines 77 to 79 in 1d0af20
const allProductsBlock = await frontendUtils.getBlockByName( | |
'woocommerce/all-products' | |
); |
await editor.insertBlock( { name: 'woocommerce/all-products' } ); |
As far as I can tell, the page All Products block
is not loaded directly anywhere and can safely be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the All Products block page in 4473ffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, @dinhtungdu. The environment starts indeed much faster. Well done that you separated the setup steps into various shell scripts. 👏
wp post create \ | ||
--menu_order=0 \ | ||
--post_type=page \ | ||
--post_status=publish \ | ||
--post_author=1 \ | ||
--post_title='All Products block' \ | ||
${script_dir}/all-products.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gigitux and @dinhtungdu These are the only places, where we interact with the All Products block
:
woocommerce-blocks/tests/e2e/tests/price-filter/price-filter.block_theme.side_effects.spec.ts
Line 31 in 1d0af20
await editor.insertBlock( { name: 'woocommerce/all-products' } ); |
woocommerce-blocks/tests/e2e/tests/price-filter/price-filter.block_theme.side_effects.spec.ts
Lines 46 to 48 in 1d0af20
const allProductsBlock = await frontendUtils.getBlockByName( | |
'woocommerce/all-products' | |
); |
woocommerce-blocks/tests/e2e/tests/price-filter/price-filter.block_theme.side_effects.spec.ts
Lines 77 to 79 in 1d0af20
const allProductsBlock = await frontendUtils.getBlockByName( | |
'woocommerce/all-products' | |
); |
await editor.insertBlock( { name: 'woocommerce/all-products' } ); |
As far as I can tell, the page All Products block
is not loaded directly anywhere and can safely be removed.
This PR are trying to some related issues at once. I'm sorry about that. In this PR:
txt
tohtml
to use syntax highlighting in the editor.tests/e2e/bin/posts/
and and the setup script will pick it automatically.tests/e2e/bin/scripts/
and the setup script will pick it automatically.By introducing all of those changes above, we're able to cut the time running
npm run evn:restart
down to49s
on my machine, while the previous setup time is2m41s
in my recent test.On CI, the improvement is also notable.
Fixes #9646, fixes #10594
Testing
Automated Tests
User Facing Testing
Ensure the Playwright tests are still passing.
WooCommerce Visibility
Performance Impact
Improve the speed of the provision process for e2e environment.
Changelog
N/a