Update editor util method to make it compatible with Gutenberg new labeling Block Inserter (#52107)

* Update string for Block Inserter

* Add changelog

* Update util method and add comment
This commit is contained in:
Veljko V. 2024-10-17 18:10:59 +02:00 committed by GitHub
parent 3c830d6f3f
commit 6eb01a2e35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Update editor util to use new string Block Inserter which is compatible with both Gutenberg and without it

View File

@ -68,9 +68,10 @@ const fillPageTitle = async ( page, title ) => {
};
const insertBlock = async ( page, blockName, wpVersion = null ) => {
// With Gutenberg active we have Block Inserter name
await page
.getByRole( 'button', {
name: 'Toggle block inserter',
name: /Toggle block inserter|Block Inserter/,
expanded: false,
} )
.click();