Skip to content

Commit

Permalink
Do not record screen for Android on non-macos platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyhun committed May 19, 2020
1 parent 2cfee15 commit 5c34df8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/react-native-editor/__device-tests__/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ const isLocalEnvironment = () => {
return testEnvironment.toLowerCase() === 'local';
};

const isMacOSEnvironment = () => {
return process.platform === 'darwin';
};

const IOS_RECORDINGS_DIR = './ios-screen-recordings';
const ANDROID_RECORDINGS_DIR = './android-screen-recordings';

Expand All @@ -67,6 +71,10 @@ const getScreenRecordingFileNameBase = ( testPath, id ) => {

jasmine.getEnv().addReporter( {
specStarted: ( { testPath, id } ) => {
if ( ! isMacOSEnvironment() ) {
return;
}

const fileName =
getScreenRecordingFileNameBase( testPath, id ) + '.mp4';

Expand Down Expand Up @@ -110,6 +118,10 @@ jasmine.getEnv().addReporter( {
);
},
specDone: ( { testPath, id, status } ) => {
if ( ! isMacOSEnvironment() ) {
return;
}

const fileNameBase = getScreenRecordingFileNameBase( testPath, id );

if ( isAndroid() ) {
Expand Down

0 comments on commit 5c34df8

Please sign in to comment.