Fix Filter blocks e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/10116)
* 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:
parent
3ccfec1eee
commit
ad973e9b46
|
@ -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=\"{"alignButtons":false,"columns":3,"contentVisibility":{"orderBy":true},"isPreview":false,"layoutConfig":[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],"orderby":"date","rows":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=\"{"alignButtons":false,"columns":3,"contentVisibility":{"orderBy":true},"isPreview":false,"layoutConfig":[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],"orderby":"date","rows":3}\"></div>\n<!-- /wp:woocommerce/all-products -->"}
|
||||
|
|
|
@ -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>"}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue