fingerprintjs-pro-react-native icon indicating copy to clipboard operation
fingerprintjs-pro-react-native copied to clipboard

E2E tests

Open TheUnderScorer opened this issue 1 year ago β€’ 2 comments

  • Bootstrap e2e-app using expo for running the E2E tests via Detox.
  • Introduced new e2e-tests.yml workflow for running e2e tests. It runs on on pull requests and after release. When triggered on release, it will install released version and use it for testing.
  • Set minSdkVersion to 24 on android to fix failing E2E app build. Reflects the same change made in react-native 0.76

Note: Currently one of the iOS tests are failing due to issue addressed in this PR.

TheUnderScorer avatar Feb 27 '25 13:02 TheUnderScorer

Coverage report

St.:grey_question:
Category Percentage Covered / Total
πŸ”΄ Statements 47.14% 66/140
πŸ”΄ Branches 38.78% 19/49
πŸ”΄ Functions 43.9% 18/41
πŸ”΄ Lines 45.59% 62/136

Test suite run success

21 tests passing in 3 suites.

Report generated by πŸ§ͺjest coverage report action from d8ef8d02da86b2eee3eab4bb367f91ebc33ce728

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
πŸ”΄ All files 47.14 38.77 43.9 45.58
🟑  FingerprintJsProAgent.ts 76.92 76.47 100 76.92 39,59-62,95,103
🟑  FingerprintJsProContext.ts 75 100 0 75 5
🟒  FingerprintJsProProvider.tsx 93.33 50 100 93.33 44
πŸ”΄ Β errors.ts 15.38 10.71 15.38 15.38 8-33,56-249,272-285,332-336,343-379,383
πŸ”΄ Β index.ts 0 0 0 0
πŸ”΄ Β types.ts 0 0 0 0
🟒  useVisitorData.ts 100 100 100 100

github-actions[bot] avatar Feb 27 '25 13:02 github-actions[bot]

Tested with Android, all is good, a few feedback:

  • I tested it with a real device instead of emulator. It was easy to find what configuration to change, I just looked it up in detox docs. No need to mention how to do this in this repo because it is a good idea to direct users to read detox docs if they need to do something different, so all is good
  • I faced an error saying "Could not get unknown property 'release' for SoftwareComponent container of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.". I expect that you've faced the same, probably? The fix is to make modifications in e2e-app/node_modules/expo-modules-core/android/ExpoModulesCorePlugin.gradle so that it doesn't throw an error. We can make this change permanent by applying the change on each pnpm install by using a library like patch-package
  • I had to create e2e-app/android/local.properties file with the content of sdk.dir=<REDACTED> to indicate Android SDK path. I think we should document this

necipallef avatar Apr 11 '25 14:04 necipallef

This PR will create a minor release :rocket:

3.4.0 (2025-04-18)

Features

  • android: set minSdkVersion to 24 (78a96d9)

Bug Fixes

  • don't convert boolean fields of tag to int for iOS platform (82c91a8)

github-actions[bot] avatar Apr 18 '25 09:04 github-actions[bot]