Skip to content
Draft
12 changes: 10 additions & 2 deletions e2e-tests/tests/react-native.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ describe('ReactNative', () => {
const prettierPrompted =
podInstallPrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Skip pod install
[KEYS.DOWN, KEYS.ENTER],
// Pod install
[KEYS.ENTER],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling pod install so that a build is possible.

'Looks like you have Prettier in your project. Do you want to run it on your files?',
));

Expand Down Expand Up @@ -190,4 +190,12 @@ defaults.url=https://sentry.io/`,
const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'android');
expect(builds).toBe(true);
});

test('ios project builds correctly', async () => {
if (!podInstallPrompted) {
return;
}
const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'ios');
expect(builds).toBe(true);
});
});
23 changes: 19 additions & 4 deletions e2e-tests/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,25 @@ export async function checkIfReactNativeReleaseBuilds(
env = { SENTRY_DISABLE_AUTO_UPLOAD: 'true' };
} else {
// ios
command = 'TODO';
args = ['TODO'];
command = 'xcodebuild';
args = [
'-workspace',
'reactnative078.xcworkspace',
'-scheme',
'reactnative078',
'-configuration',
'Release',
'-arch',
'arm64',
'-sdk',
'iphonesimulator',
'CODE_SIGN_IDENTITY=',
'CODE_SIGNING_REQUIRED=NO',
'CODE_SIGNING_ALLOWED=NO',
'build'
];
cwd = path.join(projectDir, 'ios');
env = {};
env = { SENTRY_DISABLE_AUTO_UPLOAD: 'true' };
}

const testEnv = new WizardTestEnv(command, args, {
Expand All @@ -569,7 +584,7 @@ export async function checkIfReactNativeReleaseBuilds(
});

const builtSuccessfully = await testEnv.waitForStatusCode(0, {
timeout: 1_200_000,
timeout: 2_400_000,
});

testEnv.kill();
Expand Down
Loading