-
Notifications
You must be signed in to change notification settings - Fork 24.9k
fix(test): fix RNTester iOS unit and integration tests #53848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ifecycle-originating updates from DeviceEventEmitter
…s, do not attach debugger to tests by default
9e9630c to
c9484f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Absolutely, thanks for the comments, I'll address them today. |
… the default export in IntegrationTestsApp
…nUtils.set_react_codegen_podspec_generated
| installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result| | ||
| if pod_name.to_s == target_pod_name | ||
| target_installation_result.native_target.build_configurations.each do |config| | ||
| if configuration_type == nil || (configuration_type != nil && config.type == configuration_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this file, indentation was messed up
| # Assert | ||
| assert_equal(DirMock.exist_invocation_params, [codegen_path, codegen_path]) | ||
| assert_equal(DirMock.glob_invocation, ["#{codegen_path}/*", "#{codegen_path}/*"]) | ||
| assert_equal(DirMock.exist_invocation_params, [codegen_path]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is related to most (although, not all) assert_equal invocations in Ruby tests: the order of arguments is inverted, i.e., expected is swapped with actual. The signature is assert_equal(exp, act, msg = nil), while here and in all other places, the first argument is the actual value and the second is the expected value.
This deteriorates DX since makes it misleading to browse the messages of failed assertions:

b37ee40 to
fe3d3de
Compare
2d0b42f to
dbbaf26
Compare
dbbaf26 to
f4b1eb5
Compare
9741b2a to
bf04df5
Compare
This reverts commit 8fd5bc2.
…architecture bridge, which throws if used
|
Thank you Riccardo @cipolleschi , #54421 unblocked this PR - build & tests are now passing. I also disabled or skipped the tests that depend on legacy architecture (bridge). Would you re-review the PR? |
Summary:
This PR fixes problems with unit & integration tests in the iOS RNTester project, related to: compilation errors, JS problems, missing mocks & outdated baselines.
Changelog:
[GENERAL] [FIXED] - IntegrationTestsApp not registering components under proper names, breaking integration tests
[GENERAL] [FIXED] - IntegrationTestsApp flow types
[GENERAL] [FIXED] - Re-enabled iOS unit & integration tests, Ruby tests on CI
[IOS] [FIXED] - Fixed Ruby scripting tests, refactored order of arguments to
assert_equalswhere it was swapped[IOS] [FIXED] - Reconfigured CI iOS test runner to run on iPhone 16, iOS 18.1, since the previous device was missing in the runner setup
[IOS] [FIXED] - Compilation errors of iOS unit tests
[IOS] [FIXED] - Fixed logic of broken iOS tests, add missing mocks
[IOS] [FIXED] - Disabled / skipped unit & integration tests that are coupled with legacy architecture bridge, which now throws upon initialization
Test Plan: