Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/react-native-editor/__device-tests__/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ const strToKeycode = {
[ backspace ]: 67,
};

const editorReadyTimeout = 8000;

const timer = ( ms ) => new Promise( ( res ) => setTimeout( res, ms ) );

const isAndroid = () => {
Expand Down Expand Up @@ -157,8 +159,12 @@ const setupDriver = async () => {
// eslint-disable-next-line no-console
console.log( status );

await driver.setImplicitWaitTimeout( 5000 );
await timer( 5000 );
// eslint-disable-next-line no-console
console.log( 'Waiting for the editor to be ready' );
await driver.setImplicitWaitTimeout( editorReadyTimeout );
await timer( editorReadyTimeout );
// eslint-disable-next-line no-console
console.log( 'The editor should be ready by now' );

await driver.setOrientation( 'PORTRAIT' );
return driver;
Expand Down