Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyhun committed May 27, 2020
1 parent ddc7209 commit 823d9bd
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions packages/react-native-editor/__device-tests__/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ const setupDriver = async () => {
};

const stopDriver = async ( driver ) => {
console.log( 'stopDriver -> stopDriver' );
if ( ! isLocalEnvironment() ) {
console.log( 'stopDriver -> ! isLocalEnvironment()' );
const jobID = driver.sessionID;

const hash = crypto
Expand All @@ -238,13 +240,32 @@ const stopDriver = async ( driver ) => {
// eslint-disable-next-line no-console
console.log( `You can view the video of this test run at ${ jobURL }` );
}

console.log( 'stopDriver -> driver', driver );
if ( driver === undefined ) {
console.log( 'stopDriver -> driver === undefined' );
return;
}
await driver.quit();
try {
console.log( 'stopDriver -> driver.quit -> before' );
await driver.quit();
console.log( 'stopDriver -> driver.quit -> after' );
} catch ( error ) {
console.log( 'stopDriver -> driver.quit -> error', error );
}

if ( appiumProcess !== undefined ) {
await AppiumLocal.stop( appiumProcess );
console.log( 'stopDriver -> appiumProcess !== undefined' );
try {
console.log( 'stopDriver -> await AppiumLocal.stop -> before' );
await AppiumLocal.stop( appiumProcess );
console.log( 'stopDriver -> await AppiumLocal.stop -> after' );
} catch ( error ) {
console.log(
'stopDriver -> await AppiumLocal.stop -> error',
error
);
}
}
};

Expand Down

0 comments on commit 823d9bd

Please sign in to comment.