* Revert "fix save method"

This reverts commit f6623c55320bf55ee7fa3c23eb294f06d79ee4a5.

* Revert "Revert "fix save method""

This reverts commit 739db2e3b0b62e10fbe1ebabd1ec6bbae8425b3c.

* Update Filter by Attribute and Filter by Stock e2e test fixtures

* Update Filter by Attribute 'can hide product count' test
This commit is contained in:
Albert Juhé Lluveras 2023-07-06 16:39:19 +02:00 committed by GitHub
parent 3ccfec1eee
commit ad973e9b46
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
{"title":"Filter by Attribute Block","pageContent":"<!-- wp:woocommerce/filter-wrapper {\"filterType\":\"attribute-filter\",\"heading\":\"Filter by Capacity\"} --><div class=\"wp-block-woocommerce-filter-wrapper\"><!-- wp:heading {\"level\":3} --><h3>Filter by Capacity</h3><!-- /wp:heading --><!-- wp:woocommerce/attribute-filter {\"heading\":\"\",\"lock\":{\"remove\":true}} --><div class=\"wp-block-woocommerce-attribute-filter is-loading\"><span aria-hidden=\"true\" class=\"wc-block-product-attribute-filter__placeholder\"></span></div><!-- /wp:woocommerce/attribute-filter --></div><!-- /wp:woocommerce/filter-wrapper --></div><!-- wp:woocommerce/all-products {\"columns\":3,\"rows\":3,\"alignButtons\":false,\"contentVisibility\":{\"orderBy\":true},\"orderby\":\"date\",\"layoutConfig\":[[\"woocommerce/product-image\"],[\"woocommerce/product-title\"],[\"woocommerce/product-price\"],[\"woocommerce/product-rating\"],[\"woocommerce/product-button\"]]} -->\n<div class=\"wp-block-woocommerce-all-products wc-block-all-products\" data-attributes=\"{&quot;alignButtons&quot;:false,&quot;columns&quot;:3,&quot;contentVisibility&quot;:{&quot;orderBy&quot;:true},&quot;isPreview&quot;:false,&quot;layoutConfig&quot;:[[&quot;woocommerce/product-image&quot;],[&quot;woocommerce/product-title&quot;],[&quot;woocommerce/product-price&quot;],[&quot;woocommerce/product-rating&quot;],[&quot;woocommerce/product-button&quot;]],&quot;orderby&quot;:&quot;date&quot;,&quot;rows&quot;:3}\"></div>\n<!-- /wp:woocommerce/all-products -->"}
{"title":"Filter by Attribute Block","pageContent":"<!-- wp:woocommerce/filter-wrapper {\"filterType\":\"attribute-filter\",\"heading\":\"Filter by Capacity\"} --><div class=\"wp-block-woocommerce-filter-wrapper\"><!-- wp:heading {\"level\":3} --><h3>Filter by Capacity</h3><!-- /wp:heading --><!-- wp:woocommerce/attribute-filter {\"heading\":\"\",\"lock\":{\"remove\":true}} --><div class=\"wp-block-woocommerce-attribute-filter is-loading\"></div><!-- /wp:woocommerce/attribute-filter --></div><!-- /wp:woocommerce/filter-wrapper --></div><!-- wp:woocommerce/all-products {\"columns\":3,\"rows\":3,\"alignButtons\":false,\"contentVisibility\":{\"orderBy\":true},\"orderby\":\"date\",\"layoutConfig\":[[\"woocommerce/product-image\"],[\"woocommerce/product-title\"],[\"woocommerce/product-price\"],[\"woocommerce/product-rating\"],[\"woocommerce/product-button\"]]} -->\n<div class=\"wp-block-woocommerce-all-products wc-block-all-products\" data-attributes=\"{&quot;alignButtons&quot;:false,&quot;columns&quot;:3,&quot;contentVisibility&quot;:{&quot;orderBy&quot;:true},&quot;isPreview&quot;:false,&quot;layoutConfig&quot;:[[&quot;woocommerce/product-image&quot;],[&quot;woocommerce/product-title&quot;],[&quot;woocommerce/product-price&quot;],[&quot;woocommerce/product-rating&quot;],[&quot;woocommerce/product-button&quot;]],&quot;orderby&quot;:&quot;date&quot;,&quot;rows&quot;:3}\"></div>\n<!-- /wp:woocommerce/all-products -->"}

View File

@ -1 +1 @@
{"title":"Filter Products by Stock Block","pageContent":"<!-- wp:woocommerce/filter-wrapper {\"filterType\":\"stock-filter\",\"heading\":\"Filter by stock status\"} --><div class=\"wp-block-woocommerce-filter-wrapper\"><!-- wp:heading {\"level\":3} --><h3>Filter by stock status</h3><!-- /wp:heading --><!-- wp:woocommerce/stock-filter {\"heading\":\"\",\"lock\":{\"remove\":true,\"move\":true}} --><div class=\"wp-block-woocommerce-stock-filter is-loading\"><span aria-hidden=\"true\" class=\"wc-block-product-stock-filter__placeholder\"></span></div><!-- /wp:woocommerce/stock-filter --></div><!-- /wp:woocommerce/filter-wrapper --></div>"}
{"title":"Filter Products by Stock Block","pageContent":"<!-- wp:woocommerce/filter-wrapper {\"filterType\":\"stock-filter\",\"heading\":\"Filter by stock status\"} --><div class=\"wp-block-woocommerce-filter-wrapper\"><!-- wp:heading {\"level\":3} --><h3>Filter by stock status</h3><!-- /wp:heading --><!-- wp:woocommerce/stock-filter {\"heading\":\"\",\"lock\":{\"remove\":true,\"move\":true}} --><div class=\"wp-block-woocommerce-stock-filter is-loading\"></div><!-- /wp:woocommerce/stock-filter --></div><!-- /wp:woocommerce/filter-wrapper --></div>"}

View File

@ -87,13 +87,13 @@ describe( `${ block.name } Block`, () => {
} );
it( 'can hide product count', async () => {
await expect( page ).toMatchElement(
await expect( page ).not.toMatchElement(
'.wc-filter-element-label-list-count'
);
await expect( page ).toClick( 'label', {
text: 'Display product count',
} );
await expect( page ).not.toMatchElement(
await expect( page ).toMatchElement(
'.wc-filter-element-label-list-count'
);
// reset