Skip to content

Commit

Permalink
Merge pull request #1375 from dpc-sdp/release/2.21.0
Browse files Browse the repository at this point in the history
Release/2.21.0
  • Loading branch information
waitingallday authored Nov 25, 2024
2 parents db95afe + 8f4fadf commit 96977b0
Show file tree
Hide file tree
Showing 68 changed files with 1,305 additions and 475 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v2.21.0

[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/2.21.0...v2.21.0)

## v2.20.0

[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/2.20.0...v2.20.0)
Expand Down
4 changes: 4 additions & 0 deletions examples/nuxt-app/cypress.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ export default defineConfig({
return config
}
},
retries: {
runMode: 3,
openMode: 0
},
blockHosts: ['*youtube.com', '*doubleclick.net']
})
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"name": "Demo Site",
"siteOverrides": {
"showQuickExit": null,
"theme": {},
"featureFlags": {}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,48 @@ Feature: Custom Collection

When I visit the page "/filter-only"
Then the custom collection component results count should be hidden

@mockserver
Example: Autocomplete suggestions are disabled by default
Given the page endpoint for path "/custom-collection-suggestions" returns fixture "/landingpage/custom-collection/page" with status 200
And the search network request is stubbed with fixture "/landingpage/custom-collection/response" and status 200

When I visit the page "/custom-collection-suggestions"
Then I type "The" into the custom collection input
And the search suggestions should not be displayed

@mockserver
Example: Autocomplete suggestions can be enabled
Given I load the page fixture with "/landingpage/custom-collection/page"
And the search autocomplete request is stubbed with "/landingpage/custom-collection/response-suggestions" fixture
And the custom collection config has "suggestions.enabled" set to "true"
And the search network request is stubbed with fixture "/landingpage/custom-collection/response" and status 200
Then the page endpoint for path "/custom-collection-suggestions" returns the loaded fixture

When I visit the page "/custom-collection-suggestions"
Then I type "gover" into the custom collection input
Then the search autocomplete request should be called with the "/landingpage/custom-collection/request-suggestions" fixture
And the search suggestions displayed should include
| govern |
| government |
| government agency |

@mockserver
Example: Autocomplete minimum characters can be customised
Given I load the page fixture with "/landingpage/custom-collection/page"
And the search autocomplete request is stubbed with "/landingpage/custom-collection/response-suggestions" fixture
And the custom collection config has "suggestions.enabled" set to "true"
And the custom collection config has "suggestions.minCharacters" set to "5"
And the search network request is stubbed with fixture "/landingpage/custom-collection/response" and status 200
Then the page endpoint for path "/custom-collection-suggestions" returns the loaded fixture

When I visit the page "/custom-collection-suggestions"
Then I type "gov" into the custom collection input
Then the search suggestions should not be displayed

When I type "er" into the custom collection input
Then the search autocomplete request should be called with the "/landingpage/custom-collection/request-suggestions" fixture
And the search suggestions displayed should include
| govern |
| government |
| government agency |
19 changes: 10 additions & 9 deletions examples/nuxt-app/test/features/maps/maps.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: Custom collection map component
And the "/api/tide/elasticsearch/elasticsearch_index_develop_node/_search" network request is delayed by 1000 milliseconds and stubbed with fixture "/site/search-response", status 200 and alias "searchReq"
Given I visit the page "/map"
Then the map loading screen should be displayed
When I wait 2 seconds
And the map is loaded
Then the map should be displayed

@mockserver
Expand All @@ -31,7 +31,7 @@ Feature: Custom collection map component
Given the page endpoint for path "/map" returns the loaded fixture
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"
When I wait 2 seconds
And the map is loaded
When I click the map component at coordinates 517 242
When I wait 2 seconds
Then the map matches the image snapshot "map-popup-type-popover"
Expand All @@ -43,7 +43,7 @@ Feature: Custom collection map component
Given the page endpoint for path "/map" returns the loaded fixture
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"
When I wait 2 seconds
And the map is loaded
When I click the map component at coordinates 517 242
When I wait 2 seconds
Then the map matches the image snapshot "map-popup-type-sidebar"
Expand All @@ -56,7 +56,7 @@ Feature: Custom collection map component
Given the page endpoint for path "/map" returns the loaded fixture
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"
When I wait 2 seconds
And the map is loaded
When I click the map component at coordinates 663 242
When I wait 2 seconds
Then the map matches the image snapshot "map-popup-type-popover-with-sidepanel"
Expand All @@ -69,7 +69,7 @@ Feature: Custom collection map component
Given the page endpoint for path "/map" returns the loaded fixture
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"
When I wait 2 seconds
And the map is loaded
When I click the map component at coordinates 663 242
When I wait 2 seconds
Then the map matches the image snapshot "map-popup-type-sidebar-with-sidepanel"
Expand All @@ -81,7 +81,7 @@ Feature: Custom collection map component
Given the page endpoint for path "/map" returns the loaded fixture
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"
When I wait 2 seconds
And the map is loaded
When I click the map component at coordinates 606 424
When I wait 2 seconds
Then the map matches the image snapshot "map-popup-type-sidebar-with-sidepanel-double-pin"
Expand All @@ -94,6 +94,7 @@ Feature: Custom collection map component
Given the page endpoint for path "/map" returns the loaded fixture
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
Given I click the side panel item with text "Single Pin Test"
When I wait 2 seconds
Then the map matches the image snapshot "map-sidepanel-item-click"
Expand All @@ -107,7 +108,7 @@ Feature: Custom collection map component
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"
When I wait 2 seconds
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
Expand All @@ -121,7 +122,7 @@ Feature: Custom collection map component
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"
When I wait 2 seconds
And the map is loaded
Then the map matches the image snapshot "map-initial-location-results-hook"

@mockserver
Expand All @@ -133,7 +134,7 @@ Feature: Custom collection map component
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"
And I wait 2 seconds
And the map is loaded
Then the map matches the image snapshot "map-custom-default-extent"

@mockserver
Expand Down
4 changes: 2 additions & 2 deletions examples/nuxt-app/test/features/maps/vsba.feature
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ Feature: School buildings map
Scenario: Click on cluster should zoom in
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 I wait 4 seconds
When the map is loaded
When I click the map component at coordinates 650 429
When I wait 8 seconds
When I wait 4 seconds
Then the map matches the image snapshot "map-cluster-zoom"

@mockserver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Feature: Search listing - Filter

When I visit the page "/filters"
Then the search listing filters section should be open
And the filters toggle should be hidden

@mockserver
Example: Raw filter - Should reflect the value from the URL
Expand Down
29 changes: 21 additions & 8 deletions examples/nuxt-app/test/features/search-listing/suggestions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@ Feature: Search listing - Suggestions
And I am using a "macbook-16" device

@mockserver
Example: Displays autocomplete suggestions
Example: Autocomplete suggestions are disabled by default
Given the page endpoint for path "/no-suggestions" returns fixture "/search-listing/suggestions/page-no-suggestions" with status 200
And the search network request is stubbed with fixture "/search-listing/suggestions/search-response" and status 200

When I visit the page "/no-suggestions"
Then the search listing page should have 2 results

When I type "The" into the search input
Then the search suggestions should not be displayed

@mockserver
Example: Autocomplete suggestions can be enabled
Given the page endpoint for path "/suggestions" returns fixture "/search-listing/suggestions/page-suggestions" with status 200
And the search network request is stubbed with fixture "/search-listing/suggestions/search-response" and status 200
And the search autocomplete request is stubbed with "/search-listing/suggestions/response" fixture
Expand All @@ -32,19 +43,21 @@ Feature: Search listing - Suggestions
And the search autocomplete request is stubbed with "/search-listing/suggestions/response" fixture

When I visit the page "/suggestions-override"
And I type "The" into the search input
And I type "There" into the search input
Then the search autocomplete request should be called with the "/search-listing/suggestions/request-override" fixture

@mockserver
Example: Autocomplete suggestions can be disabled
Given the page endpoint for path "/no-suggestions" returns fixture "/search-listing/suggestions/page-no-suggestions" with status 200
Example: Autocomplete minimum characters can be customised
Given the page endpoint for path "/suggestions-characters" returns fixture "/search-listing/suggestions/page-suggestions-override" with status 200
And the search network request is stubbed with fixture "/search-listing/suggestions/search-response" and status 200
And the search autocomplete request is stubbed with "/search-listing/suggestions/response" fixture

When I visit the page "/no-suggestions"
Then the search listing page should have 2 results
When I visit the page "/suggestions-characters"
Then I type "The" into the search input
And the search suggestions should not be displayed

When I type "The" into the search input
Then the search suggestions should not be displayed
When I type "re" into the search input
Then the search suggestions should be displayed

@mockserver
Example: Search bar max input length
Expand Down
8 changes: 6 additions & 2 deletions examples/nuxt-app/test/features/site/analytics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ Feature: Analytics
And the page endpoint for path "/" returns fixture "/landingpage/home" with status 200
Given I visit the page "/"
Then the dataLayer should include the following events
| event | page_title | page_url | content_type | content_status |
| routeChange | Demo Landing Page | / | landing_page | published |
| event | page_title | page_url | content_type | content_status | content_topic |
| routeChange | Demo Landing Page | / | landing_page | published | Demo Topic |
Then the dataLayer should have the following tags
| name |
| Demo Tag |
| Another Demo Tag |

@mockserver
Scenario: Breadcrumbs
Expand Down
7 changes: 4 additions & 3 deletions examples/nuxt-app/test/features/site/shared-elements.feature
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ Feature: Shared site elements
Given I visit the page "/some-random-page"

Then the page should have the following topic tags
| text | url |
| Demo Topic | /topic/demo-topic |
| Demo Tag | /tags/demo-tag |
| text | url |
| Demo Topic | /topic/demo-topic |
| Demo Tag | /tags/demo-tag |
| Another Demo Tag | /tags/another-demo-tag |

@mockserver
Scenario: Content Rating (visible)
Expand Down
9 changes: 0 additions & 9 deletions examples/nuxt-app/test/features/site/theme.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ Feature: Site theme
Given I visit the page "/"
Then the site header background color should be "rgb(225, 57, 64)"

@mockserver
Scenario: The theme can be set per site section
Given the site endpoint returns fixture "/site/reference" with status 200
And I load the page fixture with "/landingpage/home"
And the site sections primary colour is set to "#1962A3"
And the page endpoint for path "/section-page" returns the loaded fixture
When I visit the page "/section-page"
Then the site header background color should be "rgb(25, 98, 163)"

@mockserver
Scenario: Feature flags set neutral theme
Given the site endpoint returns fixture "/site/neutral-footer" with status 200
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"query": "gover",
"types": {
"documents": {
"fields": [
"title"
]
}
},
"size": 8
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"results": {
"documents": [
{
"suggestion": "govern"
},
{
"suggestion": "government"
},
{
"suggestion": "government agency"
}
]
},
"meta": {
"request_id": "9b60a1b5a0ec63cc9b61f39236649a04"
}
}
18 changes: 18 additions & 0 deletions examples/nuxt-app/test/fixtures/landingpage/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@
{
"text": "Demo Tag",
"url": "/tags/demo-tag"
},
{
"text": "Another Demo Tag",
"url": "/tags/another-demo-tag"
}
],
"topic": {
"text": "Demo Topic",
"url": "/topic/demo-topic"
},
"tags": [
{
"text": "Demo Tag",
"url": "/tags/demo-tag"
},
{
"text": "Another Demo Tag",
"url": "/tags/another-demo-tag"
}
],
"sidebar": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
"config": {
"searchListingConfig": {
"index": "suggestion_index",
"resultsPerPage": 10,
"suggestions": {
"enabled": false
}
"resultsPerPage": 10
},
"queryConfig": {
"multi_match": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"resultsPerPage": 10,
"suggestions": {
"enabled": true,
"key": "suggestion_override_key"
"key": "suggestion_override_key",
"minCharacters": 5
}
},
"queryConfig": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"config": {
"searchListingConfig": {
"index": "suggestion_index",
"resultsPerPage": 10
"resultsPerPage": 10,
"suggestions": {
"enabled": true
}
},
"queryConfig": {
"multi_match": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"query": "The",
"query": "There",
"types": {
"documents": {
"fields": [
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.20.0",
"version": "2.21.0",
"npmClient": "pnpm",
"exact": true,
"command": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-ripple/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/eslint-config-ripple",
"description": "ESLint config for Ripple projects",
"version": "2.20.0",
"version": "2.21.0",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "index.js",
Expand Down
Loading

0 comments on commit 96977b0

Please sign in to comment.