-
Notifications
You must be signed in to change notification settings - Fork 114
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
🐛 Re-enable "Download JSON dump" #1174
Conversation
@JGreenlee after this change, the email log and download JSON dump code is almost the same. Would be good to cleanup the next time we touch this code. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1174 +/- ##
==========================================
+ Coverage 30.02% 30.13% +0.10%
==========================================
Files 118 118
Lines 5182 5164 -18
Branches 1163 1108 -55
==========================================
Hits 1556 1556
+ Misses 3624 3606 -18
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
After the giant refactor, both "email log" and "download JSON dump" were broken. We fixed "email log" in e-mission#1160 but didn't fix "Download JSON dump then, because of lack of time. This fixes the "Download JSON dump" as well by making it similar to implementation in "email log". It was already fairly similar, but for some reason, was reading the data before sharing the file ``` const reader = new FileReader(); reader.onloadend = () => { const readResult = this.result as string; logDebug(`Successfull file read with ${readResult.length} characters`); ``` and "this" doesn't exist, resulting in an undefined error. Since the shareObj takes in a file name anyway, I just made this similar to the emailLog changes by passing in the filename directly. Also, similar ot the "Email Log", added a `.txt` extension so that the file can be sent on iOS. Testing done: - Before this change: clicking on "Download JSON dump" did not do anything - After this change: clicking on "Download JSON dump" launched the share menu I haven't actually tried sharing yet because gmail is not configured on the emulator.
b527f37
to
b81804a
Compare
Before this fix, we checked for fleet status only in the EXITED_GEOFENCE case. This meant that the VISIT transitions started trip tracking, which led to spurious trips. Fixed by adding a fleet check to this case as well. Related PR: e-mission/e-mission-data-collection#234 Related release: https://github.com/e-mission/e-mission-data-collection/releases/tag/v1.9.0
This reverts commit 399e9e7. I _thought_ this wasn't needed because cordova configures `build.gradle` so that the correct version of gradle is downloaded and installed on the first run. However, when I tried to rebuild on a fresh installation, I got the following error ``` Using Android SDK: /Users/kshankar/Library/Android/sdk Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studio ``` It looks like although cordova installs gradle, the system needs to have a version of gradle installed as well to bootstrap the gradle wrapper. This error doesn't show up in the CI/CD pipeline because the CI environment has gradle installed. @catarial did you encounter this during your setup as well?! Or maybe it has not been an issue so far because you are focused on the iOS build.
After the giant refactor, both "email log" and "download JSON dump" were broken. We fixed "email log" in
#1160 but didn't fix "Download JSON dump then, because of lack of time.
This fixes the "Download JSON dump" as well by making it similar to implementation in "email log".
It was already fairly similar, but for some reason, was reading the data before sharing the file
and "this" doesn't exist, resulting in an undefined error. Since the shareObj takes in a file name anyway, I just made this similar to the emailLog changes by passing in the filename directly.
Also, similar ot the "Email Log", added a
.txt
extension so that the file can be sent on iOS.Testing done:
I haven't actually tried sharing yet because gmail is not configured on the emulator.