diff --git a/__device-tests__/gutenberg-editor-unsupported-block-visual.test.js b/__device-tests__/gutenberg-editor-unsupported-block-visual.test.js index c035e7797a..ad901374d1 100644 --- a/__device-tests__/gutenberg-editor-unsupported-block-visual.test.js +++ b/__device-tests__/gutenberg-editor-unsupported-block-visual.test.js @@ -15,7 +15,7 @@ describe( 'Gutenberg Editor Visual test for Unsupported Block', () => { ); await unsupportedBlock.click(); // Wait for the block to be selected - await editorPage.driver.sleep( 500 ); + await editorPage.driver.pause( 500 ); // Visual test check let screenshot = await takeScreenshot(); @@ -43,6 +43,8 @@ describe( 'Gutenberg Editor Visual test for Unsupported Block', () => { editorPage.blockNames.unsupported ); await unsupportedBlock.click(); + // Wait for the block to be selected + await editorPage.driver.pause( 1000 ); // Visual test check let screenshot = await takeScreenshot(); @@ -75,7 +77,7 @@ describe( 'Gutenberg Editor Visual test for Unsupported Block', () => { await helpButton.click(); // Wait for the modal to show - await editorPage.driver.sleep( 3000 ); + await editorPage.driver.pause( 3000 ); // Visual test check const screenshot = await takeScreenshot(); diff --git a/__device-tests__/utils.js b/__device-tests__/utils.js index cfd9f3cf01..22714351df 100644 --- a/__device-tests__/utils.js +++ b/__device-tests__/utils.js @@ -40,8 +40,7 @@ const SUPPORTED_GLOBAL_STYLES_ELEMENTS = [ * @return {Buffer} Sreenshot image. */ export async function takeScreenshotByElement( element, { padding } = {} ) { - const sessionCapabilities = await editorPage.driver.sessionCapabilities(); - const { pixelRatio } = sessionCapabilities; + const pixelRatio = editorPage.driver.capabilities.pixelRatio; const location = await element.getLocation(); const size = await element.getSize(); @@ -110,8 +109,7 @@ export async function takeScreenshotByElement( element, { padding } = {} ) { */ export async function takeScreenshot( { withoutKeyboard, crop } = {} ) { const iPadDevice = process.env.IPAD; - const sessionCapabilities = await editorPage.driver.sessionCapabilities(); - const { pixelRatio } = sessionCapabilities; + const pixelRatio = editorPage.driver.capabilities.pixelRatio; const orientation = await editorPage.driver.getOrientation(); const isPortrait = orientation === 'PORTRAIT'; diff --git a/gutenberg b/gutenberg index 12f876ac85..c545e8fd22 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 12f876ac8585b9c873ad538c740d3c9461f289e7 +Subproject commit c545e8fd223e11538665fe4e8329b670b081bc01