diff --git a/plugins/woocommerce/changelog/e2e-update-editor-util b/plugins/woocommerce/changelog/e2e-update-editor-util new file mode 100644 index 00000000000..f5df5a01d4d --- /dev/null +++ b/plugins/woocommerce/changelog/e2e-update-editor-util @@ -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 diff --git a/plugins/woocommerce/tests/e2e-pw/utils/editor.js b/plugins/woocommerce/tests/e2e-pw/utils/editor.js index b45279e172e..003d065f6e4 100644 --- a/plugins/woocommerce/tests/e2e-pw/utils/editor.js +++ b/plugins/woocommerce/tests/e2e-pw/utils/editor.js @@ -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();