Closed
Description
☂️ Help us Kotlin-ify React Native tests - Round 2
Hey all 👋
After the successful first round, we're back with another round of tasks to help us improve Kotlin support in React Native core. In this first stage we are looking for help to migrate tests and RN Tester to Kotlin.
How to work
If you wish to grab one of the task you should:
- Verify that the task is not claimed yet.
- Comment here that you claim a task.
- Start working on the task. Testing instructions are below.
- Send the PR for review. Ping @cortinico and @mdvacca for a review.
- You can’t claim more than one task at a time.
- If you’re not completing the task within a week, we’ll release it for the next contributor.
Code formatting
Please use KtFmt to format Kotlin tests.
You can use the web UI to reformat directly from the browser
[Easy] Migrating RN Tester to Kotlin
We’re looking into migrating our Sample App to Kotlin.
Please act as follow:
- Fork and clone the repo
- Verify that RN Tester runs with
yarn && yarn android
from the root folder - Migrate the file to Kotlin
- Verify that RN Tester runs again using the same command.
List of files to migrate
- RNTesterActivity.java assigned to @BogiKay
- RNTesterApplication.java assigned to @Mod3rnx
- RNTesterReactHostDelegate.java assigned to @fabiansolheim
- component/MyNativeView.java assigned to @BogiKay
- component/MyNativeViewManager.java assigned to @tarunrajput
- component/MyLegacyViewManager.java assigned to @imalgrab
[Hard] Migrating tests to Kotlin
We’re looking into migrating some of our production tests to Kotlin. Please note that some of those tests are @Ignore
(so they’re not running). Your task would be to fix them and convert them to Kotlin.
Please act as follow:
- Fork and clone the repo
- Install the dependencies with
yarn
from the root repo. - Verify that tests are running green with:
./gradlew :packages:react-native:ReactAndroid:test
- Remove the
@Ignore
annotation on the class/tests - Fix the test so that it’s green
- Migrate the file to Kotlin
- Verify that the tests are still green by using the command above.
List of tests to migrate
- react/devsupport/JSDebuggerWebSocketClientTest.java assigned to @stewartsum
- react/modules/network/NetworkingModuleTest.java assigned to @KrzysztofMoch
- react/uimanager/BaseViewManagerTest.java assigned to @retyui
- react/uimanager/JSPointerDispatcherTest assigned to @siddarthkay
- react/uimanager/LayoutPropertyApplicatorTest
- react/uimanager/MatrixMathHelperTest assigned to @fabioh8010
- react/uimanager/ReactPropAnnotationSetterSpecTest assigned to @fabioh8010
- react/uimanager/ReactPropAnnotationSetterTest assigedn to @huzhanbo1996
- react/uimanager/ReactPropConstantsTest assigned to @thiagobrez
- react/uimanager/ReactPropForShadowNodeSetterTest assigned to @moskalakamil
- react/uimanager/ReactPropForShadowNodeSpecTest assigned to @IzuEneh
- react/uimanager/SimpleViewPropertyTest assigned to @sapkotamadhusudan
- react/uimanager/UIManagerModuleConstantsTest assigned to @giolaq
- react/uimanager/UIManagerModuleTest
- react/views/image/ImageResizeModeTest assigned to @atlj
- react/views/image/ReactImagePropertyTest assigned to @bufgix
- react/views/text/CustomLineHeightSpanTest assigned to @tarunrajput
- react/views/text/ReactTextTest deleted
- react/views/textinput/ReactTextInputPropertyTest assigned to @yasincidem
- react/views/textinput/TextInputTest deleted
- react/views/view/ColorUtilTest assigned to @okwasniewski