Skip to content

Fix/explorer#222

Merged
sedv8808 merged 2 commits into
developfrom
fix/explorer
May 13, 2026
Merged

Fix/explorer#222
sedv8808 merged 2 commits into
developfrom
fix/explorer

Conversation

@sedv8808
Copy link
Copy Markdown
Collaborator

This pull request updates CORS configuration to support additional local development ports and allowed headers, and makes several changes to test files by updating request parameters and IDs to reflect new or more relevant test data. These changes help improve local development flexibility and ensure the tests are using up-to-date or more appropriate sample data.

CORS Configuration Updates:

  • Added http://localhost:3305 and http://127.0.0.1:3305 to the list of allowed origins for non-production environments in app.js.
  • Included 'X-Requested-With' in the list of allowed CORS headers in app.js.

Copilot AI review requested due to automatic review settings May 13, 2026 22:10
@sedv8808 sedv8808 merged commit 526f0ad into develop May 13, 2026
3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request expands non-production CORS allowances to support additional local development ports/headers, and refreshes many Chakram integration tests by updating request IDs and query parameters to newer sample values.

Changes:

  • Expanded non-production CORS allowedOrigins to include localhost/127.0.0.1:3305.
  • Added X-Requested-With to the CORS allowedHeaders list.
  • Updated numerous test requests (IDs and querystring parameters) across v2.0 and v1.5 endpoint tests.

Reviewed changes

Copilot reviewed 35 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app.js Updates CORS origins/headers for local development.
test/v2.0-data-taxa-test.js Updates taxa query parameters used by the test.
test/v2.0-data-speleothems-{collectionunitid}-test.js Updates speleothem collectionunitid used in the test.
test/v2.0-data-spatial-lakes-test.js Updates spatial lakes query parameters (site/buffer).
test/v2.0-data-spatial-icesheet-test.js Updates age parameter for icesheet overlay test.
test/v2.0-data-spatial-faunal-test.js Updates sciname parameter used by faunal overlay test.
test/v2.0-data-sites-test.js Updates sites query parameters (includes DOI value).
test/v2.0-data-sites-{siteid}-datasets-test.js Updates siteid used for datasets-by-site test.
test/v2.0-data-sites-{siteid}-chronologies-test.js Updates siteid used for chronologies-by-site test.
test/v2.0-data-publications-test.js Updates publications query parameters used by the test.
test/v2.0-data-publications-{publicationid}-test.js Updates publicationid used by publication-by-id test.
test/v2.0-data-pollen-test.js Updates pollen query parameters used by the test.
test/v2.0-data-pollen-{id}-test.js Updates pollen record id used by the test.
test/v2.0-data-occurrences-test.js Updates occurrences query parameters used by the test.
test/v2.0-data-geopoliticalunits-test.js Updates geopolitical unit query parameters (rank/lower).
test/v2.0-data-geopoliticalunits-{gpid}-test.js Updates gpid used by geopoliticalunit-by-id test.
test/v2.0-data-geopoliticalunits-{gpid}-sites-test.js Updates gpid used by geopoliticalunit sites test.
test/v2.0-data-geopoliticalunits-{gpid}-datasets-test.js Updates gpid used by geopoliticalunit datasets test.
test/v2.0-data-dbtables-test.js Updates table query parameter used by dbtables test.
test/v2.0-data-dbtables-{table}-test.js Updates {table} path param and toggles count query.
test/v2.0-data-datasets-test.js Updates datasets query parameters (includes DOI value).
test/v2.0-data-datasets_elc-test.js Updates datasets_elc query parameters used by the test.
test/v2.0-data-contacts-test.js Updates contacts query parameters used by the test.
test/v2.0-data-contacts-{contactid}-test.js Updates contactid used by contact-by-id test.
test/v2.0-data-contacts-{contactid}-sites-test.js Updates contactid used by contact sites test.
test/v2.0-data-chronologies-{chronid}-test.js Updates chronid used by chronology-by-id test.
test/v2.0-data-aggregatedatasets-{aggdatasetid}-test.js Updates aggregate dataset id used by the test.
test/v2.0-apps-taphonomysystems-test.js Updates datasettypeid used by the test.
test/v2.0-apps-depenvt-test.js Updates site/dataset/collectionunit IDs used by the test.
test/v2.0-apps-constdb-datasetuploads-test.js Updates constituent DB id used by the test.
test/v2.0-apps-constdb-datasets-test.js Updates constituent DB id used by the test.
test/v2.0-apps-constdb-datasetages-test.js Updates constituent DB id used by the test.
test/v1.5-data-geopoliticalunits-test.js Updates geopolitical units query parameters in v1.5 test.
test/v1.5-data-geopoliticalunits-{gpid}-test.js Updates gpid used by v1.5 geopoliticalunit-by-id test.
test/v1.5-data-contacts-{contactid}-test.js Updates v1.5 contact id used by the test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

it('should respond 200 for "An array of sites."', function() {
var response = request('get', 'http://localhost:3001/v2.0/data/sites', {
'qs': {"sitename":"sunt","database":"Canadian Museum of Nature-Delorme Ostracoda-Surface Samples","datasettype":"specimen stable isotope","altmin": 10,"altmax": 100,"loc":"{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[13.4,55.92],[13.5,55.92],[13.5,55.95],[13.4,55.95],[13.4,55.92]]]}","siteid":42988,"datasetid":60309948,"doi":"1021436435/Q7","gpid":5392,"keyword":"beyond radiocarbon","contactid":13502,"taxa":"minim","ageyoung": 1000,"ageold": 10000,"ageof":4640795,"limit": 10,"offset": 0},
'qs': {"sitename":"nostrud velit dolore in in","database":"Diatom Paleolimnology Data Cooperative (DPDC)","datasettype":"modern biochemistry","altmin": 10,"altmax": 100,"loc":"{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[13.4,55.92],[13.5,55.92],[13.5,55.95],[13.4,55.95],[13.4,55.92]]]}","siteid":2022,"datasetid":67760076,"doi":"10)73259/W8;78U83/","gpid":5392,"keyword":"bottom","contactid":20094,"taxa":"adipisicing nostrud exercitation","ageyoung": 1000,"ageold": 10000,"ageof":19655794,"limit": 10,"offset": 0},
it('should respond 200 for "An array of datasets."', function() {
var response = request('get', 'http://localhost:3001/v2.0/data/datasets', {
'qs': {"sitename":"ut cillum consectetur","database":"St. Croix Watershed Research Station of the Science Museum of Minnesota","datasettype":"macroinvertebrate","altmin": 10,"altmax": 100,"loc":"{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[13.4,55.92],[13.5,55.92],[13.5,55.95],[13.4,55.95],[13.4,55.92]]]}","siteid":31891,"datasetid":23595575,"doi":"10B18997295/TZX21W4","gpid":5392,"keyword":"modern","contactid":20234,"taxa":"exercitation amet irure Excepteur","ageyoung": 1000,"ageold": 10000,"ageof":7003042,"limit": 10,"offset": 0},
'qs': {"sitename":"Excepteur sint anim sed do","database":"Canadian Pollen Database","datasettype":"charcoal surface sample","altmin": 10,"altmax": 100,"loc":"{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[13.4,55.92],[13.5,55.92],[13.5,55.95],[13.4,55.95],[13.4,55.92]]]}","siteid":45345,"datasetid":12116711,"doi":"10d91690/6YEIVB","gpid":5392,"keyword":"modern","contactid":14536,"taxa":"dolore elit","ageyoung": 1000,"ageold": 10000,"ageof":13721899,"limit": 10,"offset": 0},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants