Update the testing instructions for woocommerce/woocommerce-blocks#10619
This commit is contained in:
parent
e491c07e1b
commit
0488824275
|
@ -153,45 +153,11 @@ In some cases, I linked PRs. In that case, please refer to the testing scenarios
|
|||
|
||||
#### Dispatch the wc-blocks_render_blocks_frontend event when rendering the empty cart block [#10619](https://github.com/woocommerce/woocommerce-blocks/pull/10619)
|
||||
|
||||
##### User-facing testing
|
||||
|
||||
1. Add the Cart block and switch to the Empty Cart edit mode.
|
||||
2. Replace the Newest products block with the All Products block. Feel free to add other JS-rendered blocks like a filter or a Reviews block.
|
||||
2. Replace the Newest products block with the All Products block.
|
||||
3. View the page in the frontend.
|
||||
4. Verify all blocks render correctly when the cart is empty. Try adding a product to the cart (so it switches to the Full Cart view) and removing it (so it switches back to the Empty Cart view). Verify the blocks still render correctly.
|
||||
|
||||
##### Developer Facing Testing
|
||||
|
||||
1. Install [Carousel Slider Block for Gutenberg](https://wordpress.org/plugins/carousel-block/) and activate it.
|
||||
2. Edit the plugin's files, find `wp-content/plugins/carousel-block/blocks/carousel/view.js` - change the code inside to:
|
||||
|
||||
```ts
|
||||
/*!
|
||||
* Carousel Block
|
||||
* Version: 1.0.0
|
||||
*/
|
||||
( function ( $ ) {
|
||||
const cartBlock = document.querySelector( '.wp-block-woocommerce-cart' );
|
||||
cartBlock.addEventListener(
|
||||
'wc-blocks_render_blocks_frontend',
|
||||
function () {
|
||||
$( '.wp-block-cb-carousel' ).slick();
|
||||
}
|
||||
);
|
||||
} )( jQuery );
|
||||
|
||||
```
|
||||
|
||||
4. Open the Cart page in the site editor and edit the template.
|
||||
5. Select the Cart block and click the "Filled cart" button, change the view to "Empty cart".
|
||||
6. Add the Carousel Slider block, add some slides to it (I used images, and added 4).
|
||||
7. Save the template.
|
||||
8. Load the Cart block in the front end. If there's an item there, remove it.
|
||||
9. Ensure the carousel you added renders correctly and you can move between slides.
|
||||
10. Add an item to your cart.
|
||||
11. Remove the item and double check the carousel slider still works when returning to the empty cart.
|
||||
12. Also perform the user-facing testing.
|
||||
|
||||
#### Remove client side navigation from Products beta block [#10636](https://github.com/woocommerce/woocommerce-blocks/pull/10636)
|
||||
|
||||
1. Create a new post
|
||||
|
|
Loading…
Reference in New Issue