Skip to content

BGDIINF_SB-2890 : fix some e2e tests after LV95 work #473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2023
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
4 changes: 2 additions & 2 deletions tests/e2e-cypress/integration/legacyParamImport.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="cypress" />

import { DEFAULT_PROJECTION } from '@/config'
import { WGS84 } from '@/utils/coordinates/coordinateSystems'
import { round } from '@/utils/numberUtils'

Expand Down Expand Up @@ -29,8 +30,7 @@ describe('Test on legacy param import', () => {
const zoom = 12
cy.goToMapView(
{
lat,
lon,
center: proj4(WGS84.epsg, DEFAULT_PROJECTION.epsg, [lon, lat]).join(','),
z: zoom,
},
true
Expand Down
10 changes: 5 additions & 5 deletions tests/e2e-cypress/integration/mouseposition.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ describe('Test mouse position', () => {
})
it('Uses the coordination system Plain WGS84 in the popup', () => {
cy.get('[data-cy="location-popup-coordinates-plain-wgs84"]').contains(
`${lat.toFixed(5)}, ${lon.toFixed(5)}`
`${lat.toFixed(WGS84.acceptableDecimalPoints)}, ${lon.toFixed(
WGS84.acceptableDecimalPoints
)}`
)
})
it('Uses the coordination system WGS84 in the popup', () => {
Expand Down Expand Up @@ -245,8 +247,7 @@ describe('Test mouse position', () => {
cy.intercept('POST', /^http[s]?:\/\/(sys-s\.\w+\.bgdi\.ch|s\.geo\.admin\.ch)\//, {
body: { shorturl: shortUrl2, success: true },
}).as('shortlink-bg-void')
cy.get('[data-cy="background-selector').click()
cy.get('[data-cy="background-selector-void').click()
cy.writeStoreValue('setBackground', null)
cy.wait('@shortlink-bg-void').then((interception) => {
expect(interception.request.body.url).be.a('string')
const query = interception.request.body.url.split('?')[1]
Expand Down Expand Up @@ -296,8 +297,7 @@ describe('Test mouse position', () => {
cy.intercept(/^http[s]?:\/\/(sys-s\.\w+\.bgdi\.ch|s\.geo\.admin\.ch)\//, {
body: { shorturl: shortUrl2, success: true },
}).as('shortlink')
cy.get('[data-cy="background-selector').click()
cy.get('[data-cy="background-selector-void').click()
cy.writeStoreValue('setBackground', null)
cy.wait('@qrcode').then((interception) => {
expect(interception.request.url).not.to.be.empty
expect(interception.request.url).to.include('?')
Expand Down