forked from bph/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mobile] - Try splitting E2E tests (WordPress#47814)
* Mobile - Fix Experiments native variant breakage * Mobile - Split E2E tests into three to speed up rendering the blocks on CI. It also changes the approach on iOS to also scroll to get the last block if needed. After the React Native upgrade the block list doesn't render the whole thing at the same time so on iOS it was causing flakiness due to trying to get the last block without scrolling or waiting for all content to be there. * Mobile - E2E runners - Update native-test-name to gutenberg-editor-rendering * Mobile - Update E2E tests names * Mobile - Editor Page - Update comment for scrollAndReturnElementByAccessibilityId
- Loading branch information
Gerardo Pacheco
authored
Feb 7, 2023
1 parent
818d500
commit 2aae07a
Showing
8 changed files
with
96 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...ages/react-native-editor/__device-tests__/gutenberg-editor-rendering-media-blocks.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { mediaBlocks } from '../src/initial-html'; | ||
|
||
describe( 'Gutenberg Editor Rendering Media Blocks test', () => { | ||
it( 'should be able to render blocks correctly', async () => { | ||
await editorPage.setHtmlContent( mediaBlocks ); | ||
|
||
// Give some time to media placeholders to render. | ||
await editorPage.driver.sleep( 3000 ); | ||
|
||
// Scroll to the last element. | ||
const addBlockPlaceholder = | ||
await editorPage.scrollAndReturnElementByAccessibilityId( | ||
'Add paragraph block' | ||
); | ||
|
||
expect( addBlockPlaceholder ).toBeTruthy(); | ||
} ); | ||
} ); |
18 changes: 18 additions & 0 deletions
18
...ages/react-native-editor/__device-tests__/gutenberg-editor-rendering-other-blocks.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { otherBlocks } from '../src/initial-html'; | ||
|
||
describe( 'Gutenberg Editor Rendering Other Blocks test', () => { | ||
it( 'should be able to render blocks correctly', async () => { | ||
await editorPage.setHtmlContent( otherBlocks ); | ||
|
||
// Scroll to the last element. | ||
const addBlockPlaceholder = | ||
await editorPage.scrollAndReturnElementByAccessibilityId( | ||
'Add paragraph block' | ||
); | ||
|
||
expect( addBlockPlaceholder ).toBeTruthy(); | ||
} ); | ||
} ); |
18 changes: 18 additions & 0 deletions
18
packages/react-native-editor/__device-tests__/gutenberg-editor-rendering-text-blocks.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { textBlocks } from '../src/initial-html'; | ||
|
||
describe( 'Gutenberg Editor Rendering Text Blocks test', () => { | ||
it( 'should be able to render blocks correctly', async () => { | ||
await editorPage.setHtmlContent( textBlocks ); | ||
|
||
// Scroll to the last element | ||
const addBlockPlaceholder = | ||
await editorPage.scrollAndReturnElementByAccessibilityId( | ||
'Add paragraph block' | ||
); | ||
|
||
expect( addBlockPlaceholder ).toBeTruthy(); | ||
} ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters