Skip to content

Commit

Permalink
Merge pull request #1428 from dpc-sdp/release/2.24.0
Browse files Browse the repository at this point in the history
Merge Release/2.24.0 -> Develop
  • Loading branch information
waitingallday authored Jan 22, 2025
2 parents 02e40e8 + c5e89f1 commit dec415c
Show file tree
Hide file tree
Showing 84 changed files with 1,989 additions and 337 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.24.0

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

## v2.23.0

[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/2.23.0...v2.23.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Forms, extended
And a field labelled "Extended" should exist with the CSS class ".rpl-form__input--type-item"

@mockserver
Scenario: Unsupported input
Scenario: Unsupported input (draft page)
Given I visit the page "/webform"
Then the landing page component "TideLandingPageWebForm" should exist
And an input of type "signature" is not yet supported
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,33 @@ Feature: Custom Collection
Then the custom collection component results count should read "Displaying 1-20 of 282 results"
And only the search filters should be visible

@mockserver
Example: Should show filters on load when showFiltersOnLoad is set
Given I load the page fixture with "/landingpage/custom-collection/form-theme-default"
And the custom collection config has "showFiltersOnLoad" 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 "/filters-on-load" returns the loaded fixture

When I visit the page "/filters-on-load"
Then the custom collection filters should be open

When I toggle the content collection filters
Then the custom collection filters should not be open

@mockserver
Example: Should collapse filters on mobile load when showFiltersOnLoad is set
Given I am using a "iphone-x" device
Then I load the page fixture with "/landingpage/custom-collection/form-theme-default"
And the custom collection config has "showFiltersOnLoad" 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 "/filters-on-load" returns the loaded fixture

When I visit the page "/filters-on-load"
Then the custom collection filters should not be open

When I toggle the content collection filters
Then the custom collection filters should be open

@mockserver
Example: Should hide results count when hideResultsCount is set
Given I load the page fixture with "/landingpage/custom-collection/page"
Expand Down
16 changes: 16 additions & 0 deletions examples/nuxt-app/test/features/landingpage/languages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,32 @@ Feature: Languages
Background:
Given the site endpoint returns fixture "/site/reference" with status 200

@mockserver
Scenario: The main language is set
Given the page endpoint for path "/" returns fixture "/landingpage/home" with status 200
When I visit the page "/"
Then the html language should be "en"

@mockserver
Scenario: The fallback language is en-AU
And I load the page fixture with "/landingpage/home"
And the page language is set to ''
And the page endpoint for path "/" returns the loaded fixture
When I visit the page "/"
Then the html language should be "en-AU"

@mockserver
Scenario: RTL languages load with the correct font and direction
Given the page endpoint for path "/arabic-page" returns fixture "/landingpage/languages-ar" with status 200
When I visit the page "/arabic-page"
Then the section ".rpl-header" should be display "rtl" in "ar" with the font "Noto Kufi Arabic"
And the section "#rpl-main" should be display "rtl" in "ar" with the font "Noto Kufi Arabic"
And the html language should be "ar"

@mockserver
Scenario: LTR languages load with the correct font and direction
Given the page endpoint for path "/korean-page" returns fixture "/landingpage/languages-ko" with status 200
When I visit the page "/korean-page"
Then the section ".rpl-header" should be display "ltr" in "ko" with the font "Noto Sans KR"
And the section "#rpl-main" should be display "ltr" in "ko" with the font "Noto Sans KR"
And the html language should be "ko"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions examples/nuxt-app/test/features/maps/maps.feature
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ Feature: Custom collection map component
When I wait 4 seconds
Then the map matches the image snapshot "map-sidepanel-item-click"

@mockserver
Scenario: Single active feature is split out from clustered features
Given I load the page fixture with "/maps/basic-page"
Given the side panel is enabled
And the clustering distance is set to "400"
Given the popup type is "sidebar"
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 4 seconds
Then the map matches the image snapshot "map-popup-type-sidebar-with-sidepanel-double-pin-single-active"

@mockserver
Scenario: Reaching the maximum zoom level will show clustered features in grouped popup
Given I load the page fixture with "/maps/basic-page"
Expand Down
16 changes: 16 additions & 0 deletions examples/nuxt-app/test/features/search-listing/filters.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ Feature: Search listing - Filter
When I visit the page "/filters"
Then the search listing filters section should be open

When I toggle the search listing filters section
Then the search listing filters section should not be open

@mockserver
Example: Filter collapsed open on mobile page load
Given I am using a "iphone-x" device
Then the page endpoint for path "/filters" returns fixture "/search-listing/filters/filters-open" with status 200
And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200

When I visit the page "/filters"
Then the search listing filters section should not be open

When I toggle the search listing filters section
Then the search listing filters section should be open

@mockserver
Example: Raw filter - Should reflect the value from the URL
Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200
Expand Down Expand Up @@ -218,6 +233,7 @@ Feature: Search listing - Filter
Then the search listing dropdown field labelled "Terms filter example" should have the value "Purple"
Then the search listing dropdown field labelled "Custom function filter example" should have the value "Open"
And the search listing checkbox field labelled "Show archived content" should be checked
And the search listing checkbox field labelled "Weekdays" should be checked

When I clear the search filters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ Feature: No results
And the search network request is stubbed with fixture "/search-listing/errors/response-empty" and status 200
When I visit the page "/search-list-grid"
Then the search listing page should have 0 results
And the no results component should display "Sorry! We couldn't find any matches"

@mockserver
Example: Empty response with custom component
Given the page endpoint for path "/search-list-custom" returns fixture "/search-listing/no-results/page" with status 200
And the search network request is stubbed with fixture "/search-listing/errors/response-empty" and status 200
When I visit the page "/search-list-custom"
Then the search listing page should have 0 results
And the no results component should display "This is a custom component"
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ Feature: Search Queries
Given the site endpoint returns fixture "/site/reference" with status 200
And I am using a "macbook-16" device

@mockserver
Example: The search term is displayed after submitting a search with results
Given the page endpoint for path "/" returns fixture "/search-listing/search-query/page" with status 200
And the search network request is stubbed with fixture "/search-listing/search-query/response" and status 200

When I visit the page "/"
Then I type "Grant" into the search input
And I click the search button
Then the search results heading should show "Search results for 'Grant'"

When I type "Grants" into the search input
Then the search results heading should show "Search results for 'Grant'"

@mockserver
Example: The search term is not displayed after submitting a search with no results
Given the page endpoint for path "/" returns fixture "/search-listing/search-query/page" with status 200
And the search network request is stubbed with fixture "/search-listing/errors/response-empty" and status 200

When I visit the page "/"
Then I type "Zoo" into the search input
And I click the search button
Then the search results heading should not be displayed

@mockserver
Example: The search term query can be extended and a custom query config supplied
Given the page endpoint for path "/" returns fixture "/search-listing/search-query/page" with status 200
Expand Down
129 changes: 129 additions & 0 deletions examples/nuxt-app/test/features/search-listing/sidebar-filters.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
Feature: Search listing - Sidebar filters

Background:
Given the site endpoint returns fixture "/site/reference" with status 200
And the search autocomplete request is stubbed with "/search-listing/suggestions/none" fixture

@mockserver
Example: Sidebar filters are visible open on page load (desktop)
Given I am using a "macbook-16" device
Then the page endpoint for path "/filters" returns fixture "/search-listing/filters/filters-sidebar" with status 200
And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200

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

@mockserver
Example: Sidebar filters are collapsed open on page load (mobile)
Given I am using a "iphone-x" device
Then the page endpoint for path "/filters" returns fixture "/search-listing/filters/filters-sidebar" with status 200
And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200

When I visit the page "/filters"
Then the search listing filters section should not be open

@mockserver
Example: Submitting the search bar scrolls to results
Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/filters-sidebar" with status 200
And the search network request is stubbed with fixture "/search-listing/search-query/response" and status 200

When I visit the page "/filters"
And I type "The" into the search input
And I click the search button
Then I should be scrolled to the search results with an offset of 32

@mockserver
Example: Sidebar filters update the URL and tally when the filters are applied
Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/filters-sidebar" with status 200
And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200

When I visit the page "/filters"
Then the search listing page should have 2 results
And the sidebar filters heading should show 0 applied filters
And the search network request should be called with the "/search-listing/filters/request-clear-empty" fixture

When I type "the" into the search input
And I click the search listing dropdown field labelled "Term filter example"
Then I click the option labelled "Blue" in the selected dropdown

When I click the search listing dropdown field labelled "Terms filter example"
Then I click the option labelled "Purple" in the selected dropdown
And I click the option labelled "Yellow" in the selected dropdown
And I click the search listing dropdown field labelled "Terms filter example"

When I click the search listing dropdown field labelled "Terms dependent example"
And I click the option labelled "Mammals" in the selected dropdown
When I click the search listing dropdown field labelled "Terms dependent child example"
And I click the option labelled "Dogs" in the selected dropdown
When I click the search listing dropdown field labelled "Terms dependent grandchild example"
And I click the option labelled "Beagle" in the selected dropdown
And I click the option labelled "Spaniel" in the selected dropdown
Then I click the search listing dropdown field labelled "Terms dependent grandchild example"

And I click the search listing checkbox field labelled "Show archived content"
And I click the search listing checkbox field labelled "Weekdays"
And I click the search listing checkbox field labelled "Weekends"

Then I enter the range from "2025-02-22" to "2026-06-03" in the date range field labelled "Date range example"

When I submit the search filters
Then the URL should reflect that the current active filters are as follows:
| id | value | index |
| q | the | 0 |
| termFilter | Blue | 0 |
| termsFilter | Purple | 0 |
| termsFilter | Yellow | 1 |
| dependentFilter | dependentFilter-1:Mammals | 0 |
| dependentFilter | dependentFilter-2:Dogs | 1 |
| dependentFilter | dependentFilter-3:Beagle,Spaniel | 2 |
| checkboxFilter | Archived | |
| checkboxFilterGroup | Weekdays | 0 |
| checkboxFilterGroup | Weekends | 1 |
| dateRangeFilter | from:2025-02-22 | 0 |
| dateRangeFilter | to:2026-06-03 | 1 |
And the sidebar filters heading should show 8 applied filters

@mockserver
Example: Sidebar filters reflect values from the URL
Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/filters-sidebar" with status 200
And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200

When I visit the page "/filters?q=the&termFilter=Blue&termsFilter=Purple&termsFilter=Yellow&dependentFilter=dependentFilter-1:Mammals&dependentFilter=dependentFilter-2:Dogs&dependentFilter=dependentFilter-3:Beagle,Spaniel&checkboxFilter=Archived&checkboxFilterGroup=Weekends&dateRangeFilter=from:2025-02-22&dateRangeFilter=to:2026-06-03"
And the search network request should be called with the "/search-listing/filters/request-sidebar" fixture
And the sidebar filters heading should show 8 applied filters

Then the search input should have the value "the"
Then the search listing dropdown field labelled "Term filter example" should have the value "Blue"
Then the search listing dropdown field labelled "Terms filter example" should have the value "Purple, Yellow"
Then the search listing dropdown field labelled "Terms dependent example" should have the value "Mammals"
Then the search listing dropdown field labelled "Terms dependent child example" should have the value "Dogs"
Then the search listing dropdown field labelled "Terms dependent grandchild example" should have the value "Beagle, Spaniel"
And the search listing checkbox field labelled "Show archived content" should be checked
And the search listing checkbox field labelled "Weekends" should be checked
And the search listing date range field labelled "Date range example" should have the values
| from | to |
| 2025-02-22 | 2026-06-03 |

When I clear the search filters
And the sidebar filters heading should show 0 applied filters
Then the URL should reflect that the current active filters are as follows:
| id |
| q |
| termFilter |
| termsFilter |
| dependentFilter |
| checkboxFilter |
| checkboxFilterGroup |
| dateRangeFilter |
Then the search input should have the value ""
Then the search listing dropdown field labelled "Term filter example" should have the value "Select a colour"
Then the search listing dropdown field labelled "Terms filter example" should have the value "Select a colour"
Then the search listing dropdown field labelled "Terms dependent example" should have the value "Select a species"
Then the search listing dropdown field labelled "Terms dependent child example" should have the value "All sub species"
Then the search listing dropdown field labelled "Terms dependent grandchild example" should have the value "All sub sub species"
And the search listing checkbox field labelled "Show archived content" should not be checked
And the search listing checkbox group labelled "Checkbox group" should not have any options checked
And the search listing date range field labelled "Date range example" should have the values
| from | to |
| | |
6 changes: 6 additions & 0 deletions examples/nuxt-app/test/features/site/search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: Site search
Then the search listing page should have 5 results
And the filters toggle should show 0 applied filters
And the search input should have the value "demo"
Then the search results heading should show "Search results for 'demo'"
And the search listing results count should read "Displaying 1-5 of 5 results"
And the search listing results should have following items:
| title | content | url | component |
Expand All @@ -32,9 +33,13 @@ Feature: Site search
| filters[0][values][0] | Education |
And the network request "siteSearchReq" should be called with the "/site/search-request" fixture

When I type "the" into the search input
Then the search results heading should show "Search results for 'demo'"

When I clear the search filters
Then the filters toggle should show 0 applied filters
And the search input should have the value ""
And the search results heading should not be displayed

@mockserver
Example: Overrides site search content types with feature flag
Expand All @@ -55,3 +60,4 @@ Feature: Site search
Given the "/api/tide/search/**" network request is stubbed with fixture "/site/search-response" and status 200 as alias "siteSearchReq"
When I visit the page "/search"
Then the search input should be have a max length of 128
And the search results heading should not be displayed
6 changes: 3 additions & 3 deletions examples/nuxt-app/test/fixtures/maps/simple-map-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
{
"_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_develop_node",
"_id": "entity:node/37146:en",
"_id": "entity:node/37144:en",
"_score": null,
"_source": {
"_language": "en",
Expand All @@ -52,7 +52,7 @@
},
{
"_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_develop_node",
"_id": "entity:node/37146:en",
"_id": "entity:node/37145:en",
"_score": null,
"_source": {
"_language": "en",
Expand Down Expand Up @@ -97,7 +97,7 @@
},
{
"_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_develop_node",
"_id": "entity:node/37146:en",
"_id": "entity:node/37147:en",
"_score": null,
"_source": {
"_language": "en",
Expand Down
Loading

0 comments on commit dec415c

Please sign in to comment.