-
Notifications
You must be signed in to change notification settings - Fork 113
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
Rewrite answer.js into enketoHelper.ts #1063
Rewrite answer.js into enketoHelper.ts #1063
Commits on Oct 11, 2023
-
Merge remote-tracking branch 'JGreenlee/rewrite-services-sept2023' in…
…to expand-enketo-helper
Abby Wheelis committedOct 11, 2023 Configuration menu - View commit details
-
Copy full SHA for 5d6fb5a - Browse repository at this point
Copy the full SHA 5d6fb5aView commit details -
Abby Wheelis committed
Oct 11, 2023 Configuration menu - View commit details
-
Copy full SHA for 0815334 - Browse repository at this point
Copy the full SHA 0815334View commit details -
convert answer.js into enketoHelper
moving the methods form answer.js into enketoHelper as a part of the services migration
Abby Wheelis committedOct 11, 2023 Configuration menu - View commit details
-
Copy full SHA for 43b8386 - Browse repository at this point
Copy the full SHA 43b8386View commit details -
When testing, I was getting an error from Jest about duplicate modules, one of which was in platforms. This change resolves that error
Abby Wheelis committedOct 11, 2023 Configuration menu - View commit details
-
Copy full SHA for 9840b5a - Browse repository at this point
Copy the full SHA 9840b5aView commit details -
additional test for filterByNameAndVersion fake answers have been constructed to be filtered
Abby Wheelis committedOct 11, 2023 Configuration menu - View commit details
-
Copy full SHA for 1eaf8b8 - Browse repository at this point
Copy the full SHA 1eaf8b8View commit details -
completely remove answer.js and all references to it, replace references with references to enketoHelper.ts
Abby Wheelis committedOct 11, 2023 Configuration menu - View commit details
-
Copy full SHA for 74b8471 - Browse repository at this point
Copy the full SHA 74b8471View commit details
Commits on Oct 12, 2023
-
adding tests for resolveTimestamps
resolveTimestamps is a helper function to saveResponse, but still contains a fair amount of its own logic. Testing the edge cases for this function ensures that it will behave as expected within the larger context
Abby Wheelis committedOct 12, 2023 Configuration menu - View commit details
-
Copy full SHA for d259799 - Browse repository at this point
Copy the full SHA d259799View commit details -
adding a basic test for _loadLazyConfig, in order to ensure that my mock setup for that works, before moving into testing functions that depend on it
Abby Wheelis committedOct 12, 2023 Configuration menu - View commit details
-
Copy full SHA for 11a3df6 - Browse repository at this point
Copy the full SHA 11a3df6View commit details -
currently struggling with i18next and MessageFormat, as I can't get either of those mocked and working
Abby Wheelis committedOct 12, 2023 Configuration menu - View commit details
-
Copy full SHA for bc42845 - Browse repository at this point
Copy the full SHA bc42845View commit details
Commits on Oct 13, 2023
-
the message format plugin moved! https://github.com/messageformat/messageformat/tree/main/packages/core
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 608d97d - Browse repository at this point
Copy the full SHA 608d97dView commit details -
start to configure i18next for tests
setting __DEV__ to false in globals, so that it can be used throught the testing suit calling the i18n setup in the tests should work once we incorporate the React testing changes
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 8b901f6 - Browse repository at this point
Copy the full SHA 8b901f6View commit details -
update the message format import
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for cea96dd - Browse repository at this point
Copy the full SHA cea96ddView commit details -
Abby Wheelis committed
Oct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for b7f6d68 - Browse repository at this point
Copy the full SHA b7f6d68View commit details -
remove old i18n code, update types, comment out broken tests
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 75a0371 - Browse repository at this point
Copy the full SHA 75a0371View commit details -
from log statements, these answers have data and metadata, no labels
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 09f21bc - Browse repository at this point
Copy the full SHA 09f21bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 496eeb5 - Browse repository at this point
Copy the full SHA 496eeb5View commit details -
don't mock i18n, use the real thing
with the changes from e-mission#1049, we are now able to test using i18n, no need to mock!
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for e7fe7a8 - Browse repository at this point
Copy the full SHA e7fe7a8View commit details -
set up baseline testing for resolveLabels
introduced i18next for the tests updated config in mock, and test of loading config to be accurate to what is expected (missing some '{' ) adjust formatting of function indentation
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 70f98cd - Browse repository at this point
Copy the full SHA 70f98cdView commit details -
now that I understand how this function works, I got the xml (filled and unfilled) directly from console.log statements. The tests are now accurate, and cover each of the cases.
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 719403a - Browse repository at this point
Copy the full SHA 719403aView commit details -
testing for saving the response, both when it works and when the timestamps are invalid, resulting in an error
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 252e42f - Browse repository at this point
Copy the full SHA 252e42fView commit details -
Abby Wheelis committed
Oct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 9dc9384 - Browse repository at this point
Copy the full SHA 9dc9384View commit details -
based on looking at these variables in breakpoints, these typings are more accurate
Abby Wheelis committedOct 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 4d24d3e - Browse repository at this point
Copy the full SHA 4d24d3eView commit details
Commits on Oct 16, 2023
-
carry through async nature of the label functions
Abby Wheelis committedOct 16, 2023 Configuration menu - View commit details
-
Copy full SHA for 1977258 - Browse repository at this point
Copy the full SHA 1977258View commit details -
correct precision of enketo dates
the mismatch of precision and expected precision here is what was causing the added time entries to fail
Abby Wheelis committedOct 16, 2023 Configuration menu - View commit details
-
Copy full SHA for a269a55 - Browse repository at this point
Copy the full SHA a269a55View commit details -
there were errors because I was accessing with window.cordova instead of window['cordova']
Abby Wheelis committedOct 16, 2023 Configuration menu - View commit details
-
Copy full SHA for e12ee3d - Browse repository at this point
Copy the full SHA e12ee3dView commit details -
after the change from miliseconds to seconds, the expected output here changed e-mission#1063 (comment)
Abby Wheelis committedOct 16, 2023 Configuration menu - View commit details
-
Copy full SHA for ff30d32 - Browse repository at this point
Copy the full SHA ff30d32View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0346ac0 - Browse repository at this point
Copy the full SHA 0346ac0View commit details -
Merge branch 'service_rewrite_2023' of https://github.com/e-mission/e…
…-mission-phone into expand-enketo-helper
Configuration menu - View commit details
-
Copy full SHA for d38745b - Browse repository at this point
Copy the full SHA d38745bView commit details -
Merge branch 'expand-enketo-helper' of https://github.com/Abby-Wheeli…
…s/e-mission-phone into expand-enketo-helper
Configuration menu - View commit details
-
Copy full SHA for c05b204 - Browse repository at this point
Copy the full SHA c05b204View commit details
Commits on Oct 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4435e99 - Browse repository at this point
Copy the full SHA 4435e99View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ef2725 - Browse repository at this point
Copy the full SHA 6ef2725View commit details -
Moving the fake config into it's own file so that we can easily add onto it. I kept the survey portion that I set up for the enketoHelper tests, and added the rest of the sections found in a typical config. e-mission#1063 (comment)
Abby Wheelis committedOct 17, 2023 Configuration menu - View commit details
-
Copy full SHA for b480279 - Browse repository at this point
Copy the full SHA b480279View commit details
Commits on Oct 20, 2023
-
resolve merge conflicts by merging upstream
Abby Wheelis committedOct 20, 2023 Configuration menu - View commit details
-
Copy full SHA for 1138d29 - Browse repository at this point
Copy the full SHA 1138d29View commit details
Commits on Oct 30, 2023
-
Merge remote-tracking branch 'upstream/service_rewrite_2023' into exp…
…and-enketo-helper
Abby Wheelis committedOct 30, 2023 Configuration menu - View commit details
-
Copy full SHA for 9c700df - Browse repository at this point
Copy the full SHA 9c700dfView commit details
Commits on Nov 2, 2023
-
merge upstream, resolve conflicts, verify tests
Abby Wheelis committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for ee4b390 - Browse repository at this point
Copy the full SHA ee4b390View commit details -
merge in prettier changes, resolve conflicts, run again locally
verified that jest tests still run
Abby Wheelis committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 09021f7 - Browse repository at this point
Copy the full SHA 09021f7View commit details -
Merge remote-tracking branch 'upstream/service_rewrite_2023' into exp…
…and-enketo-helper
Abby Wheelis committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 01f8d2a - Browse repository at this point
Copy the full SHA 01f8d2aView commit details
Commits on Nov 8, 2023
-
Merge branch 'service_rewrite_2023' of https://github.com/e-mission/e…
…-mission-phone into expand-enketo-helper
Configuration menu - View commit details
-
Copy full SHA for 3af741c - Browse repository at this point
Copy the full SHA 3af741cView commit details -
support client-side transformation for enketo XMLs
With this change, the `formPath` specifying the URL of an Enketo survey can be either JSON or XML. If it's JSON, we'll be able parse and use it directly. If it cannot be parsed as JSON, we'll perform XML -> JSON transformation with enketo-transformer/web.
Configuration menu - View commit details
-
Copy full SHA for 159d665 - Browse repository at this point
Copy the full SHA 159d665View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b72850 - Browse repository at this point
Copy the full SHA 2b72850View commit details
Commits on Nov 10, 2023
-
merge upstream, resolve conflicts
Abby Wheelis committedNov 10, 2023 Configuration menu - View commit details
-
Copy full SHA for 1008f58 - Browse repository at this point
Copy the full SHA 1008f58View commit details -
prettify merge conflicted file
Abby Wheelis committedNov 10, 2023 Configuration menu - View commit details
-
Copy full SHA for e230420 - Browse repository at this point
Copy the full SHA e230420View commit details -
the enketoHelper tests were failing because one of the files in the added directory was not transpiled ,so it was picking up as bad syntax
Abby Wheelis committedNov 10, 2023 Configuration menu - View commit details
-
Copy full SHA for da4947d - Browse repository at this point
Copy the full SHA da4947dView commit details -
Abby Wheelis committed
Nov 10, 2023 Configuration menu - View commit details
-
Copy full SHA for 7521f67 - Browse repository at this point
Copy the full SHA 7521f67View commit details -
this file does not exist in this branch!
Abby Wheelis committedNov 10, 2023 Configuration menu - View commit details
-
Copy full SHA for 2459821 - Browse repository at this point
Copy the full SHA 2459821View commit details -
Abby Wheelis committed
Nov 10, 2023 Configuration menu - View commit details
-
Copy full SHA for 0890e23 - Browse repository at this point
Copy the full SHA 0890e23View commit details
Commits on Nov 13, 2023
-
Merge branch 'service_rewrite_2023' of https://github.com/e-mission/e…
…-mission-phone into expand-enketo-helper
Configuration menu - View commit details
-
Copy full SHA for b33ce28 - Browse repository at this point
Copy the full SHA b33ce28View commit details -
- Restore the use of 'filterByNameAndVersion' for trip confim surveys (not currently used for anything else). If a survey response is no longer compatible according to the appConfig, it should be filtered out here. - Make the terminology unambiguous such that "answer" means how the user answered a particular question within the survey, and "response" means the overall survey response - Clean up / clarify comments - Remove unused import statements
Configuration menu - View commit details
-
Copy full SHA for 7df44e9 - Browse repository at this point
Copy the full SHA 7df44e9View commit details -
now that Unified Data Loader has been merged, we can test this function, may benefit from more end-to-end testing later, as it relies on the usercache plugin heavily
Abby Wheelis committedNov 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 4499e24 - Browse repository at this point
Copy the full SHA 4499e24View commit details -
Abby Wheelis committed
Nov 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 4a000fc - Browse repository at this point
Copy the full SHA 4a000fcView commit details -
The root of the issue I was having is that filterByNameAndVersion returns a promise, but it was being assigned to the unprocessedLabels var before the promise was fulfilled, adding the fiter.then() flow resolved this
Abby Wheelis committedNov 13, 2023 Configuration menu - View commit details
-
Copy full SHA for ebaa1e6 - Browse repository at this point
Copy the full SHA ebaa1e6View commit details
Commits on Nov 17, 2023
-
we also want to test that the timestamps follow the "minute" accuracy convention we implemented, so that if the survey and timelineEntry match within the minute, we use the timelineEntry timestamps, else use the timestamps from the survey e-mission#1063 (comment)
Abby Wheelis committedNov 17, 2023 Configuration menu - View commit details
-
Copy full SHA for 8f7c674 - Browse repository at this point
Copy the full SHA 8f7c674View commit details
Commits on Nov 18, 2023
-
this form is invalide because of the start and end times mismatching
Abby Wheelis committedNov 18, 2023 Configuration menu - View commit details
-
Copy full SHA for 7ec575e - Browse repository at this point
Copy the full SHA 7ec575eView commit details -
check for key before resolving with this information
Abby Wheelis committedNov 18, 2023 Configuration menu - View commit details
-
Copy full SHA for 8b3ab76 - Browse repository at this point
Copy the full SHA 8b3ab76View commit details -
remove _lazyLoadConfig, move types
the function was not all that necessary, so I removed it Also moved my survey config type into the appropriate place e-mission#1063 (comment)
Abby Wheelis committedNov 18, 2023 Configuration menu - View commit details
-
Copy full SHA for d123b4f - Browse repository at this point
Copy the full SHA d123b4fView commit details -
adding a response that should get filtered out because the version is too low e-mission#1063 (comment)
Abby Wheelis committedNov 18, 2023 Configuration menu - View commit details
-
Copy full SHA for 100eefb - Browse repository at this point
Copy the full SHA 100eefbView commit details -
make config a parameter to mockBEMUserCache
Abby Wheelis committedNov 18, 2023 Configuration menu - View commit details
-
Copy full SHA for 22decbf - Browse repository at this point
Copy the full SHA 22decbfView commit details -
Because of the new parameter, I was able to add more test cases to resolve Labels I needed to also clear the locally stored config out of dynamicConfig.ts
Abby Wheelis committedNov 18, 2023 Configuration menu - View commit details
-
Copy full SHA for 80aa5ea - Browse repository at this point
Copy the full SHA 80aa5eaView commit details
Commits on Nov 19, 2023
-
add survey_info to the AppConfig Type
from @JGreenlee's suggestion in review Co-authored-by: Jack Greenlee <JackAGreenlee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0ef1db8 - Browse repository at this point
Copy the full SHA 0ef1db8View commit details -
not all (in fact many) of the tests don't need this config at all, so the parameter should be optional to clean things up Co-authored-by: Jack Greenlee <JackAGreenlee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 10b9546 - Browse repository at this point
Copy the full SHA 10b9546View commit details -
follow-on to making the config an optional parameter to mockBEMUserCache Instead of passing it in EVERY TIME, it is now a fallback, and the config only needs to be specified and re-specified in the enketoHelper tests added fallback and removed specification from tests that didn't need it
Abby Wheelis committedNov 19, 2023 Configuration menu - View commit details
-
Copy full SHA for fd01034 - Browse repository at this point
Copy the full SHA fd01034View commit details -
Abby Wheelis committed
Nov 19, 2023 Configuration menu - View commit details
-
Copy full SHA for 83a773e - Browse repository at this point
Copy the full SHA 83a773eView commit details
Commits on Nov 20, 2023
-
enketoHelper: expand typings for resolveTimestamps
-add types for the parameters of resolveTimestamps -update doc of this function -cast 'timelineEntry' to trip or place where needed -add a few fields that were missing from type defs of ConfirmedPlace and EnketoSurveyConfig
Configuration menu - View commit details
-
Copy full SHA for becc4af - Browse repository at this point
Copy the full SHA becc4afView commit details
Commits on Nov 21, 2023
-
enketoHelper: fix error if timestamps are null
if the survey doesn't use start and end times, timestamps will be null. This is fine and we can use optional chaining to prevent throwing an error here
Configuration menu - View commit details
-
Copy full SHA for 828ee12 - Browse repository at this point
Copy the full SHA 828ee12View commit details -
Merge branch 'expand-enketo-helper' of https://github.com/Abby-Wheeli…
…s/e-mission-phone into expand-enketo-helper
Configuration menu - View commit details
-
Copy full SHA for e414c5c - Browse repository at this point
Copy the full SHA e414c5cView commit details
Commits on Nov 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for aee8738 - Browse repository at this point
Copy the full SHA aee8738View commit details
Commits on Dec 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b900d1e - Browse repository at this point
Copy the full SHA b900d1eView commit details