Skip to content

Commit

Permalink
test: Replace sleep with pause
Browse files Browse the repository at this point in the history
Update syntax for WebdriverIO, which is a part of the Appium 2 upgrade.
  • Loading branch information
dcalhoun committed Oct 16, 2023
1 parent 266c613 commit 453f879
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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 () => {
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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 );
} );
} );

0 comments on commit 453f879

Please sign in to comment.