-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from Geoportail-Luxembourg/GSLUX-722-fix-embe…
…dded-mode GSLUX-722: Fix embedded mode
- Loading branch information
Showing
22 changed files
with
7,382 additions
and
7,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Proxy urls | ||
VITE_USE_PROXYURL=true | ||
VITE_PROXYURL_WMS="https://map.geoportail.lu/ogcproxywms" | ||
VITE_PROXYURL_REMOTE="https://map.geoportail.lu/httpsproxy" | ||
|
||
# Urls for vectortiles | ||
VITE_VECTORTILES_URL="https://vectortiles.geoportail.lu" | ||
|
||
# Paths for MVT styles | ||
VITE_MVTSTYLES_PATH_GET="/getpermalinkstyle" | ||
VITE_MVTSTYLES_PATH_UPLOAD="/uploadpermalinkstyle" | ||
VITE_MVTSTYLES_PATH_DELETE="/deletepermalinkstyle" | ||
|
||
# Offline | ||
VITE_OFFLINE_GUTTER=96 | ||
|
||
# View | ||
VITE_DEFAULT_VIEW_ZOOM=8 | ||
VITE_DEFAULT_MAX_EXTENT=[2.6, 47.7, 8.6, 51] | ||
|
||
# Mode lib in v3 | ||
VITE_MODE_LIB=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Proxy urls | ||
VITE_USE_PROXYURL=true | ||
VITE_PROXYURL_WMS="https://map.geoportail.lu/ogcproxywms" | ||
VITE_PROXYURL_REMOTE="https://map.geoportail.lu/httpsproxy" | ||
|
||
# Urls for vectortiles | ||
VITE_VECTORTILES_URL="https://vectortiles.geoportail.lu" | ||
|
||
# Paths for MVT styles | ||
VITE_MVTSTYLES_PATH_GET="/getpermalinkstyle" | ||
VITE_MVTSTYLES_PATH_UPLOAD="/uploadpermalinkstyle" | ||
VITE_MVTSTYLES_PATH_DELETE="/deletepermalinkstyle" | ||
|
||
# Offline | ||
VITE_OFFLINE_GUTTER=96 | ||
|
||
# View | ||
VITE_DEFAULT_VIEW_ZOOM=8 | ||
VITE_DEFAULT_MAX_EXTENT=[2.6, 47.7, 8.6, 51] | ||
|
||
# Mode lib in v3 | ||
VITE_MODE_LIB=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
describe('Permalink/State persistor - embedded mode', () => { | ||
describe('Initial state, embedded is disabled', () => { | ||
describe('when no embedded param in permalink', () => { | ||
it('opens full app with all components', () => { | ||
cy.visit('/') | ||
cy.get('header').should('exist') | ||
cy.get('[data-cy="layerPanel"]').should('exist') | ||
cy.get('[data-cy="selectedBg"]').should('exist') | ||
cy.get('div.ol-full-screen').should('exist') | ||
cy.get('div.map-3d-button').should('exist') | ||
cy.get('div.location-button').should('exist') | ||
cy.get('[data-cy="attributionControl"]').should('exist') | ||
cy.get('footer').should('exist') | ||
}) | ||
}) | ||
|
||
describe('when embedded param in permalink is false', () => { | ||
it('opens full app with all components', () => { | ||
cy.visit('/?embedded=false') | ||
cy.get('header').should('exist') | ||
cy.get('[data-cy="layerPanel"]').should('exist') | ||
cy.get('[data-cy="selectedBg"]').should('exist') | ||
cy.get('div.ol-full-screen').should('exist') | ||
cy.get('div.map-3d-button').should('exist') | ||
cy.get('div.location-button').should('exist') | ||
cy.get('[data-cy="attributionControl"]').should('exist') | ||
cy.get('footer').should('exist') | ||
}) | ||
}) | ||
}) | ||
|
||
describe('Embedded mode is enabled', () => { | ||
describe('when embedded is true in permalink', () => { | ||
beforeEach(() => { | ||
cy.visit('/theme/main?embedded=true') | ||
}) | ||
|
||
it('shows only the map, the zoom control and the background switcher', () => { | ||
cy.get('header').should('not.exist') | ||
cy.get('[data-cy="layerPanel"]').should('not.exist') | ||
cy.get('[data-cy="selectedBg"]').should('exist') | ||
cy.get('div.ol-full-screen').should('not.exist') | ||
cy.get('div.map-3d-button').should('not.exist') | ||
cy.get('div.location-button').should('not.exist') | ||
cy.get('[data-cy="attributionControl"]').should('not.exist') | ||
cy.get('footer').should('not.exist') | ||
}) | ||
}) | ||
|
||
describe('when embedded is in permalink', () => { | ||
beforeEach(() => { | ||
cy.visit('/theme/main?embedded=true') | ||
}) | ||
|
||
it('shows only the map, the zoom control and the background switcher', () => { | ||
cy.get('header').should('not.exist') | ||
cy.get('[data-cy="layerPanel"]').should('not.exist') | ||
cy.get('[data-cy="selectedBg"]').should('exist') | ||
cy.get('div.ol-full-screen').should('not.exist') | ||
cy.get('div.map-3d-button').should('not.exist') | ||
cy.get('div.location-button').should('not.exist') | ||
cy.get('[data-cy="attributionControl"]').should('not.exist') | ||
cy.get('footer').should('not.exist') | ||
}) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -353,7 +353,6 @@ | |
img, | ||
svg, | ||
video, | ||
canvas, | ||
audio, | ||
iframe, | ||
embed, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.