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

Test: Add SaveTrip event tests and clear analytics state #518

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Jan 8, 2025

TL;DR

Added trip saving functionality and analytics tracking to TimeTableViewModel with corresponding tests

What changed?

  • Added a clear() function to FakeAnalytics to reset tracked events and user ID
  • Implemented test coverage for trip saving functionality in TimeTableViewModel
  • Added verification for analytics tracking when saving/unsaving trips
  • Renamed analytics variable to fakeAnalytics for better clarity in tests

Why make this change?

To ensure proper test coverage for the trip saving functionality and analytics tracking in the TimeTableViewModel, making the codebase more reliable and maintainable. The addition of the clear() function in FakeAnalytics helps prevent test pollution between different test cases.

@ksharma-xyz ksharma-xyz changed the title Add UT for SaveTripButtonClicked Test: Add SaveTrip event tests and clear analytics state Jan 8, 2025
@ksharma-xyz ksharma-xyz marked this pull request as ready for review January 8, 2025 00:39
@ksharma-xyz ksharma-xyz force-pushed the 01-06-add_ut_-_test_remove_completed_journey_from_the_cache branch from 2fa6387 to b63ad3a Compare January 8, 2025 01:00
@ksharma-xyz ksharma-xyz force-pushed the 01-06-add_ut_for_savetripbuttonclicked branch from 4346c0f to bda18a9 Compare January 8, 2025 01:00
@ksharma-xyz ksharma-xyz force-pushed the 01-06-add_ut_-_test_remove_completed_journey_from_the_cache branch 2 times, most recently from bcf322f to 964359d Compare January 8, 2025 07:40
@ksharma-xyz ksharma-xyz force-pushed the 01-06-add_ut_for_savetripbuttonclicked branch 2 times, most recently from 8aad355 to 7bdaead Compare January 8, 2025 09:16
@ksharma-xyz ksharma-xyz changed the base branch from 01-06-add_ut_-_test_remove_completed_journey_from_the_cache to graphite-base/518 January 8, 2025 09:17
@ksharma-xyz ksharma-xyz force-pushed the 01-06-add_ut_for_savetripbuttonclicked branch from 7bdaead to 7ba6da6 Compare January 8, 2025 09:17
@ksharma-xyz ksharma-xyz changed the base branch from graphite-base/518 to main January 8, 2025 09:18
@ksharma-xyz ksharma-xyz force-pushed the 01-06-add_ut_for_savetripbuttonclicked branch from 7ba6da6 to 71a5a61 Compare January 8, 2025 09:18
@ksharma-xyz ksharma-xyz merged commit b856b9d into main Jan 8, 2025
2 checks passed
Copy link
Owner Author

Merge activity

  • Jan 8, 4:31 AM EST: A user merged this pull request with Graphite.

@ksharma-xyz ksharma-xyz deleted the 01-06-add_ut_for_savetripbuttonclicked branch January 8, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant