Skip to content

Commit

Permalink
Merge pull request #1401 from dpc-sdp/bugfix/flaky-map-test
Browse files Browse the repository at this point in the history
ci: testing map hook test
  • Loading branch information
dylankelly authored Dec 8, 2024
2 parents 94ccbde + c76f2b1 commit 86a21bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions examples/nuxt-app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,13 @@ export default defineAppConfig({
exampleMapResultsHook: (map, results) => {
if (!map || !results) return

map.getView().animate({
zoom: 8
})
centerMap(
map,
[15809362.126037747, -4543542.166789566],
8,
{},
'popover'
)
}
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions examples/nuxt-app/test/features/maps/maps.feature
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ Feature: Custom collection map component
Given I load the page fixture with "/maps/basic-page"
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"
And the "/api/tide/elasticsearch/elasticsearch_index_develop_node/_search" network request is delayed by 500 milliseconds and stubbed with fixture "/maps/simple-map-results", status 200 and alias "searchReq"
Given I visit the page "/map"
And the map is loaded
When I wait 2 seconds
When I wait 4 seconds
Then the map matches the image snapshot "map-initial-location-results-hook"

@mockserver
Expand Down

0 comments on commit 86a21bd

Please sign in to comment.