Skip to content
Draft
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
name: ${{ matrix.wizard }} E2E Tests (${{ matrix.os }})
needs: job_build
runs-on: ${{ matrix.os }}
timeout-minutes: 10
timeout-minutes: 60
strategy:
matrix:
wizard:
Expand Down
17 changes: 14 additions & 3 deletions e2e-tests/tests/react-native.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('ReactNative', () => {
let podInstallPrompted = false;

beforeAll(async () => {
const wizardInstance = startWizardInstance(integration, projectDir);
const wizardInstance = startWizardInstance(integration, projectDir, true);
const packageManagerPrompted = await wizardInstance.waitForOutput(
'Please select your package manager.',
);
Expand Down Expand Up @@ -65,8 +65,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 @@ -153,6 +153,7 @@ Sentry.init({

test('ios/sentry.properties is added', () => {
if (!podInstallPrompted) {
// Skip this test if not on MacOS
return;
}
checkFileContents(
Expand Down Expand Up @@ -187,6 +188,7 @@ defaults.url=https://sentry.io/`,

test('xcode project is updated correctly', () => {
if (!podInstallPrompted) {
// Skip this test if not on MacOS
return;
}
checkFileContents(
Expand All @@ -213,4 +215,13 @@ defaults.url=https://sentry.io/`,
const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'android');
expect(builds).toBe(true);
});

test('ios project builds correctly', { timeout: 3_600_000 }, async () => {
if (!podInstallPrompted) {
// Skip this test if not on MacOS
return;
}
const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'ios', true);
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 @@ -180,7 +180,7 @@
resolve(false);
} else {
reject(
new Error(

Check failure on line 183 in e2e-tests/utils/index.ts

View workflow job for this annotation

GitHub Actions / React-Native E2E Tests (macos-15)

tests/react-native.test.ts > ReactNative

Error: Timeout waiting for output: Looks like you have Prettier in your project. Do you want to run it on your files?. Got the following instead: ◇ Do you want to run `pod install` now? │ Yes │ ◒ Running 'pod install'. This may take a few minutes◐ Running 'pod install'. This may take a few minutes◓ Running 'pod install'. This may take a few minutes◑ Running 'pod install'. This may take a few minutes◒ Running 'pod install'. This may take a few minutes◐ Running 'pod install'. This may take a few minutes◓ Running 'pod install'. This may take a few minutes◑ Running 'pod install'. This may take a few minutes◒ Running 'pod install'. This may take a few minutes.◐ Running 'pod install'. This may take a few minutes.◓ Running 'pod install'. This may take a few minutes.◑ Running 'pod install'. This may take a few minutes.◒ Running 'pod install'. This may take a few minutes.◐ Running 'pod install'. This may take a few minutes.◓ Running 'pod install'. This may take a few minutes.◑ Running 'pod install'. This may take a few minutes.◒ Running 'pod install'. This may take a few minutes..◐ Running 'pod install'. This may take a few minutes..◓ Running 'pod install'. This may take a few minutes..◑ Running 'pod install'. This may take a few minutes..◒ Running 'pod install'. This may take a few minutes..◐ Running 'pod install'. This may take a few minutes..◓ Running 'pod install'. This may take a few minutes..◑ Running 'pod install'. This may take a few minutes..◒ Running 'pod install'. This may take a few minutes...◐ Running 'pod install'. This may take a few minutes...◓ Running 'pod install'. This may take a few minutes...◑ Running 'pod install'. This may take a few minutes...◒ Running 'pod install'. This may take a few minutes...◐ Running 'pod install'. This may take a few minutes...◓ Running 'pod install'. This may take a few minutes...◑ Running 'pod install'. This may take a few minutes...◒ Running 'pod install'. This may take a few minutes...◐ Running 'pod install'. This may take a few minutes◓ Running 'pod install'. This may take a few minutes◑ Running 'pod install'. This may take a few minutes◒ Running 'pod install'. This may take a few minutes◐ Running 'pod install'. This may take a few minutes◓ Running 'pod install'. This may take a few minutes◑ Running 'pod install'. This may take a few minutes◒ Running 'pod install'. This may take a few minutes◐ Running 'pod install'. This may take a few minutes.◓ Running 'pod install'. This may take a few minutes.◑ Running 'pod install'. This may take a few minutes.◒ Running 'pod install'. This may take a few minutes.◐ Running 'pod install'. This may take a few minutes.◓ Running 'pod install'. This may take a few minutes.◑ Running 'pod install'. This may take a few minutes.◒ Running 'pod install'. This may take a few minutes.◐ Running 'pod install'. This may take a few minutes..◓ Running 'pod install'. This may take a few minutes..◑ Running 'pod install'. This may take a few minutes..◒ Running 'pod install'. This may take a few minutes..◐ Running 'pod install'. This may take a few minutes..◓ Running 'pod install'. This may take a few minutes..◑ Running 'pod install'. This may take a few minutes..◒ Running 'pod install'. This may take a few minutes..◐ Running 'pod install'. This may take a few minutes...◓ Running 'pod install'. This may take a few minutes...◑ Running 'pod install'. This may take a few minutes...◒ Running 'pod install'. This may take a few minutes...◐ Running 'pod install'. This may take a few minutes...◓ Running 'pod install'. This may take a few minutes...◑ Running 'pod install'. This may take a few minutes...◒ Running 'pod install'. This may take a few minutes...◐ Running 'pod install'. This may take a few minutes...◓ Running 'pod install'. This may take a few minutes◑ Running 'pod install'. This may take a few minutes◒ Running 'pod install'. This may take a few minutes◐ Running 'pod install'. This may take a few minutes◓ Running 'pod install'. This may take a few minutes◑ Running 'pod install'. This may
`Timeout waiting for output: ${output}. Got the following instead: ${outputBuffer}`,
),
);
Expand Down Expand Up @@ -580,10 +580,25 @@
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 @@ -593,7 +608,7 @@
});

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

testEnv.kill();
Expand Down
Loading