Commit Graph

59 Commits

Author SHA1 Message Date
Amanda Bullington
502393a5d1 Dev experience: linting for TypeScript (#2933)
* Change TS warning about unused variables to error & support _unused in catch blocks

* Use TS recommended object instead of Object

* Set Function issues to warnings in TS files for later fixing
2025-06-02 09:47:29 -07:00
Amanda Bullington
fc69a5a456 Fix: onboarding carousel without screen jumpiness (#2825)
* Don't check for prev crashes or sentinel files on a fresh install

* Make sure we're not accidentally creating a new legacy store on every install

* Revert

* Add splash screen, preload images, show onboarding as react nav modal

* Fix e2e tests
2025-04-08 12:45:45 -07:00
Amanda Bullington
d782538109 Advanced settings UI updates (#2797)
* Open more options on long press

* Add tests for long press

* Rearranging Settings screen with new layout

* Add toggle for advanced settings in layout slice; fix default mode toggle

* Update settings with navigation flows

* Fix tests

* Change power mode switch for e2e test

* Fix settings test for green button toggle

* Fix advanced user toggle in e2e test (which hides pivot cards)

* Changes based on design convo; test fixes

* Fix e2e tests

* Follow user flow chart and update nav accordingly

* Rename function

* Fix test

* Can be null so check for false only

* Little less spacing between radio button rows

* Minor UI updates

* Remove check for previous setting in UI

* This is no longer used anywhere

* Update AICamera.test.js

* Update AICamera.test.js

* Update AICamera.test.js

* Update Suggestions.test.js

* Update Settings.test.js

* Update LanguageSettings.test.js

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-03-27 17:36:36 +01:00
Amanda Bullington
70ffa9112a Make MyObservationsSimple the standard UI across default/advanced mode (#2788)
* Update TypeScript

* Fix some tests with new default MyObservationsSimple

* Show upload toolbar on MyObs advanced

* Update tests for simple mode

* Fix deletions popping back up on MyObs

* Fix e2e test, which also means fixing our deletion process

* Fix useSyncObservations test

* Requested changes to better fit latest designs

* Add tests to check for hidden upload banner
2025-03-20 17:04:31 -07:00
Amanda Bullington
9b1275a6eb Use fixed header in ObsDetails advanced mode (#2741)
* Use fixed header on ObsDetails advanced mode

* Remove test for removed component - using react navigation header instead

* Remove tests related to ObsDetails header icon; using react navigation

* Add testID to react navigation level back button and fix e2e

* Terminate app after every e2e test and maybe help flakiness

* Rework termination of app

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-03-12 10:38:35 +01:00
Amanda Bullington
1347ca3488 Retain user mode (advanced/default) after login (#2742)
* Retain user mode (advanced/default) after login

* Switch to power mode before login & hide announcements e2e

* Remove repetitive signin test from e2e
2025-03-12 10:22:39 +01:00
Johannes Klein
83bb3a88a6 Setting to control if screen after camera/library is suggestions (#2695) 2025-02-26 07:30:50 +01:00
Johannes Klein
8877d5168d In e2e tests change to list view before running the signed in test (#2690)
* Change to list view before signed in test

* Switch needs to be earlier
2025-02-21 23:24:18 +01:00
Johannes Klein
bb03bb695a Change default MyObs layout to grid (#2686)
* Change default MyObs layout to grid

* Rename testID

* Update tests expecting to start with list view

* Reverse order of buttons in layout selector

* Fix layout bug of having empty boxes on explore
2025-02-21 18:50:14 +01:00
Amanda Bullington
400f118ad9 Change terminology from gallery to photo library (#2663)
* Update user-facing terminology from gallery to photo library

* Update terminology for devs to make the user-facing change easier to remember

* Update snapshots
2025-02-13 17:11:28 -08:00
budowski
6cbfcc5be7 Fix #2572 - New design for MyObservations - default mode, logged out,… (#2650)
* Fix #2572 - New design for MyObservations - default mode, logged out, no observations

* Fixed tests

* Update close onboarding part of e2e tests

* Update sign-in for e2e

* Update loadTranslations.js

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-02-07 10:09:54 +01:00
Amanda Bullington
1c59f89a14 Add functionality for advanced iNaturalist mode (#2591)
* Add functionality for advanced iNaturalist mode

* Fix language settings test by toggling advanced mode on

* Fix e2e tests by adding advanced user toggle

* Fix more tests in Settings with advanced toggle
2024-12-26 21:35:27 -08:00
Ken-ichi
2d1f98ef3a New Crowdin Translations (#2395)
* New Crowdin translations by GitHub Action

* Increase timeout

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2024-11-08 12:59:06 +01:00
Ken-ichi
3def5183aa test: wait for OTHER SUGGESTIONS in aicamera test (#2375)
* test: wait for OTHER SUGGESTIONS in aicamera test in an attempt to deflake
* test: try a longer timeout in aicamera test, try launching app again if it fails
2024-11-06 11:48:56 -08:00
Amanda Bullington
0916da7787 Remove @ symbol from usernames (#2339)
* Remove @ symbol from user handle

* Remove @ symbol from e2e test

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-11-06 10:03:09 -08:00
budowski
7b8c88c84d feat: add onboarding carousel (#2285)
Note that offsetting the onboarding images ended up being a bit hard. We're
mostly doing so with a cropped version of one of the images.

Closes #1906

Also tried to de-flake some tests:

* Use fake timers when possible
* Ensure time travel helper doesn't un-fake our timers
* Wait for time travel helper to finish so changes don't happen outside of
  act
* Stop mocking useCurrentUser in integration tests; that's app code and should
  not be mocked when integrating all parts of the app; instead use signIn /
  signOut helpers
* Remove unnecessary direct uses of act()
* Mocked some inatjs calls to prevent React Query complaints about undefined
  query return values
* Close onboarding before all e2e tests

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-11-04 12:03:55 -08:00
Johannes Klein
5c8e3be12c test AI camera in e2e (#2188)
* Add a cameraZoomRange default
* Small detox version bump
* Add a mocked camera with a take photo button
* An e2e mock for the computer vision plugin predicting a frame
* Mock taking a photo by loading the first photo from the CameraRoll

Closes #1981
2024-11-01 10:38:37 -07:00
Ken-ichi
62df19dc8b Bump final e2e test timeout to 20s (#1935) 2024-08-07 15:43:35 -07:00
Amanda Bullington
5dbf5ef9a1 Avoid back button disappearing when offline (#1908)
* Customize back button; move icon assets into our image dir

* Fix ContextHeader with updated back button

* Fix styling around back buttons

* Fix taxon details header

* Test fix

* Fix signed in e2e test
2024-08-02 09:46:54 -07:00
Ken-ichi
1679f2f24a AI Camera gallery button (#1896)
* Add button to import photos from the gallery to the AI Camera
* Move AI Camera buttons to side rails so it's easier to add new buttons
* Got shutter button closer to spec
* Change e2e to test for element absence instead of status text

Closes #1848
2024-07-31 11:14:53 -07:00
Ken-ichi
10bbea44c4 e2e mock for Geolocation.watchPosition to deflake tests (#1842) 2024-07-24 17:15:03 -07:00
Amanda Bullington
fca249c655 Show bottom sheet before confirming suggested ID in ObsDetails -> Suggestions flow (#1728)
* Allow user to open add comment sheet from another modal

* Code cleanup

* Add suggest ID bottom sheet to test

* Change names of test IDs in signed in e2e test for TextInputSheet
2024-07-01 16:05:56 -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
e7304dde00 Switch UI to power user mode during e2e test (#1390) 2024-04-15 11:07:16 +02:00
Ken-ichi
e17c65d5d1 i18n strings audit (#1350)
* Tried to get accessibilityHints to conform to Apple guidelines
* Tried to make some more helpful `accessibilityLabel`s
* Used fork of fluent_conv to support function results as selectors in Fluent
* Custom VOWORCON function for Fluent

Note that there are still many accessibility problems for screen readers. This
just tries to make sure the strings up for translation are somewhat less
confusing in that context.

Part of #1223
2024-04-10 15:27:38 -07: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
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
Ken-ichi Ueda
b397d0d4f5 Android e2e tests were failing when obs deleted status disappeared too quickly 2024-03-26 15:19:40 -07:00
Johannes Klein
4e32f10659 Evidence sheet UI (#1288)
* Replace header

* Update evidence modal

* Update padding and margin
2024-03-18 14:27:22 +01:00
Amanda Bullington
bb6a180527 Observation deletion on MyObservations (#1082)
* Delete local & remote observations on MyObs; show progress

* Update tests & add test for delete hook

* Fix test failures

* Add tests for deletion strings in Toolbar; add test for multiple deletion

* Clear deletion text on toolbar when user navigates away from MyObs

* Add a check in e2e test to make sure observation was deleted
2024-01-24 17:32:11 -08:00
Johannes Klein
8e596525e4 Update shareIntoApp.yaml 2024-01-12 13:52:07 +01:00
Johannes Klein
5996688318 Share image into app bugfix (#1022)
* Switch the order of share manager or linking manager

* Maestro e2e test for sharing into app on iOS

* Update maestro flow

* Maestro e2e test to check if links into the app work

* Maestro e2e test android share into app
2024-01-11 18:43:52 +01:00
Amanda Bullington
42ab5eafc5 Use scrollTo to make sure comment and edit button are visible in e2e tests (#959) 2023-12-07 14:25:30 -08:00
Ken-ichi
cb6ce8b9ca Altered e2e test to wait for the correct comments count to be visible (#911) 2023-11-28 17:02:21 -08:00
Amanda Bullington
7de3790230 Performance: move upload reducer out of ObsEditProvider into MyObservationsContainer (#879)
* Move upload functionality into MyObservations, out of ObsEditProvider

* Move upload into helper function

* Fixes for ObsEdit -> MyObs flow

* Progress on making uploads faster

* Update performance test

* Fix toolbar progress

* Fix tests for observation upload flow

* Fixes from code review; fix e2e test for signed in user by bypassing permission gate

* Hide sign up test when keyboard visible; fixes Android e2e test

* Comment out permissions code in e2e test to see if it's only needed locally

* Comment out permissions gate for signed out user iOS

* Use focused hook to stop ObsEdit from rerendering while user is on other screens

* Restore reassure in branch

* e2e code cleanup
2023-11-15 11:40:11 -08:00
Ken-ichi
b7bf5fd950 Minor changes to e2e testing (#814)
* Removed sign in test since the obs creation test already signs in
* Renamed two remaining test files to signedIn and signedOut to reflect the
  different conditions that they test
* Add a check to wait for comments count component after uploading an observation

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-10-05 10:18:39 -07:00
Ken-ichi Ueda
572c9e0061 Reduce e2e flakiness with a different matcher
The substantive bit here is using a test ID instead of a string to match an
element on My Observations. Rotating INatIconButton isn't necessary but it
seemed reusable to me and could easily be mocked if it becomes a problem due
to infinite animation.
2023-09-29 11:48:18 -07:00
Ken-ichi Ueda
0bb3056c45 Work around Save Password blocking problem in e2e for iOS 2023-09-19 18:20:52 -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
Amanda Bullington
d58415dd27 UI for side menu (#668)
* Update side menu

* UI for side menu

* Add placeholder components; adjust for small screen sizes

* Code cleanup

* Update snapshots

* Query for second username element in e2e test

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-06-26 10:34:51 -07:00
Johannes Klein
6a4b31ed53 Upgrade jest to 28, detox to 20, breaking changes 2023-04-24 13:12:36 +02:00
Amanda Bullington
bbc5b9d67d MyObservations refactor (#510)
* WIP: very rough start at pulling state up into a container for MyObservations

I made a parallel MyObservations component and container so ObservationViews
can still be used as a working reference, but the ultimate goal here is to
focus MyObservations on presentation, and pull state and other business logic
up into a container component. This should make MyObservations a bit more
testable and clean up a very large and confusing file.

I'm also trying to move away from a generalized representation of observations
on all screens, which is why I want to name it MyObservations and not
ObservationViews. MyObservations has a lot of unique functionality that we
won't need elsewhere, and we can modularize stuff when we need to use it in
multiple places.

* UI updates for header, toolbar, empty component

* Add pressable component and login sheet

* UI improvements; get infinite scroll working

* UI improvements & additions for empty screen & bottom sheet

* Show login sheet when a user presses sync but is not logged in

* Fix backdrop close for AddObsModal

* Move UI elements to MyObservations

* Fix unit tests for MyObservations

* Fix for login sheet

* Set header height to a different height on Android to account for safe area

* Fix failing tests & rerender of user icon in navbar

* Remove scientific name from DisplayTaxonName to match Figma UI

* Set height above toolbar dynamically for sticky toolbar

* Add prop to display or hide second name in DisplayTaxonName

* Use RN styling to style grid view for MyObs flatlist

* Fix failing project obs test

* Create separate ToolbarContainer to separate presentation from logic; fix upload count

* Merge main and show onboarding based on user's total obs count

* Fix display taxon name styling and remove header fade on iOS

* Add header text for 0 observations, logged out state

* Update infinite scroll to 50 obs at a time; make loading wheel show faster

* Add uploaded status to toolbar

* Apply bandaid fix to stop Android from crashing on start

* Start adding new icons to MyObs

* Add circular progress; show upload icons at correct times during upload

* Add disabled props for accessibility state

* Fix tests; update snapshots

* Code cleanup

* Code cleanup & add inaturalist icon

* Fix merge conflict and add icon

* Add inaturalist icon

* Fix navigation to obs list and toolbar status when upload completes

* Move showLoginSheet code to MyObsContainer

* Fix toolbar status text

* Sync toolbar with upload status progress

* Clear toolbar after nav

* Tests passing

* Update e2e test

* Target login button in e2e tests

* Fix failing e2e tests with new testID for login button

* Update button snapshot to include new testID

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-03-14 10:54:33 -07: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
bd0d0953f7 Adjust test IDs to fix e2e tests 2023-02-01 11:16:22 -08:00
Amanda Bullington
a163e82ef8 Create e2e sign in test (#356)
* Add e2e test to log in a test user

* Add config variables to .env.example

* Add e2e user credentials to .env created for workflow

* Fix newline typo in workflow file

* Change ios e2e to run only on push to main as well

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-01-16 17:49:01 +01:00
Johannes Klein
7214896479 Add comment 2022-12-23 17:30:50 +01:00
Johannes Klein
35defd8c07 Update addObservationWithoutData.e2e.js 2022-12-17 19:34:30 +01:00
Johannes Klein
ce949a726c Update addObservationWithoutData.e2e.js 2022-12-17 17:54:15 +01:00
Johannes Klein
fc9f028377 Update test launch setup 2022-12-17 16:16:51 +01:00
Johannes Klein
8d197e8e08 Increase test timeout 2022-12-16 13:51:20 +01:00