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:
parent
3c830d6f3f
commit
6eb01a2e35
|
@ -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
|
|
@ -68,9 +68,10 @@ const fillPageTitle = async ( page, title ) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const insertBlock = async ( page, blockName, wpVersion = null ) => {
|
const insertBlock = async ( page, blockName, wpVersion = null ) => {
|
||||||
|
// With Gutenberg active we have Block Inserter name
|
||||||
await page
|
await page
|
||||||
.getByRole( 'button', {
|
.getByRole( 'button', {
|
||||||
name: 'Toggle block inserter',
|
name: /Toggle block inserter|Block Inserter/,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
} )
|
} )
|
||||||
.click();
|
.click();
|
||||||
|
|
Loading…
Reference in New Issue