Closed estellecomment closed 7 years ago
I would have thought that the synthetic date worked only for server side dates (eg for new reports or scheduled messages) and not for client side calculations (eg as used in Task/Target rules). That is probably what you are experiencing. I am curious if it is sufficient to communicate what is client vs server side.
Oh, that's right. Renaming the issue then : we need an easy way to mock dates client-side for targets config testing.
Why the distinction?
? Not sure what you mean. To clarify, the synthetic_date is set on the server, while in 0.6 the targets are computed client-side, so the client doesn't see synthetic_date. Basically we need a synthetic_date in the browser. Does that answer your question?
App settings are replicated to the browser last I checked?
The reason we had "synthetic date" was that it was hard for a PM or Tech Lead to test SMS schedules because they couldn't change the server date. It is easier to do it on a local machine, but not necessarily convenient. Are there cases where changing it locally does not calculate the targets properly?
If we need a synthetic date during testing I would just request a feature than expect people to modify their local machines, that can screw up all kinds of things.
Yes, that's my point! Setting my machine's date back sucks. Editing the original description then.
hi frand @SCdF, please triage before the end of this sprint. :parrot_conga::parrot_conga::parrot_conga:
In general mocking dates at a system level is really challenging, and even more so in Javascript.
I think if there is someone who is testing around this and finds it challenging, that would be the time to look into fixing it.
Just to clarify the synthetic_date
setting is app level not system level. We should never change a system's time for app testing purposes.
We have a synthetic_date in app-settings, which is useful for testing your instance config. Targets are ignoring it, so you have to set your laptop's date backwards to test targets...
Edit : synthetic_date is on the server, while the targets are computed on the client. We need a synthetic_date on the client, to avoid having to fiddle with the machine's date.