Commit Graph

2 Commits

Author SHA1 Message Date
Johannes Klein
020d46f9b9 Add conditions for which the Obswheel tooltip is shown (#2980)
* Update tooltip trigger logic in AddObsButton for logged in

Refines the tooltip display conditions for AddObsButton. Now shows the tooltip for logged-out users after their second observation, and for logged-in users with 50 or fewer observations upon landing on the My Observations screen. Adds comments for future handling of users with more than 50 observations.

* Refactor the state justFinishedSignup into the layout store slice

* Refactor trigger logic and add conditions for when the tooltip would overlap with pivot cards

* Move files

* Basic AddObsButton unit test

* Add mock for addListener

* Basic test for tooltip

* Add tests for two conditions that require a card dismissal

* Wrap setState in act in helper function
2025-06-27 13:19:28 +02:00
Johannes Klein
26f0863ec9 Fix: integration tests store setup when changing layout slice (#2932)
* Update MyObservations.test.js

* Remove comment

* Remove unnecessary setState

* Update MyObservationsLocalization.test.js

* Previous change can be more specific

* Update MyObservationsSimple.test.js

* Update AICamera.test.js

* Update Explore.test.js

* Update MyObservations.test.js

* Update ObsEdit.test.js

* Update SoundRecorder.test.js

* Update PhotoImport.test.js

* Update CustomTabBar.test.js

* Update SuggestionsWithUnsyncedObs.test.js

* Update SuggestionsWithSyncedObs.test.js

* Update PhotoDeletion.test.js

* Update Suggestions.test.js

* Update AddObsButton.test.js

* Update MediaViewer.test.js

* Update PhotoLibrary.test.js

* Update StandardCamera.test.js

* Update SimpleUploadBannerContainer.test.js

* This test needs to be in advanced mode

* Remove setState of shownOnce back to default

* Refactor store override calls into a helper function

* Update MyObservationsLocalization.test.js

* Update MyObservationsSimple.test.js

* Update PhotoDeletion.test.js

* Update PhotoImport.test.js

* Update SuggestionsWithSyncedObs.test.js

* Refactor to use helper

* Update SimpleUploadBannerContainer.test.js
2025-06-10 16:10:19 +02:00