Merge pull request #302 from okfn/fix-timeline-test
[timeline][xs]: Fix timeline test and remove old HACK that is no longer needed - thx to @stefanw.
This commit is contained in:
@@ -146,11 +146,6 @@ my.Timeline = Backbone.View.extend({
|
|||||||
if (out.toDate() == 'Invalid Date') {
|
if (out.toDate() == 'Invalid Date') {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
// fix for moment weirdness around date parsing and time zones
|
|
||||||
// moment('1914-08-01').toDate() => 1914-08-01 00:00 +01:00
|
|
||||||
// which in iso format (with 0 time offset) is 31 July 1914 23:00
|
|
||||||
// meanwhile native new Date('1914-08-01') => 1914-08-01 01:00 +01:00
|
|
||||||
out = out.subtract('minutes', out.zone());
|
|
||||||
return out.toDate();
|
return out.toDate();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ test('render etc', function () {
|
|||||||
assertPresent('.vmm-timeline', view.el);
|
assertPresent('.vmm-timeline', view.el);
|
||||||
assertPresent('.timenav', view.el);
|
assertPresent('.timenav', view.el);
|
||||||
assertPresent('.timenav', view.el);
|
assertPresent('.timenav', view.el);
|
||||||
equal('2011', view.el.find('.marker.active h4').text());
|
equal(view.el.find('.marker.active h4').text(), '2011');
|
||||||
view.remove();
|
view.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user