Skip to content

Commit

Permalink
fix: old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rowheat02 committed Dec 4, 2024
1 parent c3d7c73 commit 6776926
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
18 changes: 17 additions & 1 deletion web/client/epics/__tests__/usersession-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,23 @@ describe('usersession Epics', () => {
expect(actions[0].type).toBe(USER_SESSION_LOADING);
expect(actions[1].type).toBe(USER_SESSION_REMOVED);
expect(actions[1].newSession).toBeTruthy();
}, initialState, done);
}, {...initialState,
map: {
present: {
center: {
x: -71.88845339541245,
y: 37.25911173702324,
crs: 'EPSG:4326'
},
maxExtent: [
-20037508.34,
-20037508.34,
20037508.34,
20037508.34
]
}
}
}, done);
});

it("user Session Update on Partial Session Remove", (done) => {
Expand Down
2 changes: 1 addition & 1 deletion web/client/epics/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const createSessionFlow = (mapId, contextName, resourceCategory, action$, getSta
(mapId ? Observable.of(null) : getResourceDataByName(resourceCategory, contextName))
).flatMap(([id, data]) => {
const userName = userSelector(getState())?.name;
return Observable.of(loadUserSession(buildSessionName(id, mapId, userName))).delay(2000).merge(
return Observable.of(loadUserSession(buildSessionName(id, mapId, userName))).merge(
action$.ofType(USER_SESSION_LOADED).take(1).switchMap(({session}) => {
const sessionData = {
...session
Expand Down
18 changes: 9 additions & 9 deletions web/client/utils/MapUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,15 +500,15 @@ export const groupSaveFormatted = (node) => {
export function saveMapConfiguration(currentMap, currentLayers, currentGroups, currentBackgrounds, textSearchConfig, bookmarkSearchConfig, additionalOptions) {

const map = {
center: currentMap?.center,
maxExtent: currentMap?.maxExtent,
projection: currentMap?.projection,
units: currentMap?.units,
mapInfoControl: currentMap?.mapInfoControl,
zoom: currentMap?.zoom,
mapOptions: currentMap?.mapOptions || {},
...(currentMap?.visualizationMode && { visualizationMode: currentMap?.visualizationMode }),
...(currentMap?.viewerOptions && { viewerOptions: currentMap?.viewerOptions })
center: currentMap.center,
maxExtent: currentMap.maxExtent,
projection: currentMap.projection,
units: currentMap.units,
mapInfoControl: currentMap.mapInfoControl,
zoom: currentMap.zoom,
mapOptions: currentMap.mapOptions || {},
...(currentMap.visualizationMode && { visualizationMode: currentMap.visualizationMode }),
...(currentMap.viewerOptions && { viewerOptions: currentMap.viewerOptions })
};

const layers = currentLayers.map((layer) => {
Expand Down

0 comments on commit 6776926

Please sign in to comment.