From 453f879f1c9a306d62faca3e4d80591dfbf9a9b0 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 13 Oct 2023 15:21:18 -0400 Subject: [PATCH] test: Replace `sleep` with `pause` Update syntax for WebdriverIO, which is a part of the Appium 2 upgrade. --- ...nberg-editor-horizontal-layouts-@ipad.test.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/__device-tests__/gutenberg-editor-horizontal-layouts-@ipad.test.js b/__device-tests__/gutenberg-editor-horizontal-layouts-@ipad.test.js index 3961d83df3..b241330a28 100644 --- a/__device-tests__/gutenberg-editor-horizontal-layouts-@ipad.test.js +++ b/__device-tests__/gutenberg-editor-horizontal-layouts-@ipad.test.js @@ -15,7 +15,7 @@ describe( 'Gutenberg Editor iPad Visual test for Horizontal layouts', () => { } ); // Wait for images to load - await editorPage.driver.sleep( 4000 ); + await editorPage.driver.pause( 4000 ); // Select title to unfocus the block const titleElement = await editorPage.getTitleElement(); @@ -30,14 +30,14 @@ describe( 'Gutenberg Editor iPad Visual test for Horizontal layouts', () => { // Switch to landscape await toggleOrientation( editorPage.driver ); // Wait for the device to finish rotating - await editorPage.driver.sleep( 3000 ); + await editorPage.driver.pause( 3000 ); await swipeUp( editorPage.driver ); await swipeUp( editorPage.driver ); await swipeUp( editorPage.driver ); // Wait for the scrollbar to hide - await editorPage.driver.sleep( 3000 ); + await editorPage.driver.pause( 3000 ); // Visual test check screenshot = await takeScreenshot(); @@ -46,7 +46,7 @@ describe( 'Gutenberg Editor iPad Visual test for Horizontal layouts', () => { // Switch to portrait await toggleOrientation( editorPage.driver ); // Wait for the device to finish rotating - await editorPage.driver.sleep( 3000 ); + await editorPage.driver.pause( 3000 ); } ); it( 'should show the right columns placeholders and alignments case 2', async () => { @@ -55,7 +55,7 @@ describe( 'Gutenberg Editor iPad Visual test for Horizontal layouts', () => { } ); // Wait for images to load - await editorPage.driver.sleep( 4000 ); + await editorPage.driver.pause( 4000 ); // Select title to unfocus the block const titleElement = await editorPage.getTitleElement(); @@ -70,13 +70,13 @@ describe( 'Gutenberg Editor iPad Visual test for Horizontal layouts', () => { // Switch to landscape await toggleOrientation( editorPage.driver ); // Wait for the device to finish rotating - await editorPage.driver.sleep( 3000 ); + await editorPage.driver.pause( 3000 ); await swipeUp( editorPage.driver ); await swipeUp( editorPage.driver ); // Wait for the scrollbar to hide - await editorPage.driver.sleep( 3000 ); + await editorPage.driver.pause( 3000 ); // Visual test check screenshot = await takeScreenshot(); @@ -85,6 +85,6 @@ describe( 'Gutenberg Editor iPad Visual test for Horizontal layouts', () => { // Switch to portrait await toggleOrientation( editorPage.driver ); // Wait for the device to finish rotating - await editorPage.driver.sleep( 3000 ); + await editorPage.driver.pause( 3000 ); } ); } );