Commit Graph

132 Commits

Author SHA1 Message Date
Johannes Klein
4d8013bae7 Use node v22 in crowdin CI action (#3038) 2025-07-30 17:12:17 +02:00
Johannes Klein
f857ecd234 Use node v22 in CI tests (#3037) 2025-07-30 15:44:54 +02:00
Johannes Klein
85832d8464 Use node v22 also when building for e2e in CI (#3036)
* Use node v22 also in CI

We want to test the app under the same build conditions as a release build would be made with.

* Update e2e_android.yml
2025-07-30 14:30:04 +02:00
Amanda Bullington
b7bc075f22 Fix: Add a step to rebuild *native* modules after restoring node cache (#2831)
* Add a step to rebuild *native* modules after restoring node cache

* Fix comment

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix comment

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix comment

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-04 12:20:29 -07:00
Johannes Klein
974d4665f1 Re-enable e2e in CI (#2791) 2025-03-21 15:33:45 +01:00
Johannes Klein
8ca3664ba9 Temporarily disable e2e tests on pull requests 2025-03-12 10:04:33 +01:00
Ken-ichi Ueda
21e3287c0e fix: assume all InfoList.xcstrings strings are translated; disable skip_untranslated_strings 2025-03-03 18:33:31 -08:00
Amanda Bullington
0b6acec913 Feat: track default vs. advanced mode in grafana (#2670)
* Add default/advanced mode to feedback text field, since /log endpoint doesn't support what we would need for additional grafana columns
2025-02-18 17:10:50 -08:00
Amanda Bullington
7064d0651f Feat: sync button rotates in default mode (#2669)
* Port over code to rotate the sync button when uploads are happening or sync is tapped
2025-02-18 16:25:07 -08:00
Amanda Bullington
5cf1d16999 Remove DefaultMode from debug mode (#2662)
* Remove default mode from debug mode

* Make sure tests with advanced options are fully out of default mode

* Add two simple tests to make sure correct screens show in default mode

* Show logged out empty observation screen before loading either MyObs screen

* Fix tests

* Fix tests

* Update e2e ios node module caching

* Update caching for node modules

* Modify cache node modules setup for CI

* Revert e2e signIn code
2025-02-13 20:30:50 -08:00
Johannes Klein
c378c8894d Replace small example models, and add example geomodel (#2644)
* Update env.example

* Update model download script

* Delete geomodel.placeholder

* Update README.md

* Update e2e_ios.yml

* Update vision-plugin

* Accept android flavor for downloading models

* Change Android e2e env

* Replace Android e2e model download step

* Update comment

* Move Java setup step

* Revert "Move Java setup step"

This reverts commit d8ca01a176.
2025-02-03 12:16:22 +01:00
Ken-ichi Ueda
d92a589739 fix: specify CV model version in e2e test
Hoping this deflakes the e2e a bit. Not sure why the AICamera test ever worked
without this.
2024-12-04 15:04:48 -08:00
Ken-ichi
8ec32ae116 fix: skip container to allow Ruby setup in crowdin-pull action (#2461)
Container was needed to prevent permissions errors after Crowdin action adds
files as root, but that interfered with Ruby setup. This just uses chown to
do the same thing.
2024-11-19 17:43:53 -08:00
Ken-ichi
e1bc1626d9 chore: lint Ruby files with Rubocop (#2435)
* fix: set up Ruby before linting in Github Actions
* chore: separate linting from fixing

Before we commit we want to fix as much as possible, but when we're checking a
pull request we're not going to commit anything so we want to know about all
the problems, including the fixable ones.
2024-11-18 21:27:20 -08:00
Johannes Klein
9aef4db8bb Internationalize app store metadata (#2341)
* Add Fastlate app store metadata files as Crowdin translation sources
* Update i18ncli.js to move and rename translations so Fastlane can use them
* Update `fastlane prod` so it prompts for public release notes and cues a new
  release in the App Store that still requires the manual attachment of a
  build
* Add `fastlane android upload_metadata` to upload metadata to Play Store

Closes #2248

---------

Co-authored-by: Ken-ichi <kenichi.ueda@gmail.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-11-18 16:02:53 -08:00
Ken-ichi Ueda
f55f7795a0 refactor: notify Slack when Crowdin pull action fails 2024-11-13 16:00:24 -08:00
Ken-ichi Ueda
4a3b4718bf fix: try to get Crowdin PRs to run branch protection actions 2024-10-15 11:15:16 -07:00
Ken-ichi
9af60ca613 fix: prevent git push after Crowdin pull (#2223)
* set push_translations: false in Crowdin pull action b/c we need uncommitted files to run our scripts on
* remove comments from FTL JSON
2024-10-03 12:16:56 -07:00
Ken-ichi
80ecc0b7c1 Sync with Crowdin (#2195)
Github Actions and scripts to

* push strings.ftl to Crowdin when it changes
* pull translations from Crowdin every day and a PR should get made if there are changes
* FTL validation and normalization happens in the action and will prevent a PR from being created

Closes #2103
Closes #2104
2024-10-02 10:52:30 -07:00
Ken-ichi Ueda
0403ab7784 Return to using staging for e2e tests 2024-08-08 12:58:26 -07:00
Ken-ichi
0e2b647ff3 Temporarily switch to prod for e2e_ios test (#1932) 2024-08-06 17:17:18 -07:00
Johannes Klein
7c91bdf950 Obsedit add photo with StandardCamera, two fixes (#1677)
* Reorder hooks dependencies

* Return uri from take photo hook

* Keep state of photos added in this instance of the camera

* List2 TS

* INatIconButton TS

* Refactor useBackPress to show discard modal only if photos taken during this instance of the camera

* Remove newPhotoCount var

* TS refactors

* fetchUserLocation TS

* Increase timeout

* Fix error

* Hoist deletePhotoByUri

* Delete photos on discard

* Reorder code

* Set saving photo on checkmark press

Closes #1556

* Update snapshots

* Remove delete test

* Create StandardCamera.test.js

* Check if image is there before deletion

* Update react-native-share-menu+6.0.0.patch

* Update e2e_ios.yml

* Update some types
2024-06-14 14:04:24 +02:00
Ken-ichi
7fc8b8c4bc ObsDetail tab sticky only within session (#1675)
* ObsDetail tab sticky only within session (closes #1451)
* Removed redundant cleanup, hopefully deflakeing tests a bit
* Change CI image tomacos-13
2024-06-13 15:51:52 -07:00
Johannes Klein
1859e5bd4b Enable e2e tests (#1392)
* Replace downloader dependency which errored out on CI

* Reenable on push to main and PR

* Tap on bottom sheet header to dismiss keyboard
2024-04-15 14:14:34 +02:00
Johannes Klein
d6afb4b386 Upgrade to RN 0.73 (#1339)
* Upgrade to RN 0.73 with upgrade helper

* Upgrade testing-library

* Comment announcements

* Comment out UserProfle test

* Mock function used to calculate masonry layout

* There should not be a modal here

* There is actually also no modal here

* Use View if SafeAreaView is undefined

* Replace fast image library that was failing tests because of not being maintained

* Clear mocks in useTaxon test

* Remove legacy deps from testing flow

* Snapshot update

* Revert "Snapshot update"

This reverts commit bca8b296df.

* Update package-lock.json

* Clean-start

* Update project.pbxproj

* Reenable test that failed before updating dependency

* Reenable test that failed because of dependencies

* Remove comment
2024-04-08 15:28:06 +02:00
Johannes Klein
16018e6998 1312 e2e experiments (#1320)
* Bump detox

* Update detox

* Disable one test for now

* Bump detox

* Increase test timeouts

* Collect more logs

* Increase run timeout

* Comment

* Increase timeout

* Replace password autofill workaround

* Move workaround after launchApp

* Upgrade github actions workflows

* Forgot one action

* Update test.yml

* Testing concurrency

* Use concurrency for e2e as well

* Remove previous concurrency code

* Testing different Slack action

* Change slack msg

* Try different msg

* Revert "Try different msg"

This reverts commit ddaad331d1.

* Revert "Change slack msg"

This reverts commit 852204b074.

* Revert "Testing different Slack action"

This reverts commit fb072e65e3.

* Testing some more notify

* Testing notification

* Revert "Testing notification"

This reverts commit 974dfcb32f.

* Revert "Testing some more notify"

This reverts commit 39b3d668e2.
2024-03-28 23:41:40 +01:00
Ken-ichi Ueda
e5fb9a1aa8 Disable iOS e2e tests on PR and main push until we can figure out how to get it to work consistently 2024-03-27 11:12:04 -07:00
Johannes Klein
7e5a376394 Disable Android e2e except for workflow_dispatch (#1318) 2024-03-27 11:11:53 -07:00
Johannes Klein
0e0a6560ac Vision camera v3 (#1121)
* Bump vision-camera

* Refactor patch

* Move patched orientation into patch functions file

* Update react-native-vision-camera+3.4.1.patch

* Switch to MacOS 13 runner

Vision camera requires XCode 15 to compile.

* Add step to specify XCode 15

* Higher level of logging

* Increase test timeout

* Add comment

* Remove navigation to obs without evidence for signed out user

* Patch for location permission not working on iOS

* Increase setup timeout

* Increase some more timeouts

* Revert back to less logging in CI

* Does it have to do with timeouts?

* Trace log level

* Update README.md

* Disable Homebrew’s auto update and install cleanup

* Setup ruby step

* Install pods only if not cached

* Revert "Install pods only if not cached"

This reverts commit 42a2ea02f9.

* Run simulator in headless mode, record all logs

* Increase timeouts again

* Revert "Remove navigation to obs without evidence for signed out user"

This reverts commit 2b4718f5ce.

* Add boolean to run use effect only once

* Did merge wrong code

* There is one more permission gate when entering obs edit now

* Add permission gate dismissal to signed out user test

* Add comment, rename state

* Lower action timeout

* Update react-native-vision-camera to 3.6, update Reanimated to v3 (#838)

* Bump camera and plugin

* Upgrade Reanimated and libs using it

* Update vision-camera mock

* Remove superfluous patch

* Fix type

* Add mocks for e2e tests because bottom sheet does not work on AOSP

* Update package-lock.json

* Update vision camera

* Bump vision camera

* Update vision camera patch version

* Remove superfluous patch

* Update vision camera

* Update vision-camera and plugin

* Use latest vision plugin = rebased v3

* Run npm clean-start

* No longer needed

* Duplicate prop

* Switch back to v3 code

* Upgrading Detox fixes issue with iOS tests failing

Because of previous lack of permissions.

* Update to latest detox version

* Npm i force

* Vision 3 e2e testing, (#1126)

* Remove jest detox config

* Revert e2e timeout increase

* Revert jest config timeout

* Use macos 14 runner which has XCode 15 per default

* Use latest bottom sheet

* Revert "Use latest bottom sheet"

This reverts commit c66cd09838.

* Adding comma back in

* Remove spaces

* Use latest vision-camera and plugin

* Use release version of vision-camera

* Remove force flag

* Update react-native-worklets-core

* Upgrade reanimated

* Update babel.config to allow nested worklets

* Run frame processor async

* Remove enableGpuBuffers flag

* Remove no longer needed comment

* Update comments about version

* Update vision-camera and plugin

* Code format

* Rename param

* Use latest-plugin

* Remove fps param from camera view

* Change confidenceThreshold to number

* API change for results structure

* Refactor fps to be checked inside hook

As of vision-camera 3.9.1 our camera feed is stuttering when calling the runAtTargetFps function inside the useFrameProcessor hook.
So, what I did here is to track the time and skip the frames that are received before the target fps is reached.

* Remove updates of non-camera related

* Update comment

* Code format

* Snapshot updates

* Revert changes to ios e2e

* Add a log for the average time it takes a frame to be processed

* Use release version of plugin

* Add a patch for runAsync to work in release builds

* Update react-native-worklets-core to 0.4.0

* Use latest plugin version

* Add a shift method to worklet arrays

* Use latest vision-plugin

This makes use of .shift() in worklet array and depends on the previous patch.

* Set result timestamp and show age of result in debug mode

* Fix an error with timestamp being undefined

* Remove log

* Use latest vision plugin

* Change result timestamp to pink

* Comment

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-03-27 00:47:43 +01:00
Johannes Klein
8272e35ac9 Detox update (#1265)
* Use different device simulator in e2e tests

* Bump detox

* Use fixed detox instead

* Use macos 14 in CI

* Do not update CI for android
2024-03-08 11:36:29 +01:00
Ken-ichi
83bc3f95cb Try to test server availability before trying e2e tests (#1264) 2024-03-07 17:10:30 -08:00
Johannes Klein
8777cff62e Use actual var in for the anonymous secret in e2e tests (#1260) 2024-03-07 09:30:36 +01:00
Amanda Bullington
a99cf212ba Update e2e workflows 2023-10-30 11:16:57 -07:00
Johannes Klein
ba0016365f Crud e2e (#696)
* Update comment

* Scaffold for e2e test

* Upload observation

* Update the observation by adding a comment

* Checking that comment appears

* Delete the observation

* Check that the comment is added succesfully

* Do not invalidate searchObservations query cache after observation deletion

* Update test IDs

* Script to check if e2e test user has observations

* Log out api response

* Increase default test timeout
2023-09-13 13:48:50 +02:00
Johannes Klein
afdd765538 Remove no longer needed model download step 2023-07-19 13:35:49 +02:00
Johannes Klein
abcd3e0fbf Change ios e2e env vars 2023-07-19 13:17:28 +02:00
Johannes Klein
262268029f Use node 18 on Github Actions, same as nvmrc 2023-07-19 12:44:33 +02:00
Johannes Klein
f87f27a53a Rename model 2023-07-18 20:18:13 +02:00
Johannes Klein
5f81c49f85 ARCamera MVP: Basic screen with full screen camera and prediction labels (#684) 2023-07-15 07:53:18 +02:00
Amanda Bullington
cc78f06b04 Add activity indicator to fetch location (#639)
* Add activity indicator to fetch location

* Add e2e location mock (#643)

Adds a mock for fetchUserLocation intended to be used with e2e tests. `MOCK_MODE=e2e` must be in the ENV for this to work.

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-05-25 17:13:31 -07:00
Amanda Bullington
5ee4a433df Add location picker to ObsEdit (#593)
* Crosshairs, location accuracy warnings, text input for location picker

* Add LocationPicker tests

* UI improvements and code refactor into smaller components; get GMaps working

* Add shadows to icons/text boxes

* Use debouncing to avoid map jitter when typing in location

* Show place results & let user pick new location from web api

* Add tests for location picker with remote results

* Add gmaps api key to github actions

* Try adding manifest placeholders for env variable to work in github actions

* Add key to printf in github actions

* Try accessing GMAPS_API_KEY a different way

* Update android e2e env file step

This updates the "Create .env file" step to use printf to print the Google Maps key into a newly created .env file in the GitHub Action runner. Using the same key as in env.example.

* Fix newline

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-04-26 10:51:05 -07:00
Johannes Klein
33a09cec48 Update e2e_android.yml 2023-04-24 21:05:43 +02:00
Johannes Klein
0158086ff1 Remove node modules cache string 2023-04-21 09:19:41 +02:00
Amanda Bullington
fa94ab5b42 ObsEdit - bottom sheets (#570)
* Add KebabMenu to shared components index

* Separate EvidenceList from PhotoCarousel component

* Remove unneeded props from PhotoCarousel

* Create notes bottom sheet

* Fix tests for delete obs sheet

* Add wild status sheet

* Show date from observations uploaded via website

* Move media viewer modal into evidence section

* Fix mock

* Move location fetching into its own hook

* Refactor ObsEdit header; move code into Header component

* Add discard changes sheet

* Styling updates and save changes button

* Add classes to buttons based on evidence/id missing

* Add imprecise location sheet

* Add jest.fn from provider to ObsEdit tests

* Remove fakeTimers from ObsEditWithoutProvider.test.js; minor cleanup

* Show discard obs sheet anytime a user tries to navigate back

* Fixes to bottom sheet backdrop, evidence, add discard changes sheet

* Switch to paper radio buttons instead of checkmarks

* Fix bottom sheet backdrop in android by wrapping with GestureHandlerRootView

* Update bottom sheet for add comment & notes

* Fix test

* Remove fake timer from ObsEdit test to get tests passing

* Force update github actions cache

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-04-20 17:02:19 -07:00
Johannes Klein
966008dcb7 Add if conditional to the actual e2e test job 2023-03-11 10:56:38 +01:00
Johannes Klein
f8a367ae37 E2e tests also run on pull requests but only when secrets are present (#519)
* E2e action step to test if secrets are given

* Comment out actual build steps

* Revert "Comment out actual build steps"

This reverts commit 02c7dbcb0e.

* Change name

* Update e2e_android.yml

* Run workflows on pull requests

* Remove comment
2023-03-10 18:54:25 +01:00
Johannes Klein
4878fe48a4 Change android e2e location (#441)
* Add command to set specific location to emulator

* Skip steps for testing

* Revert "Skip steps for testing"

This reverts commit e2c2897095.

* Revert "Revert "Skip steps for testing""

This reverts commit 193037889c.

* Update e2e_android.yml

* Update e2e_android.yml

* Update e2e_android.yml

* Update e2e_android.yml

* Update e2e_android.yml

* Update e2e_android.yml

* Revert "Revert "Revert "Skip steps for testing"""

This reverts commit 93a9d6c790.
2023-02-04 13:21:22 +01:00
Ken-ichi Ueda
b30bb955c8 Re-arrange deck chairs; enable manual trigger for e2e workflows 2023-02-01 22:02:14 -08:00
Ken-ichi Ueda
fd9ed26d64 Guess I forgot a line 2023-02-01 14:16:45 -08:00
Ken-ichi Ueda
778a79ba01 Updated ios e2e workflow to use OS-specific npm scripts 2023-02-01 13:44:47 -08:00