Skip to content
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

chore(Cross): [IOAPPX-346] Remove manually linked deps #5972

Open
wants to merge 292 commits into
base: master
Choose a base branch
from

Conversation

LazyAfternoons
Copy link
Contributor

@LazyAfternoons LazyAfternoons commented Jul 15, 2024

Caution

Can cause runtime errors which crash the app, tests are very important.

Short description

This PR removes manually linked dependencies as they should support autolinking. Mostly Android.

List of changes proposed in this pull request

  • Remove dependencies which are still declared in our codebase:
jail-monkey
react-native-linear-gradient
react-native-share
react-native-fingerprint-scanner
react-native-reanimated
react-native-cookies/cookies
react-native-view-shot
react-native-image-picker
react-native-flag-secure-android
react-native-fs
react-native-android-open-settings
react-native-calendar-events
react-native-background-timer
react-native-svg
react-native-splash-screen
react-native-exception-handler
react-native-push-notification
react-native-keychain
react-native-i18n
react-native-mixpanel
react-native-device-info
react-native-config
react-native-screen-brightness
  • Remove dependencies which are not declared in our codebase anymore:
react-native-lewin-qrcode
react-native-text-input-mask

How to test

To avoid runtime crashes due to improperly linked libraries, I'm adding a test for each removed dependency, unless not declared anymore, as an extra precaution. Tests are only required on Android unless specified otherwise. Clean the project before starting the tests:

cd android && ./gradlew clean && cd..
rm -rf node_modules
rm -rf ios/Pods
rm -rf ios/DerivedDate (if you have them saved locally otherwise clean them by using Xcode)
yarn 
cd ios && bundler exec pod install && cd ..
  • jail-monkey -> Test a complete an onboarding process;
  • react-native-linear-gradient -> Test IOScrollView.tsx by navigating to Profile -> Design System -> IOScrollView;
  • react-native-share -> Try to share a payment receipt. The system share menu should pop up and you should be able to share the document;
  • react-native-fingerprint-scanner -> Enable the fingering during the onboarding and test a login by using it;
  • react-native-reanimated -> Test animated pictograms by navigating to Profile -> Design System -> Animated Pictograms;
  • react-native-cookies/cookies -> Test a CIE login on Android;
  • react-native-view-shot -> This is currently only used in EuCovid related dead code but explicitly supports autolinking so it should be fine;
  • react-native-image-picker -> Try to select an image from the Scan -> Load section of the app. The image picker should pop up;
  • react-native-flag-secure-android -> Unsure about this one;
  • react-native-fs -> Test the download from a message with attachments or enable the FCI in io-dev-api-server with the flag fci: { fci: { waitForSignatureCount: 1 } } and try to open a document during the signing flow. The app should download it and show it;
  • react-native-android-open-settings -> Open Profile -> Preferences -> Favourite Calendar and deny the access to the calendar. Press again Favourite Calendar and then Enable access. The app should open the Android settings;
  • react-native-calendar-events -> With io-dev-api-server enable the flag messages: { paymentWithValidDueDateCount: 1 }, open the message and you should be able to add a reminder to your calendar;
  • react-native-background-timer -> Type the identification pin wrongly until a blocking timer is shown;
  • react-native-svg -> Open Profile -> Design System -> Loaders and check if the loaders are displayed;
  • react-native-splash-screen -> The app splash screen should be properly displayed;
  • react-native-exception-handler -> This can be tested by throwing an unhandled exception in bundle mode. An alert should be shown. This might be tricky to test.
  • react-native-push-notification -> Test a notification;
  • react-native-keychain -> Test the onboarding process as it's used to store the citizen PIN;
  • react-native-i18n -> Try to change the app language;
  • react-native-mixpanel -> The app should still send events to Mixpanel;
  • react-native-device-info -> The app version number in the Profile section should be shown;
  • react-native-config -> Start the app with the local/production environment;
  • react-native-screen-brightness -> Open Profile -> Your Data and press Shown in the fiscal code section. The brightness of the device should change;
  • react-native-art -> Same as react-native-screen-brightness, the fiscal code barcode should be shown. Test this on iOS too.

Please test any critical flow which comes to your mind as well.

CrisTofani and others added 30 commits January 31, 2024 14:31
Copy link
Contributor

github-actions bot commented Dec 19, 2024

Jira Pull Request Link

This Pull Request refers to the following Jira issue IOAPPX-346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.