Skip to content

Commit

Permalink
Merge pull request #1442 from dpc-sdp/release/2.25.0
Browse files Browse the repository at this point in the history
Release/2.25.0
  • Loading branch information
dylankelly authored Feb 4, 2025
2 parents dec415c + 38d4353 commit 81b30fc
Show file tree
Hide file tree
Showing 77 changed files with 1,568 additions and 106 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.25.0

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

## v2.24.0

[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/2.24.0...v2.24.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,37 @@ Feature: Custom Collection
And the "cslReq" network request should be made to the elasticsearch endpoint
And the search listing layout should be "table"

@mockserver
Scenario: Custom collection emits search related events for analytics
Given the page endpoint for path "/custom-collection" 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"
And I wait 400 milliseconds
Then I type "the" into the custom collection input
Then I toggle the content collection filters
When I click the search listing dropdown field labelled "Topics"
And I click the option labelled "Another Demo Topic" in the selected dropdown
When I click the search listing dropdown field labelled "Topics"
And I submit the search filters
And I wait 400 milliseconds
Then I clear the search filters
Then I toggle the content collection filters
And I click 'next' in the pagination controls
And I wait 400 milliseconds

Then the dataLayer should include the following events
| event | name | element_id | element_text | filters | count | label | component | index |
| view_search_results | Test custom collection | page-component-4470 | | | 282 | | tide-custom-collection | 1 |
| open_filters | Test custom collection | page-component-4470 | Filters | | | the | tide-custom-collection | |
| search | Test custom collection | page-component-4470 | Apply search filters | topic=Another+Demo+Topic | | the | tide-custom-collection | |
| view_search_results | Test custom collection | page-component-4470 | | topic=Another+Demo+Topic | 282 | the | tide-custom-collection | 1 |
| clear_search_filters | Test custom collection | page-component-4470 | Clear search filters | topic=Another+Demo+Topic | 282 | the | tide-custom-collection | |
| view_search_results | Test custom collection | page-component-4470 | | | 282 | | tide-custom-collection | 1 |
| close_filters | Test custom collection | page-component-4470 | Filters | | | | tide-custom-collection | |
| paginate_next | Test custom collection | page-component-4470 | Next | | 282 | | tide-custom-collection | 2 |
| view_search_results | Test custom collection | page-component-4470 | | | 282 | | tide-custom-collection | 2 |

@mockserver
Scenario: Default page - default form theme
Given the page endpoint for path "/custom-collection-theme-default" returns fixture "/landingpage/custom-collection/form-theme-default" with status 200
Expand Down
1 change: 1 addition & 0 deletions examples/nuxt-app/test/features/landingpage/home.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Feature: Home page
@mockserver
Scenario: Hero header
Then the hero title should be "Test landing page title"
Then the hero logo should be "/placeholders/logo.png"
Then the hero intro text should be "Test landing page title introduction text"
And the hero should display the following items
| text | url |
Expand Down
2 changes: 2 additions & 0 deletions examples/nuxt-app/test/features/landingpage/languages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Feature: Languages
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 section ".rpl-breadcrumbs__item:last-child" should be display "rtl" in "ar" with the font "Noto Kufi Arabic"
And the html language should be "ar"

@mockserver
Expand All @@ -31,4 +32,5 @@ Feature: Languages
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 section ".rpl-breadcrumbs__item:last-child" should be display "ltr" in "ko" with the font "Noto Sans KR"
And the html language should be "ko"
31 changes: 31 additions & 0 deletions examples/nuxt-app/test/features/search-listing/analytics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,37 @@ Feature: Search listing - Analytics
And the search autocomplete request is stubbed with "/search-listing/suggestions/none" fixture
And I am using a "macbook-16" device

@mockserver
Example: Listing emits search related events for analytics
Given the page endpoint for path "/search-listing" returns fixture "/search-listing/filters/page-simple" with status 200
And the search network request is stubbed with fixture "/search-listing/filters/response-large" and status 200

When I visit the page "/search-listing"
And I wait 400 milliseconds
Then I type "the" into the search input
And I toggle the search listing filters section
Then I click the search listing dropdown field labelled "Term filter example"
And I click the option labelled "Blue" in the selected dropdown
And I click the search listing dropdown field labelled "Term filter example"
And I submit the search filters
And I wait 400 milliseconds
Then I clear the search filters
And I toggle the search listing filters section
And I click 'next' in the pagination controls
And I wait 400 milliseconds

Then the dataLayer should include the following events
| event | name | form_id | element_text | filters | count | label | component | index |
| view_search_results | Simple listing | tide-search-listing | | | 133 | | tide-search-listing | 1 |
| open_filters | Simple listing | tide-search-listing | Filters | | | the | tide-search-listing | |
| search | Simple listing | tide-search-listing | Apply search filters | termFilter=Blue | | the | tide-search-listing | |
| view_search_results | Simple listing | tide-search-listing | | termFilter=Blue | 133 | the | tide-search-listing | 1 |
| clear_search_filters | Simple listing | tide-search-listing | Clear search filters | termFilter=Blue | 133 | the | tide-search-listing | |
| view_search_results | Simple listing | tide-search-listing | | | 133 | | tide-search-listing | 1 |
| close_filters | Simple listing | tide-search-listing | Filters | | | | tide-search-listing | |
| paginate_next | Simple listing | tide-search-listing | Next | | 133 | | tide-search-listing | 2 |
| view_search_results | Simple listing | tide-search-listing | | | 133 | | tide-search-listing | 2 |

@mockserver
Example: Filters emit data for analytics
Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,31 @@ Feature: Result items
| Accessibility guidelines | tide-search-result-card |
| Small business grant | tide-grant-search-result |
| GovHack 2022 is coming | tide-search-result |

@mockserver
Example: Result contents from elasticsearch can be customised to exclude fields
Given I load the page fixture with "/search-listing/result-items/page"
And the search listing config has the following excludes added to source
| key |
| nid |
| field_node_site |
Then the page endpoint for path "/search-results" returns the loaded fixture
And the search network request is stubbed with fixture "/search-listing/result-items/response" and status 200

When I visit the page "/search-results"
Then the search listing page should have 4 results
And the search network request should be called with the "/search-listing/result-items/request-source-exclude" fixture

@mockserver
Example: Result contents from elasticsearch can be customised to include fields
Given I load the page fixture with "/search-listing/result-items/page"
And the search listing config has the following includes added to source
| key |
| title |
| field_summary |
Then the page endpoint for path "/search-results" returns the loaded fixture
And the search network request is stubbed with fixture "/search-listing/result-items/response" and status 200

When I visit the page "/search-results"
Then the search listing page should have 4 results
And the search network request should be called with the "/search-listing/result-items/request-source-include" fixture
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"id": "4470",
"props": {
"id": "4470",
"title": "Test custom collection",
"searchListingConfig": {
"resultsPerPage": 20,
"formTheme": "default",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Demo Landing Page",
"title": "مزايا رياض الأطفال",
"changed": "2022-11-02T12:47:29+11:00",
"created": "2022-11-02T12:47:29+11:00",
"type": "landing_page",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Demo Landing Page",
"title": "지역 사회 서비스, 계약업체 청소 및 경비 산업의 빅토리아주",
"changed": "2022-11-02T12:47:29+11:00",
"created": "2022-11-02T12:47:29+11:00",
"type": "landing_page",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"title": "Simple listing",
"changed": "2022-11-02T12:47:29+11:00",
"created": "2022-11-02T12:47:29+11:00",
"type": "tide_search_listing",
"nid": "11dede11-10c0-111e1-1100-000000000330",
"showTopicTags": true,
"summary": "",
"config": {
"searchListingConfig": {
"resultsPerPage": 10
},
"queryConfig": {
"multi_match": {
"query": "{{query}}",
"fields": [
"title^3",
"field_landing_page_summary^2",
"body",
"field_paragraph_body",
"summary_processed"
]
}
},
"results": {
"layout": {
"component": "TideSearchResultsList"
},
"item": {
"grant": {
"component": "TideGrantSearchResult"
}
}
},
"globalFilters": [
{ "terms": { "type": ["grant"] } },
{ "terms": { "field_node_site": [8888] } }
],
"userFilters": [
{
"id": "termFilter",
"component": "TideSearchFilterDropdown",
"filter": {
"type": "term",
"value": "termFilter.keyword"
},
"aggregations": {
"field": "termFilter",
"source": "taxonomy"
},
"props": {
"id": "termFilter",
"label": "Term filter example",
"placeholder": "Select a colour",
"multiple": true,
"options": [
{
"id": "1",
"label": "Red",
"value": "Red"
},
{
"id": "2",
"label": "Green",
"value": "Green"
},
{
"id": "3",
"label": "Blue",
"value": "Blue"
}
]
}
}
]
}
}
Loading

0 comments on commit 81b30fc

Please sign in to comment.