Interactive interface for browsing global, full-resolution satellite imagery
Merge branch '2311-previous-date-not-displaying-fix' of https://github.com/nasa-gibs/worldview into 2311-previous-date-not-displaying-fix
Stephan Wlodarczyk6ff071d28d18
diff --cc e2e/features/timeline/timeline-mobile-test.jsindex 9203ee027,c6be092a8..174d7ee0a--- a/e2e/features/timeline/timeline-mobile-test.js+++ b/e2e/features/timeline/timeline-mobile-test.js@@@ -175,7 -178,7 +175,7 @@@ module.exports =c.useCss();c.assert.containsText(mobileDatePickerSelectBtn, '2013-12-20');},- after: c => {+ after: (c) => {c.end();}- };+ };diff --cc web/js/location.jsindex 09cdb1780,696547712..aa48961f0--- a/web/js/location.js+++ b/web/js/location.js@@@ -192,14 -187,14 +185,14 @@@ const getParameters = function(config,setAsEmptyItem: true,serialize: (currentItemState, state) => {const isActive = get(state, 'compare.active');- const appNow = get(state, 'date.appNow');- const appNowMinusSevenDays = util.dateAdd(appNow, 'day', -7);+ const initialDateString = util.toISOStringSeconds(initialDate);+ const appNowMinusSevenDays = util.dateAdd(initialDateString, 'day', -7);const appNowMinusSevenDaysString = util.toISOStringSeconds(- appNowMinusSevenDays+ appNowMinusSevenDays,);if (!isActive) return undefined;- return appNowMinusSevenDaysString ===- util.toISOStringSeconds(currentItemState)+ return appNowMinusSevenDaysString+ === util.toISOStringSeconds(currentItemState)? undefined: serializeDate(currentItemState || appNowMinusSevenDays);},diff --cc web/js/modules/date/util.test.jsindex ba0937274,dc5b55f60..9df38f9f9--- a/web/js/modules/date/util.test.js+++ b/web/js/modules/date/util.test.js@@@ -22,12 -23,12 +23,12 @@@ test('parses valid date: 1.2', () =>const date = tryCatchDate(param.t, state.date.appNow);expect(date).toEqual(d);});-test('If date is invalid, uses pageLoad Time', () => {+test('If date is invalid, uses initialDate Time', () => {const param = {- time: 'X'+ time: 'X',};let stateFromLocation = {- date: state.date+ date: state.date,};stateFromLocation = mapLocationToDateState(param, stateFromLocation, state);