Skip to content

Commit 5c7d0be

Browse files
committed
PB-100: Special handling for unit test with elevation only.
1 parent 45de43f commit 5c7d0be

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/cypress/tests-e2e/legacyParamImport.cy.js

+23
Original file line numberDiff line numberDiff line change
@@ -341,5 +341,28 @@ describe('Test on legacy param import', () => {
341341
// EPSG is set to 3857
342342
cy.readStoreValue('state.position.projection.epsgNumber').should('eq', 3857)
343343
})
344+
345+
it('transfers camera parameter from legacy URL to the new URL only elevation', () => {
346+
cy.goToMapView({
347+
lat,
348+
lon,
349+
elevation,
350+
})
351+
352+
// checking in the store that the parameters have been converted into the new 3D parameters
353+
cy.readStoreValue('state.cesium.active').should('eq', true) // cesium should be active
354+
355+
// Checking camera position
356+
// x, y, and z seems recalculated when there is only elevation, so I just check that they are not null
357+
cy.readStoreValue('state.position.camera.x').should('not.be.null')
358+
cy.readStoreValue('state.position.camera.y').should('not.be.null')
359+
cy.readStoreValue('state.position.camera.z').should('not.be.null')
360+
cy.readStoreValue('state.position.camera.heading').should('eq', 360)
361+
cy.readStoreValue('state.position.camera.pitch').should('eq', -90)
362+
cy.readStoreValue('state.position.camera.roll').should('eq', 0)
363+
364+
// EPSG is set to 3857
365+
cy.readStoreValue('state.position.projection.epsgNumber').should('eq', 3857)
366+
})
344367
})
345368
})

0 commit comments

Comments
 (0)