Commit Graph

3 Commits

Author SHA1 Message Date
Manish Menaria 5d5fc57e8c
Fix: migration issues when transitioning from Products (Beta) block to Product Collection block (#43130)
* Update product query block templates with WooCommerce namespace

It modifies the `<wp:post-template>` block in multiple files to include a new attribute: `{"__woocommerceNamespace":"woocommerce/product-query/product-template"}`.

The inclusion of the `__woocommerceNamespace` attribute is a strategic enhancement, ensuring that these block templates are explicitly recognized as part of the WooCommerce namespace.
This fix the issue where migration from Products beta block to Product Collection block doesn't work properly.

* Fix linting error

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-29 12:09:12 +05:30
Alba Rincón 87510929b5 Create the `Products by Attribute` template (https://github.com/woocommerce/woocommerce-blocks/pull/7660)
* Create the `Products by Attribute` template

* bot: update checkstyle.xml

* Fix typo

* Rename template to `taxonomy-product_attribute`

* Rename test template file

* bot: update checkstyle.xml

* Fix test enabling archives for shade attribute

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-16 14:37:41 +01:00
Lucio Giannotta 08a99165ca Add mock theme with Woo Templates for E2E tests (https://github.com/woocommerce/woocommerce-blocks/pull/5920)
This PR adds a block-enabled theme with templates for WooCommerce
which is intended to be used when testing the more complex scenarios
such as template fallbacks.

Additionally, since theme-dependent logic seems to be becoming more
and more useful (see woocommerce/woocommerce-blocks#5913), this PR also adds a utility function used to
explicitly declare theme dependencies of a test (`useTheme`).

Said function will activate the theme before running a given suite and then
reactivate the previous theme, as to make sure to not have any side-effects
(such as the ones described in woocommerce/woocommerce-blocks#5913 above).

Closes woocommerce/woocommerce-blocks#5660
2022-03-02 15:49:00 +01:00