All tests passing
This commit is contained in:
@@ -1513,17 +1513,10 @@ same as the server does but in a central location here for all tests to use.
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async void DateTokenNextMonthFilterWorks()
|
public async void DateTokenNextMonthFilterWorks()
|
||||||
{
|
{
|
||||||
|
//This test is time zone sensitive and thus uses relative today
|
||||||
//SERVER thinks midnight UTC is 7am our time on January 1st 2020
|
//If any other test are to fail this way they will need to be done the same way
|
||||||
//TEST thinks midnight UTC is 8am our time on January 1st 2020
|
|
||||||
//THIS is because the User time zone offset is taken into account *at the server* but it isn't here
|
|
||||||
//Here, it assumes the correct offset was set in the test data
|
|
||||||
//At the server it assumes nothing
|
|
||||||
//Fix? Possibly this code here in the unit tests needs to adjust the times the same way based on the user account
|
|
||||||
|
|
||||||
|
|
||||||
var WidgetNameStart = "DateTokenNextMonthFilterWorks";
|
var WidgetNameStart = "DateTokenNextMonthFilterWorks";
|
||||||
var RelativeToday=Util.RelativeToday();
|
var RelativeToday = Util.RelativeToday();
|
||||||
|
|
||||||
long IncludedWidgetId = 0;
|
long IncludedWidgetId = 0;
|
||||||
long ExcludedWidgetId = 0;
|
long ExcludedWidgetId = 0;
|
||||||
@@ -1535,11 +1528,8 @@ same as the server does but in a central location here for all tests to use.
|
|||||||
w.name = Util.Uniquify(WidgetNameStart);
|
w.name = Util.Uniquify(WidgetNameStart);
|
||||||
w.notes = "blah";
|
w.notes = "blah";
|
||||||
w.customFields = Util.WidgetRequiredCustomFieldsJsonString();
|
w.customFields = Util.WidgetRequiredCustomFieldsJsonString();
|
||||||
|
|
||||||
//Put it right at midnight next month to ensure boundaries are respected
|
//Put it right at midnight next month to ensure boundaries are respected
|
||||||
|
|
||||||
//Note: this test is failing in December 2019, possibly due to year boundary?
|
|
||||||
//Note, due to daylight saving time this test can fail by one hour on the boundary
|
|
||||||
|
|
||||||
w.startDate = new DateTime(RelativeToday.Year, RelativeToday.Month, 2, 00, 00, 00).AddMonths(1);
|
w.startDate = new DateTime(RelativeToday.Year, RelativeToday.Month, 2, 00, 00, 00).AddMonths(1);
|
||||||
w.endDate = new DateTime(RelativeToday.Year, RelativeToday.Month, 2, 00, 00, 00).AddMonths(1).AddHours(1);
|
w.endDate = new DateTime(RelativeToday.Year, RelativeToday.Month, 2, 00, 00, 00).AddMonths(1).AddHours(1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user