-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Create Invoice Test Fail with Certain Timezones #270
Comments
…s 11/1/2015 - 11/12/2015, the utc dates needed to be at hour 5 for some reason though.
I tried changing the code to triggerEvent('.invoice-patient .tt-input', 'blur');
var utcStartTime = moment.utc('2015-11-1 05:00:00').format('YYYY-MM-DD HH:mm:ss');
var localStartTime = moment.utc(utcStartTime).toDate();
localStartTime = moment(localStartTime).format('M/D/YYYY');
var utcEndTime = moment.utc('2015-11-12 05:00:00').format('YYYY-MM-DD HH:mm:ss');
var localEndTime = moment.utc(utcEndTime).toDate();
localEndTime = moment(localEndTime).format('M/D/YYYY');
var dateRange = localStartTime + ' - ' + localEndTime;
waitToAppear('.invoice-visit option:contains(' + dateRange + ' (Admission)');
andThen(function() {
select('.invoice-visit', dateRange + ' (Admission)');
fillIn('.external-invoice-no input', 'inv000002');
}); In Also, I'm still unsure why I need the set the UTC time to the 5th hour to get it to pass the tests. I might guess that the dates are getting localized somewhere else where they don't need to be? |
@enochtsang I'm not sure I understand what you mean when you say: " all tests to pass in all timezones in the browser, but the tests will still fail the same in the browser." Do the tests pass or fail? As far as the UTC time, here is what is going on: when a date that doesn't require a time is entered into the system, it gets entered as midnight of that day because javascript dates always contain a time. Date/times are recorded in the system in the user's timezone/locale. When the test data was created it was created in Eastern Standard Time which is -5 UTC, thus the utc time of 05:00:00. Does that make sense? Also, just to restate, times in the system are stored as UTC/javascript dates, but what that UTC value is will be relative to the user's timezone. |
Adding Help Wanted for assistance in duplicating the issue for more information. |
This was fixed via pr #340 |
…rsonmodal-integration Pull AddRelatedPersonModal tests out into integration tests
I am using:
Using a fresh install, the
create-invoice
test will fail with any time zone between -0500 and -1100. Time zones between -0600 and +1200 will pass. This is due to the test waiting for the visit date 11/1/2015 - 11/12/2015, but the visit date that appears is 10/31/2015 - 11/11/2015.This will also cause 33 other tests to fail.
The text was updated successfully, but these errors were encountered: