Skip to content

Commit

Permalink
test(nuxt-app): update map snapshot images, fix vic outline layer
Browse files Browse the repository at this point in the history
  • Loading branch information
lambry committed Nov 28, 2024
1 parent 7e7b5c6 commit 581e242
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 16 deletions.
17 changes: 5 additions & 12 deletions examples/nuxt-app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,19 +207,12 @@ export default defineAppConfig({
}
},
mapResultHooks: {
exampleMapResultsHook: (map, results, locationQuery) => {
if (!map || !results || !locationQuery) return
exampleMapResultsHook: (map, results) => {
if (!map || !results) return

centerMap(
map,
[
parseFloat(locationQuery?.center[0]),
parseFloat(locationQuery?.center[1])
],
13,
{},
'popover'
)
map.getView().animate({
zoom: 8
})
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const lgaShapeURL = computed(() => {
const defaultStyleFn = (feature: Feature, style: Style) => {
style.getFill().setColor([255, 255, 255, 0.5])
return style
}
const layerIdentifier = 'shapeLayer'
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions examples/nuxt-app/test/features/maps/maps.feature
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Feature: Custom collection map component
Given the "/api/tide/elasticsearch/elasticsearch_index_develop_node/_search" network request is stubbed with fixture "/maps/simple-map-results" and status 200 as alias "searchReq"
Given I visit the page "/map"
And the map is loaded
When I click the map component at coordinates 606 424
When I click the map component at coordinates 606 442
When I wait 2 seconds
Then the map matches the image snapshot "map-popup-type-sidebar-with-sidepanel-double-pin"

Expand Down Expand Up @@ -111,7 +111,7 @@ Feature: Custom collection map component
And the map is loaded
Then I click the map component at coordinates 545 385
And I wait 1 seconds
Then I click the map component at coordinates 660 320
Then I click the map component at coordinates 650 320
And I wait 2 seconds
Then the map matches the image snapshot "map-popover-max-zoom-cluster"

Expand All @@ -121,8 +121,9 @@ Feature: Custom collection map component
And a custom map results hook called "exampleMapResultsHook" is used
Then the page endpoint for path "/map" returns the loaded fixture
And the "/api/tide/elasticsearch/elasticsearch_index_develop_node/_search" network request is stubbed with fixture "/maps/simple-map-results" and status 200 as alias "searchReq"
Given I visit the page "/map?location[center]=15809362.126037747&location[center]=-4543542.166789566"
Given I visit the page "/map"
And the map is loaded
When I wait 2 seconds
Then the map matches the image snapshot "map-initial-location-results-hook"

@mockserver
Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt-app/test/features/maps/vsba.feature
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Feature: School buildings map
Given the "/api/tide/elasticsearch/elasticsearch_index_develop_node/_search" network request is stubbed with fixture "/map-table/vsba/response-all" and status 200 as alias "searchReq"
And I visit the page "/map"
When the map is loaded
When I click the map component at coordinates 650 429
When I click the map component at coordinates 630 440
When I wait 4 seconds
Then the map matches the image snapshot "map-cluster-zoom"

Expand Down

0 comments on commit 581e242

Please sign in to comment.