Skip to content

Commit

Permalink
chore: rollback .geojson extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Jan 30, 2024
1 parent 9a91d2f commit 9c2f37e
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/category/pois-list.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('pois table', () => {
beforeEach(() => {
mockSSRAPI(hostnames, teritorioReferenceAPIFixture, {
// ?geometry_as=point&short_description=true
'pois/category/211.json': teritorioReferenceAPIFixture.deps[1],
'pois/category/211.geojson': teritorioReferenceAPIFixture.deps[1],
})
cy.viewport(1024, 768)
cy.visit('/category/211')
Expand All @@ -33,7 +33,7 @@ describe('pois table', () => {

it('should be interative', () => {
cy.intercept(
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois/category/22.json?geometry_as=point&short_description=true',
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois/category/22.geojson?geometry_as=point&short_description=true',
{ body: poisCategory22 },
)

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/embedded.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('pois table', () => {

it('contain basic table', () => {
cy.intercept(
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois/category/22.json?geometry_as=point&short_description=true',
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois/category/22.geojson?geometry_as=point&short_description=true',
{ body: poisCategory22 },
)

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/favourites.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('home content', () => {
cy.get('#favourites_counter').contains('1')

cy.intercept(
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois.json?ids=1&geometry_as=bbox&short_description=true',
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois.geojson?ids=1&geometry_as=bbox&short_description=true',
{
body: {
type: 'FeatureCollection',
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/poi/detail-route.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('home content', () => {
beforeEach(() => {
mockSSRAPI(hostnames, teritorioReferenceAPIFixture, {
// ?geometry_as=bbox&short_description=false
'poi/2/deps.json': teritorioReferenceAPIFixture.deps[2],
'poi/2/deps.geojson': teritorioReferenceAPIFixture.deps[2],
})
cy.viewport(1024, 768)
cy.visit('/poi/2/details')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/poi/detail-simple.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('home content', () => {
beforeEach(() => {
mockSSRAPI(hostnames, teritorioReferenceAPIFixture, {
// ?geometry_as=bbox&short_description=false
'poi/1/deps.json': teritorioReferenceAPIFixture.deps[1],
'poi/1/deps.geojson': teritorioReferenceAPIFixture.deps[1],
})
cy.viewport(1024, 768)
cy.visit('/poi/1/details')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/pois/map.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const hostnames = {
describe('home content', () => {
beforeEach(() => {
mockSSRAPI(hostnames, teritorioReferenceAPIFixture, {
'pois.json?ids=1&geometry_as=undefined&short_description=true':
'pois.geojson?ids=1&geometry_as=undefined&short_description=true':
teritorioReferenceAPIFixture.deps[1],
})
cy.viewport(1024, 768)
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/tracking.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ describe('home content', () => {
localStorage.setItem('cookie:accepted', 'true')
mockSSRAPI(hostnames, teritorioReferenceAPIFixture)
cy.intercept(
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois/category/22.json?geometry_as=point&short_description=true',
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois/category/22.geojson?geometry_as=point&short_description=true',
{ body: poisCategory22 },
)
cy.intercept(
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois/category/211.json?geometry_as=point&short_description=true',
'/content/api.teritorio/geodata/v0.1/dev/tourism/pois/category/211.geojson?geometry_as=point&short_description=true',
{ body: poisCategory211 },
)

Expand Down
2 changes: 1 addition & 1 deletion lib/apiPoiDeps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function getPoiDepsById(
options: ApiPoisOptions = {},
): Promise<ApiPoiDeps> {
return fetch(
`${vidoConfig.API_ENDPOINT}/${vidoConfig.API_PROJECT}/${vidoConfig.API_THEME}/poi/${poiId}/deps.json?${
`${vidoConfig.API_ENDPOINT}/${vidoConfig.API_PROJECT}/${vidoConfig.API_THEME}/poi/${poiId}/deps.geojson?${
new URLSearchParams(stringifyOptions(options))}`,
).then((data) => {
if (data.ok) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"prepare": "nuxt prepare",
"build-config": "npx vite-node bin/build-config.ts > vidos-config.json",
"build-fixture": "ruby poi_explode.rb cypress/fixtures/teritorio/references/pois.json",
"build-fixture": "ruby poi_explode.rb cypress/fixtures/teritorio/references/pois.geojson",
"dev": "nuxt dev",
"build": "nuxt build",
"build:histoire": "rm -fr __screenshots__/current/ && mkdir -p __screenshots__/current/ && yarn histoire build",
Expand Down

0 comments on commit 9c2f37e

Please sign in to comment.