Skip to content

Commit

Permalink
EDSC-3946: Fixes point and polygon params
Browse files Browse the repository at this point in the history
  • Loading branch information
macrouch committed Nov 12, 2024
1 parent 69de8b8 commit 5a7d4a7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion serverless/src/timelineSearch/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ const timelineSearch = async (event) => {

const nonIndexedKeys = [
'bounding_box',
'concept_id'
'concept_id',
'point',
'polygon'
]

const { body, headers } = event
Expand Down
4 changes: 3 additions & 1 deletion static/src/js/util/request/__tests__/timelineRequest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ describe('TimelineRequest#nonIndexedKeys', () => {

expect(request.nonIndexedKeys()).toEqual([
'bounding_box',
'concept_id'
'concept_id',
'point',
'polygon'
])
})
})
4 changes: 3 additions & 1 deletion static/src/js/util/request/timelineRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export default class TimelineRequest extends CmrRequest {
nonIndexedKeys() {
return [
'bounding_box',
'concept_id'
'concept_id',
'point',
'polygon'
]
}
}
2 changes: 1 addition & 1 deletion tests/e2e/map/map_granules.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ test.describe('Map: Granule interactions', () => {
await page.route(/search\/granules\/timeline$/, async (route) => {
const query = route.request().postData()

expect(query).toEqual('end_date=2023-12-01T00:00:00.000Z&interval=day&polygon[0]=42.1875,-2.40647,42.1875,-9.43582,49.21875,-9.43582,42.1875,-2.40647&start_date=2018-12-01T00:00:00.000Z&concept_id[]=C1972468359-SCIOPS')
expect(query).toEqual('end_date=2023-12-01T00:00:00.000Z&interval=day&start_date=2018-12-01T00:00:00.000Z&concept_id[]=C1972468359-SCIOPS&polygon[]=42.1875,-2.40647,42.1875,-9.43582,49.21875,-9.43582,42.1875,-2.40647')

await route.fulfill({
json: opensearchGranulesTimelineBody,
Expand Down

0 comments on commit 5a7d4a7

Please sign in to comment.