Hide Products (Beta) from inserter (#48204)

* Hide Products (Beta) from inserter

* Add changelog

* Update E2E test replacing Products with Product Collection block

* Add step to choose collection in E2E test

* Change fill PW method to pressSequentially so the inserter shows blocks

* Update changelog entry
This commit is contained in:
Karol Manijak 2024-06-12 15:45:27 +02:00 committed by GitHub
parent 635524b481
commit c378a698ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 4 deletions

View File

@ -6,7 +6,7 @@
"title": "Product Collection",
"description": "Display a collection of products from your store.",
"category": "woocommerce",
"keywords": [ "WooCommerce", "Products (Beta)" ],
"keywords": [ "WooCommerce", "Products (Beta)", "products" ],
"textdomain": "woocommerce",
"attributes": {
"queryId": {

View File

@ -63,7 +63,7 @@ const registerProductsBlock = ( attributes: QueryBlockAttributes ) => {
// @ts-ignore
allowedControls: DEFAULT_ALLOWED_CONTROLS,
innerBlocks: INNER_BLOCKS_TEMPLATE,
scope: [ 'inserter' ],
scope: [],
} );
};

View File

@ -0,0 +1,4 @@
Significance: major
Type: update
Products (Beta): hide block from inserter in favor of Product Collection block

View File

@ -261,7 +261,7 @@ test.describe( 'Browse product tags and attributes from the product page', () =>
} );
test( 'can see products showcase', async ( { page } ) => {
// create as a merchant a new page with Products block
// create as a merchant a new page with Product Collection block
await goToPageEditor( { page } );
await page
@ -274,9 +274,16 @@ test.describe( 'Browse product tags and attributes from the product page', () =>
.getByRole( 'document', {
name: 'Empty block; start writing or type forward slash to choose a block',
} )
.fill( '/products' );
.pressSequentially( '/product collection' );
await page.keyboard.press( 'Enter' );
// Product Collection requires choosing some collection.
await page
.getByRole( 'button', {
name: 'Product Catalog Display all products in your catalog. Results can (change to) match the current template, page, or search term.',
} )
.click();
await page
.getByRole( 'button', { name: 'Publish', exact: true } )
.click();