@@ -6,7 +6,6 @@ import type { Layer } from '@swissgeo/layers'
66import { registerProj4 , WGS84 } from '@swissgeo/coordinates'
77import { BREAKPOINT_TABLET } from '@swissgeo/staging-config/constants'
88import proj4 from 'proj4'
9- import { assertDefined } from 'support/utils'
109
1110import { DEFAULT_PROJECTION } from '@/config'
1211import useLayersStore from '@/store/modules/layers'
@@ -101,7 +100,7 @@ function testQueryPositionCrosshairStore({
101100 cy . wrap ( positionStore ) . its ( 'crossHairPosition' ) . should ( 'not.be.undefined' )
102101 cy . wrap ( positionStore )
103102 . its ( 'crossHairPosition' )
104- . should ( ( pos ) => checkLocation ( expectedCrosshairPosition , pos ! ) )
103+ . should ( ( pos ) => checkLocation ( expectedCrosshairPosition , pos ) )
105104 } else {
106105 cy . wrap ( positionStore ) . its ( 'crossHairPosition' ) . should ( 'be.undefined' )
107106 }
@@ -112,7 +111,7 @@ function testQueryPositionCrosshairStore({
112111 cy . wrap ( mapStore ) . its ( 'pinnedLocation' ) . should ( 'not.be.undefined' )
113112 cy . wrap ( mapStore )
114113 . its ( 'pinnedLocation' )
115- . should ( ( loc ) => checkLocation ( expectedPinnedLocation , loc ! ) )
114+ . should ( ( loc ) => checkLocation ( expectedPinnedLocation , loc ) )
116115 } )
117116}
118117
@@ -361,7 +360,7 @@ describe('Test the search bar result handling', () => {
361360 cy . wrap ( mapStore2 ) . its ( 'pinnedLocation' ) . should ( 'not.be.undefined' )
362361 cy . wrap ( mapStore2 )
363362 . its ( 'pinnedLocation' )
364- . then ( ( loc ) => checkLocation ( expectedCenterDefaultProjection , loc ! ) )
363+ . then ( ( loc ) => checkLocation ( expectedCenterDefaultProjection , loc ) )
365364 } )
366365 // clearing selected entry by clearing the search bar and re-entering a search text
367366 cy . get ( '[data-cy="searchbar-clear"]' ) . click ( )
@@ -382,7 +381,7 @@ describe('Test the search bar result handling', () => {
382381 cy . wrap ( mapStore2 ) . its ( 'previewedPinnedLocation' ) . should ( 'not.be.undefined' )
383382 cy . wrap ( mapStore2 )
384383 . its ( 'previewedPinnedLocation' )
385- . then ( ( loc ) => checkLocation ( expectedCenterDefaultProjection , loc ! ) )
384+ . then ( ( loc ) => checkLocation ( expectedCenterDefaultProjection , loc ) )
386385 } )
387386 // Location - Leave
388387 cy . get ( '@locationSearchResults' ) . first ( ) . trigger ( 'mouseleave' )
@@ -456,7 +455,7 @@ describe('Test the search bar result handling', () => {
456455 cy . wrap ( mapStore2 ) . its ( 'pinnedLocation' ) . should ( 'not.be.undefined' )
457456 cy . wrap ( mapStore2 )
458457 . its ( 'pinnedLocation' )
459- . should ( ( loc ) => checkLocation ( expectedCenterDefaultProjection , loc ! ) )
458+ . should ( ( loc ) => checkLocation ( expectedCenterDefaultProjection , loc ) )
460459 } )
461460
462461 cy . log ( 'Search bar dropdown should be hidden after centering on the feature' )
@@ -605,8 +604,8 @@ describe('Test the search bar result handling', () => {
605604 . then ( ( loc ) => {
606605 expect ( loc ) . to . be . a ( 'array' ) . that . is . not . empty
607606 expect ( loc ?. length ) . to . greaterThan ( 1 )
608- expect ( loc ! [ 0 ] ) . to . be . approximately ( coordinates [ 0 ] ! , acceptableDelta )
609- expect ( loc ! [ 1 ] ) . to . be . approximately ( coordinates [ 1 ] ! , acceptableDelta )
607+ expect ( loc [ 0 ] ) . to . be . approximately ( coordinates [ 0 ] ! , acceptableDelta )
608+ expect ( loc [ 1 ] ) . to . be . approximately ( coordinates [ 1 ] ! , acceptableDelta )
610609 } )
611610 } )
612611
0 commit comments