You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using mock devices, measurements are currently always recorded with the date "Jun 5, 2024 - 12:33 PM" (or close to that). For UI-Tests (one example), one may want to choose this date in a custom way to ensure that the measurement is actually shown to the user (e.g. when usually filtering the data relative to the "current" date).
Solution
Allow to set a reference date as a parameter for all public mock functions that use dates internally. If there are multiple dates involved one may decide to simply set that date relative to the reference date rather than having many different dates as inputs.
In the UITests, we decided to not test for the mock measurement to appear in the chart. The chart is filtering the data for measurements in the last three months, so that we do not show that measurement anymore. It would be great, if we could set up the mock data in a way to always have the mock data being "yesterday" (or similar) in relation to the date the test is executed.
Code of Conduct
I agree to follow this project's Code of Conduct and Contributing Guidelines
The text was updated successfully, but these errors were encountered:
Thank you very much for these changes! Unfortunately, it doesn't fix the problem for us yet. We currently use HealthMeasurements.loadMockWeightMeasurement and HealthMeasurements.loadMockBloodPressureMeasurement and for those two functions, we cannot specify any parameters.
Problem
When using mock devices, measurements are currently always recorded with the date "Jun 5, 2024 - 12:33 PM" (or close to that). For UI-Tests (one example), one may want to choose this date in a custom way to ensure that the measurement is actually shown to the user (e.g. when usually filtering the data relative to the "current" date).
Solution
Allow to set a reference date as a parameter for all public mock functions that use dates internally. If there are multiple dates involved one may decide to simply set that date relative to the reference date rather than having many different dates as inputs.
Additional context
StanfordBDHG/ENGAGE-HF-iOS#92 (comment)
In the UITests, we decided to not test for the mock measurement to appear in the chart. The chart is filtering the data for measurements in the last three months, so that we do not show that measurement anymore. It would be great, if we could set up the mock data in a way to always have the mock data being "yesterday" (or similar) in relation to the date the test is executed.
Code of Conduct
The text was updated successfully, but these errors were encountered: