Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ export default defineConfig({
baseUrl: "http://localhost:9001",
},

component: {
devServer: {
framework: "react",
bundler: "webpack",
},
},
// Component testing is disabled: this project uses React 16, which is
// incompatible with the cypress/react mount helper in Cypress 13+
// (requires react-dom/client from React 18).
// Re-enable after upgrading to React 18.
});
1 change: 1 addition & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
return config
}
22 changes: 4 additions & 18 deletions cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,7 @@ import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')

import { mount } from 'cypress/react'

// Augment the Cypress namespace to include type definitions for
// your custom command.
// Alternatively, can be defined in cypress/support/component.d.ts
// with a <reference path="./component" /> at the top of your spec.
declare global {
namespace Cypress {
interface Chainable {
mount: typeof mount
}
}
}

Cypress.Commands.add('mount', mount)

// Example use:
// cy.mount(<MyComponent />)
// Component testing mount is not configured because this project uses React 16,
// which is incompatible with the cypress/react mount helper bundled in Cypress 13+
// (which requires react-dom/client from React 18).
// If component testing is needed, upgrade to React 18 first.
4 changes: 2 additions & 2 deletions cypress/support/details_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const Routes = {
ogripDataset: {
method: 'GET',
url: '/api/v1/organization/ogrip/dataset/622746a5_4e2a_4a4c_ac18_74cb1fb05ab3',
response: {fixture: 'details_page_spec/ogrip_dataset'}
response: {fixture: 'details_page_spec/ogrip_dataset.json'}
},
'622746a5_4e2a_4a4c_ac18_74cb1fb05ab3': {
downloadFormatGeojson: {
Expand Down Expand Up @@ -89,7 +89,7 @@ export const Routes = {
sysDataset: {
method: 'GET',
url: '/api/v1/organization/SYS_d3bf2154_1cda_11ea_a56a_0242ac110002_ORG/dataset/Cesious_Black_OBWEG',
response: {fixture: 'details_page_spec/sysDataset'}
response: {fixture: 'details_page_spec/sysDataset.json'}
},
SYS_d3bf2154_1cda_11ea_a56a_0242ac110002: {
previewFormatJson: {
Expand Down
22 changes: 11 additions & 11 deletions cypress/support/search_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,52 @@ export const Routes = {
allDatasetsLastModified: {
method: 'GET',
url: '/api/v2/dataset/search?offset=0&limit=10&sort=last_mod&query=&apiAccessible=true',
response: {fixture: 'search_page_spec/all_datasets_last_modified'}
response: {fixture: 'search_page_spec/all_datasets_last_modified.json'}
},
allDatasetsNameAsc: {
method: 'GET',
url: '/api/v2/dataset/search?offset=0&limit=10&sort=name_asc&query=&apiAccessible=true',
response: {fixture: 'search_page_spec/all_datasets_name_asc'}
response: {fixture: 'search_page_spec/all_datasets_name_asc.json'}
},
allDatasetsRelevance: {
method: 'GET',
url: '/api/v2/dataset/search?offset=0&limit=10&sort=relevance&query=&apiAccessible=true',
response: {fixture: 'search_page_spec/all_datasets_relevance'}
response: {fixture: 'search_page_spec/all_datasets_relevance.json'}
},
allDatasetsNameDesc: {
method: 'GET',
url: '/api/v2/dataset/search?offset=0&limit=10&sort=name_desc&query=&apiAccessible=true',
response: {fixture: 'search_page_spec/all_datasets_name_desc'}
response: {fixture: 'search_page_spec/all_datasets_name_desc.json'}
},
allDatasetsPage2: {
method: 'GET',
url: '/api/v2/dataset/search?offset=10&limit=10&sort=name_asc&query=&apiAccessible=true',
response: {fixture: 'search_page_spec/all_datasets_page_2'}
response: {fixture: 'search_page_spec/all_datasets_page_2.json'}
},
apiAccessibleFalseDatasets: {
method: 'GET',
url: '/api/v2/dataset/search?offset=0&limit=10&sort=name_asc&query=&apiAccessible=false',
response: {fixture: 'search_page_spec/apiAccessible_false_datasets'}
response: {fixture: 'search_page_spec/apiAccessible_false_datasets.json'}
},
bicycleDatasets: {
method: 'GET',
url: '/api/v2/dataset/search?offset=0&limit=10&sort=name_asc&query=&facets%5Bkeywords%5D%5B%5D=bicycle&apiAccessible=true',
response: {fixture: 'search_page_spec/bicycle_datasets'}
response: {fixture: 'search_page_spec/bicycle_datasets.json'}
},
catarynDatasets: {
method: 'GET',
url: '/api/v2/dataset/search?offset=0&limit=10&sort=relevance&query=cataryn&apiAccessible=true',
response: {fixture: 'search_page_spec/cataryn_datasets'}
response: {fixture: 'search_page_spec/cataryn_datasets.json'}
},
cogoDatasets: {
method: 'GET',
url: '/api/v2/dataset/search?offset=0&limit=10&sort=name_asc&query=&facets%5Borganization%5D%5B%5D=COGO&apiAccessible=true',
response: {fixture: 'search_page_spec/cogo_datasets'}
response: {fixture: 'search_page_spec/cogo_datasets.json'}
},
cotaDatasets: {
method: 'GET',
url: '/api/v2/dataset/search?offset=0&limit=10&sort=relevance&query=COTA&apiAccessible=true',
response: {fixture: 'search_page_spec/cota_datasets'}
response: {fixture: 'search_page_spec/cota_datasets.json'}
},
info: {
method: 'GET',
Expand All @@ -72,6 +72,6 @@ export const Routes = {
ogripDataset: {
method: 'GET',
url: '/api/v1/organization/ogrip/dataset/622746a5_4e2a_4a4c_ac18_74cb1fb05ab3',
response: {fixture: 'details_page_spec/ogrip_dataset'}
response: {fixture: 'details_page_spec/ogrip_dataset.json'}
}
}
Loading