-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[R20-713] fix spacing, add refine tally
- Loading branch information
Showing
7 changed files
with
281 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Feature: Site search | ||
|
||
Background: | ||
Given the site endpoint returns fixture "/site/reference" with status 200 | ||
|
||
@mockserver | ||
Example: Display and manage site search results | ||
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?q=demo" | ||
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" | ||
|
||
When I toggle the search listing filters section | ||
And I click the search listing dropdown field labelled "Select a topic" | ||
Then I click the option labelled "Education" in the selected dropdown | ||
Then I click the search listing dropdown field labelled "Select a topic" | ||
And I submit the search filters | ||
Then the filters toggle should show 1 applied filters | ||
And the URL should reflect that the current active filters are as follows: | ||
| id | value | | ||
| filters[0][field] | field_topic_name | | ||
| filters[0][values][0] | Education | | ||
And the network request "siteSearchReq" should be called with the "/site/search-request" fixture | ||
|
||
When I clear the search filters | ||
Then the filters toggle should show 0 applied filters | ||
And the search input should have the value "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"query": "demo", | ||
"filters": { | ||
"all": [ | ||
{ | ||
"any": [ | ||
{ | ||
"field_topic_name": "Education" | ||
} | ||
] | ||
}, | ||
{ | ||
"any": [ | ||
{ | ||
"field_node_site": "TEST_SITE" | ||
} | ||
] | ||
}, | ||
{ | ||
"any": [ | ||
{ | ||
"type": [ | ||
"landing_page", | ||
"event", | ||
"grant", | ||
"news", | ||
"publication", | ||
"publication_page", | ||
"tide_search_listing" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"search_fields": { | ||
"title": { | ||
"weight": 10 | ||
}, | ||
"body": {}, | ||
"field_paragraph_body": {}, | ||
"field_landing_page_summary": {}, | ||
"summary_processed": {}, | ||
"field_paragraph_summary": {}, | ||
"field_event_details_event_locality": {} | ||
}, | ||
"result_fields": { | ||
"title": { | ||
"raw": { | ||
"size": 150 | ||
} | ||
}, | ||
"field_landing_page_summary": { | ||
"snippet": { | ||
"size": 150, | ||
"fallback": true | ||
} | ||
}, | ||
"summary_processed": { | ||
"snippet": { | ||
"size": 150, | ||
"fallback": true | ||
} | ||
}, | ||
"changed": { | ||
"raw": {} | ||
}, | ||
"url": { | ||
"raw": {} | ||
}, | ||
"type": { | ||
"raw": {} | ||
} | ||
}, | ||
"page": { | ||
"size": 10, | ||
"current": 1 | ||
} | ||
} |
150 changes: 150 additions & 0 deletions
150
examples/nuxt-app/test/fixtures/site/search-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
{ | ||
"meta": { | ||
"alerts": [], | ||
"warnings": [], | ||
"precision": 2, | ||
"engine": { | ||
"name": "content-vic-production", | ||
"type": "elasticsearch" | ||
}, | ||
"page": { | ||
"current": 1, | ||
"total_pages": 1, | ||
"total_results": 4, | ||
"size": 10 | ||
}, | ||
"request_id": "3940dd8bb5a8a54484a2487ffb5fa272" | ||
}, | ||
"results": [ | ||
{ | ||
"field_landing_page_summary": { | ||
"snippet": "Explore local TAFE and training providers across Melbourne’s south-eastern region" | ||
}, | ||
"title": { | ||
"raw": ["TAFE and training providers in Melbourne’s south-east"] | ||
}, | ||
"type": { "raw": ["landing_page"] }, | ||
"url": { | ||
"raw": [ | ||
"/site-4/tafes-training-providers-melbourne-south-eastern-region" | ||
] | ||
}, | ||
"changed": { "raw": ["2024-05-23T02:59:08+00:00"] }, | ||
"_meta": { | ||
"engine": "content-vic-production", | ||
"score": 1.0, | ||
"id": "entity:node/37241:en" | ||
}, | ||
"id": { "raw": "entity:node/37241:en" } | ||
}, | ||
{ | ||
"field_landing_page_summary": { | ||
"snippet": "With TAFE, it's now easier than ever to learn new skills for your chosen career or retrain to get the job of your dreams" | ||
}, | ||
"title": { "raw": ["Time for a career change?"] }, | ||
"type": { "raw": ["landing_page"] }, | ||
"url": { "raw": ["/site-4/career-change"] }, | ||
"changed": { "raw": ["2024-05-23T00:06:15+00:00"] }, | ||
"_meta": { | ||
"engine": "content-vic-production", | ||
"score": 1.0, | ||
"id": "entity:node/38798:en" | ||
}, | ||
"id": { "raw": "entity:node/38798:en" } | ||
}, | ||
{ | ||
"field_landing_page_summary": { | ||
"snippet": "The Camps, Sports and Excursions Fund provides payments for eligible students to attend school camps, excursions, and sports and outdoor education" | ||
}, | ||
"title": { "raw": ["Camps, Sports and Excursions Fund"] }, | ||
"type": { "raw": ["grant"] }, | ||
"url": { "raw": ["/site-4/camps-sports-and-excursions-fund"] }, | ||
"changed": { "raw": ["2024-05-23T04:49:38+00:00"] }, | ||
"_meta": { | ||
"engine": "content-vic-production", | ||
"score": 1.0, | ||
"id": "entity:node/24023:en" | ||
}, | ||
"id": { "raw": "entity:node/24023:en" } | ||
}, | ||
{ | ||
"field_landing_page_summary": { | ||
"snippet": "This program aims to enhance the quality of the movement environment in early childhood education settings" | ||
}, | ||
"title": { "raw": ["Movement Environment Rating Scale (MOVERS)"] }, | ||
"type": { "raw": ["landing_page"] }, | ||
"url": { "raw": ["/site-4/movement-environment-rating-scale-movers"] }, | ||
"changed": { "raw": ["2024-03-01T08:25:05+00:00"] }, | ||
"_meta": { | ||
"engine": "content-vic-production", | ||
"score": 1.0, | ||
"id": "entity:node/30713:en" | ||
}, | ||
"id": { "raw": "entity:node/30713:en" } | ||
}, | ||
{ | ||
"field_landing_page_summary": { | ||
"snippet": "Learn more about our sponsors" | ||
}, | ||
"title": { "raw": ["Sponsors of the 2024 Victorian Training Awards"] }, | ||
"type": { "raw": ["landing_page"] }, | ||
"url": { "raw": ["/site-4/2024-victorian-training-award-sponsors"] }, | ||
"changed": { "raw": ["2024-05-23T05:11:21+00:00"] }, | ||
"_meta": { | ||
"engine": "content-vic-production", | ||
"score": 1.0, | ||
"id": "entity:node/17913:en" | ||
}, | ||
"id": { "raw": "entity:node/17913:en" } | ||
} | ||
], | ||
"facets": { | ||
"field_topic_name": [ | ||
{ | ||
"type": "value", | ||
"data": [ | ||
{ | ||
"value": "Education", | ||
"count": 2548 | ||
}, | ||
{ | ||
"value": "Governance", | ||
"count": 775 | ||
}, | ||
{ | ||
"value": "Equality", | ||
"count": 740 | ||
}, | ||
{ | ||
"value": "Communities", | ||
"count": 692 | ||
}, | ||
{ | ||
"value": "Health & social support", | ||
"count": 600 | ||
}, | ||
{ | ||
"value": "Traffic & transport", | ||
"count": 313 | ||
}, | ||
{ | ||
"value": "Environment, water & energy", | ||
"count": 302 | ||
}, | ||
{ | ||
"value": "Law & justice", | ||
"count": 263 | ||
}, | ||
{ | ||
"value": "Business & the workplace", | ||
"count": 170 | ||
}, | ||
{ | ||
"value": "Jobs & careers", | ||
"count": 165 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters