diff --git a/examples/nuxt-app/test/features/landingpage/custom-collection.feature b/examples/nuxt-app/test/features/landingpage/custom-collection.feature index 7be02c7e6..06478f0c4 100644 --- a/examples/nuxt-app/test/features/landingpage/custom-collection.feature +++ b/examples/nuxt-app/test/features/landingpage/custom-collection.feature @@ -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 diff --git a/examples/nuxt-app/test/features/search-listing/analytics.feature b/examples/nuxt-app/test/features/search-listing/analytics.feature index a57fc307f..cf816f97c 100644 --- a/examples/nuxt-app/test/features/search-listing/analytics.feature +++ b/examples/nuxt-app/test/features/search-listing/analytics.feature @@ -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 diff --git a/examples/nuxt-app/test/fixtures/landingpage/custom-collection/page.json b/examples/nuxt-app/test/fixtures/landingpage/custom-collection/page.json index 6cabcce01..6ad02cf2d 100644 --- a/examples/nuxt-app/test/fixtures/landingpage/custom-collection/page.json +++ b/examples/nuxt-app/test/fixtures/landingpage/custom-collection/page.json @@ -93,6 +93,7 @@ "id": "4470", "props": { "id": "4470", + "title": "Test custom collection", "searchListingConfig": { "resultsPerPage": 20, "formTheme": "default", diff --git a/examples/nuxt-app/test/fixtures/search-listing/filters/page-simple.json b/examples/nuxt-app/test/fixtures/search-listing/filters/page-simple.json new file mode 100644 index 000000000..d0e9637e7 --- /dev/null +++ b/examples/nuxt-app/test/fixtures/search-listing/filters/page-simple.json @@ -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" + } + ] + } + } + ] + } +} diff --git a/examples/nuxt-app/test/fixtures/search-listing/filters/response-large.json b/examples/nuxt-app/test/fixtures/search-listing/filters/response-large.json new file mode 100644 index 000000000..b712335b6 --- /dev/null +++ b/examples/nuxt-app/test/fixtures/search-listing/filters/response-large.json @@ -0,0 +1,983 @@ +{ + "took": 7, + "timed_out": false, + "_shards": { + "total": 5, + "successful": 5, + "skipped": 0, + "failed": 0 + }, + "hits": { + "total": { + "value": 133, + "relation": "eq" + }, + "max_score": null, + "hits": [ + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/17551:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/changing-places-funding-round" + ], + "changed": [ + "2023-03-21T07:50:52+11:00" + ], + "created": [ + "2021-06-29T13:10:09+10:00" + ], + "field_audience": [ + 81, + 82, + 83 + ], + "field_audience_name": [ + "Government", + "Not-for-profit groups", + "Business" + ], + "field_audience_uuid": [ + "a888f885-0ce7-4eff-b664-e1c8165f2f18", + "4038b20b-a519-4963-9cb6-04364cbe8eba", + "eb8e493b-d633-4ec9-99f6-1a825e7242c8" + ], + "field_landing_page_intro_text": [ + "The 2023 Changing Places funding is now open for applications to build additional Changing Places facilities across Victoria." + ], + "field_landing_page_summary": [ + "The 2023 Changing Places funding is now open for applications to build additional Changing Places facilities across Victoria." + ], + "field_media_image_absolute_path": [ + "https://content.vic.gov.au/sites/default/files/2021-06/labelled-changing-places.jpg" + ], + "field_node_dates_end_value": [ + "2023-04-14T17:00:00+10:00" + ], + "field_node_dates_start_value": [ + "2023-03-17T09:00:00+11:00" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 4 + ], + "field_node_site": [ + 527, + 4 + ], + "field_topic": [ + 12 + ], + "field_topic_name": [ + "Equality" + ], + "field_topic_path": [ + "/topic/equality" + ], + "field_topic_uuid": [ + "bd2d883f-9537-43a5-bf57-697142036ba9" + ], + "funding_level_from": [ + 1 + ], + "funding_level_to": [ + 180000 + ], + "langcode": [ + "en" + ], + "nid": [ + 17551 + ], + "status": [ + true + ], + "title": [ + "2023 Changing Places funding round" + ], + "type": [ + "grant" + ], + "uid": [ + 7875 + ], + "uuid": [ + "09e27113-0159-4a06-b722-dfbea94945ca" + ] + }, + "sort": [ + 1.0, + "2023 Changing Places funding round" + ] + }, + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/25324:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/childrens-week-grants-program" + ], + "changed": [ + "2024-06-21T10:11:25+10:00" + ], + "created": [ + "2022-05-30T15:41:14+10:00" + ], + "field_audience": [ + 82, + 81 + ], + "field_audience_name": [ + "Not-for-profit groups", + "Government" + ], + "field_audience_uuid": [ + "4038b20b-a519-4963-9cb6-04364cbe8eba", + "a888f885-0ce7-4eff-b664-e1c8165f2f18" + ], + "field_content_category": [ + 1328 + ], + "field_content_category_name": [ + "Guide/guidance" + ], + "field_landing_page_contact_name": [ + "Children\u0027s Week team" + ], + "field_landing_page_intro_text": [ + "Local councils or eligible not-for-profit organisations can apply for a grant of up to $1,000 to help host a Children’s Week activity." + ], + "field_landing_page_summary": [ + "Local councils or eligible not-for-profit organisations can apply for a grant of up to $1,000 to help host a Children’s Week activity." + ], + "field_node_dates_end_value": [ + "2024-06-16T00:00:00+10:00" + ], + "field_node_dates_start_value": [ + "2024-05-01T00:00:00+10:00" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 4 + ], + "field_node_site": [ + 4, + 840 + ], + "field_topic": [ + 10 + ], + "field_topic_name": [ + "Education" + ], + "field_topic_path": [ + "/topic/education" + ], + "field_topic_uuid": [ + "3764c1dc-9475-43cc-a483-96bec239c4f7" + ], + "funding_level_from": [ + 0 + ], + "funding_level_to": [ + 1000 + ], + "langcode": [ + "en" + ], + "nid": [ + 25324 + ], + "status": [ + true + ], + "title": [ + "2024 Children’s Week Grants Program" + ], + "type": [ + "grant" + ], + "uid": [ + 9790 + ], + "uuid": [ + "bc2234f2-9609-4fb9-871f-d4084b5a2415" + ] + }, + "sort": [ + 1.0, + "2024 Children’s Week Grants Program" + ] + }, + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/38385:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/2024-victorian-landcare-grants" + ], + "changed": [ + "2024-03-20T12:57:48+11:00" + ], + "created": [ + "2024-03-20T11:41:03+11:00" + ], + "field_audience": [ + 82 + ], + "field_audience_name": [ + "Not-for-profit groups" + ], + "field_audience_uuid": [ + "4038b20b-a519-4963-9cb6-04364cbe8eba" + ], + "field_content_category": [ + 1340 + ], + "field_content_category_name": [ + "Grant" + ], + "field_landing_page_intro_text": [ + "Victorian Landcare Grants support Landcare and environmental volunteer groups and networks with on-ground works, education and capacity building projects that protect and restore our land and natural environment." + ], + "field_landing_page_summary": [ + "Victorian Landcare Grants support Landcare and environmental volunteer groups and networks with on-ground works, education and capacity building projects that protect and restore our land and natural environment." + ], + "field_node_dates_end_value": [ + "2024-04-30T10:00:00+10:00" + ], + "field_node_dates_start_value": [ + "2024-03-20T11:00:00+11:00" + ], + "field_node_link": [ + "https://www.environment.vic.gov.au/grants/victorian-landcare-grants" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 4 + ], + "field_node_site": [ + 4 + ], + "field_topic": [ + 11 + ], + "field_topic_name": [ + "Environment, water \u0026 energy" + ], + "field_topic_path": [ + "/topic/environment-water-energy" + ], + "field_topic_uuid": [ + "56387cfe-be0a-4f5c-b3ca-f980a154699c" + ], + "funding_level_from": [ + 500 + ], + "funding_level_to": [ + 20000 + ], + "langcode": [ + "en" + ], + "nid": [ + 38385 + ], + "status": [ + true + ], + "title": [ + "2024 Victorian Landcare Grants" + ], + "type": [ + "grant" + ], + "uid": [ + 6087 + ], + "uuid": [ + "49391301-9889-4214-b721-188254284a56" + ] + }, + "sort": [ + 1.0, + "2024 Victorian Landcare Grants" + ] + }, + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/25150:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/2024-victorian-manufacturing-hall-fame-awards" + ], + "changed": [ + "2024-07-24T04:00:04+10:00" + ], + "created": [ + "2022-05-12T04:00:24+10:00" + ], + "field_audience": [ + 83 + ], + "field_audience_name": [ + "Business" + ], + "field_audience_uuid": [ + "eb8e493b-d633-4ec9-99f6-1a825e7242c8" + ], + "field_landing_page_summary": [ + "The Victorian Manufacturing Hall of Fame recognises outstanding businesses and individuals in the manufacturing industry." + ], + "field_node_dates_end_value": [ + "2024-10-03T22:00:00+10:00" + ], + "field_node_dates_start_value": [ + "2024-04-19T22:00:00+10:00" + ], + "field_node_link": [ + "https://business.vic.gov.au/grants-and-programs/victorian-manufacturing-hall-of-fame" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 4 + ], + "field_node_site": [ + 4 + ], + "langcode": [ + "en" + ], + "nid": [ + 25150 + ], + "status": [ + true + ], + "title": [ + "2024 Victorian Manufacturing Hall of Fame Awards" + ], + "type": [ + "grant" + ], + "uid": [ + 0 + ], + "uuid": [ + "8cb2882c-8ae5-432c-9eda-31c252d5684b" + ] + }, + "sort": [ + 1.0, + "2024 Victorian Manufacturing Hall of Fame Awards" + ] + }, + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/37844:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/2024-25-community-road-safety-grants-program" + ], + "changed": [ + "2024-02-06T16:34:26+11:00" + ], + "created": [ + "2024-02-06T15:12:12+11:00" + ], + "field_audience": [ + 81, + 82 + ], + "field_audience_name": [ + "Government", + "Not-for-profit groups" + ], + "field_audience_uuid": [ + "a888f885-0ce7-4eff-b664-e1c8165f2f18", + "4038b20b-a519-4963-9cb6-04364cbe8eba" + ], + "field_content_category": [ + 1340 + ], + "field_content_category_name": [ + "Grant" + ], + "field_landing_page_intro_text": [ + "The Community Road Safety Grants Program provides up to $1.5 million in funding to empower local communities to prevent serious injuries and reduce the number of lives lost on Victoria’s roads." + ], + "field_landing_page_summary": [ + "The Community Road Safety Grants Program provides up to $1.5 million in funding to empower local communities to prevent serious injuries and reduce the number of lives lost on Victoria’s roads." + ], + "field_node_dates_end_value": [ + "2024-03-06T11:00:00+11:00" + ], + "field_node_dates_start_value": [ + "2024-02-07T11:00:00+11:00" + ], + "field_node_link": [ + "https://www.vicroads.vic.gov.au/safety-and-road-rules/road-safety-programs/vicroads-community-road-safety-grants-program/standard-grants-program" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 4 + ], + "field_node_site": [ + 4 + ], + "field_topic": [ + 3 + ], + "field_topic_name": [ + "Communities" + ], + "field_topic_path": [ + "/topic/communities" + ], + "field_topic_uuid": [ + "99d1629f-0227-4e91-bd83-e5998636074a" + ], + "funding_level_from": [ + 1 + ], + "funding_level_to": [ + 1500000 + ], + "langcode": [ + "en" + ], + "nid": [ + 37844 + ], + "status": [ + true + ], + "title": [ + "2024-25 Community Road Safety Grants Program" + ], + "type": [ + "grant" + ], + "uid": [ + 6087 + ], + "uuid": [ + "358bccba-b6d4-4be3-96d5-6cb17ff06c31" + ] + }, + "sort": [ + 1.0, + "2024-25 Community Road Safety Grants Program" + ] + }, + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/40428:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/aboriginal-business-growth-program-grants-between-10k-and-100k" + ], + "changed": [ + "2024-07-23T04:00:04+10:00" + ], + "created": [ + "2024-07-23T04:00:04+10:00" + ], + "field_audience": [ + 83 + ], + "field_audience_name": [ + "Business" + ], + "field_audience_uuid": [ + "eb8e493b-d633-4ec9-99f6-1a825e7242c8" + ], + "field_content_category": [ + 1340 + ], + "field_content_category_name": [ + "Grant" + ], + "field_landing_page_summary": [ + "Grants from $10,000 to $100,000 (excluding GST) are available to help eligible Aboriginal businesses in Victoria to grow and develop." + ], + "field_node_dates_end_value": [ + "2024-09-06T22:00:00+10:00" + ], + "field_node_dates_start_value": [ + "2024-07-16T22:00:00+10:00" + ], + "field_node_link": [ + "https://business.vic.gov.au/grants-and-programs/victorian-aboriginal-business-investment-program/aboriginal-business-growth-program-grants-between-10K-and-100K" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 4 + ], + "field_node_site": [ + 4 + ], + "langcode": [ + "en" + ], + "nid": [ + 40428 + ], + "status": [ + true + ], + "title": [ + "Aboriginal Business Growth Program (Grants between $10K and $100K)" + ], + "type": [ + "grant" + ], + "uid": [ + 0 + ], + "uuid": [ + "f5445072-5fcf-44f8-ab5c-14d3bce55cdb" + ] + }, + "sort": [ + 1.0, + "Aboriginal Business Growth Program (Grants between $10K and $100K)" + ] + }, + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/40430:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/aboriginal-business-support-program-grants-between-5k-and-10k" + ], + "changed": [ + "2024-07-23T04:00:04+10:00" + ], + "created": [ + "2024-07-23T04:00:04+10:00" + ], + "field_audience": [ + 83 + ], + "field_audience_name": [ + "Business" + ], + "field_audience_uuid": [ + "eb8e493b-d633-4ec9-99f6-1a825e7242c8" + ], + "field_content_category": [ + 1340 + ], + "field_content_category_name": [ + "Grant" + ], + "field_landing_page_summary": [ + "Grants from $5,000 to $10,000 (excluding GST) are available to support eligible Aboriginal businesses in Victoria." + ], + "field_node_dates_end_value": [ + "2024-09-06T22:00:00+10:00" + ], + "field_node_dates_start_value": [ + "2024-07-16T22:00:00+10:00" + ], + "field_node_link": [ + "https://business.vic.gov.au/grants-and-programs/victorian-aboriginal-business-investment-program/aboriginal-business-support-program-grants-between-5K-and-10K" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 4 + ], + "field_node_site": [ + 4 + ], + "langcode": [ + "en" + ], + "nid": [ + 40430 + ], + "status": [ + true + ], + "title": [ + "Aboriginal Business Support Program (Grants between $5K and $10K)" + ], + "type": [ + "grant" + ], + "uid": [ + 0 + ], + "uuid": [ + "7cdfc71b-d622-4e99-83ed-ff2630b0becc" + ] + }, + "sort": [ + 1.0, + "Aboriginal Business Support Program (Grants between $5K and $10K)" + ] + }, + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/2180:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/aboriginal-community-infrastructure-program", + "/site-224/aboriginal-community-infrastructure-program" + ], + "changed": [ + "2024-04-22T16:16:48+10:00" + ], + "created": [ + "2019-08-06T10:28:22+10:00" + ], + "field_audience": [ + 82 + ], + "field_audience_name": [ + "Not-for-profit groups" + ], + "field_audience_uuid": [ + "4038b20b-a519-4963-9cb6-04364cbe8eba" + ], + "field_content_category": [ + 1340 + ], + "field_content_category_name": [ + "Grant" + ], + "field_landing_page_intro_text": [ + "Funding up to $1.6 million is available for Aboriginal organisations to build new community infrastructure or repair, refurbish or expand existing community infrastructure." + ], + "field_landing_page_summary": [ + "Funding up to $1.6 million is available for Aboriginal organisations to build new community infrastructure or repair, refurbish or expand existing community infrastructure." + ], + "field_node_dates_end_value": [ + "2024-04-22T14:00:00+10:00" + ], + "field_node_dates_start_value": [ + "2024-02-13T14:41:33+11:00" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 224 + ], + "field_node_site": [ + 4, + 224 + ], + "field_topic": [ + 3 + ], + "field_topic_name": [ + "Communities" + ], + "field_topic_path": [ + "/topic/communities" + ], + "field_topic_uuid": [ + "99d1629f-0227-4e91-bd83-e5998636074a" + ], + "funding_level_from": [ + 50000 + ], + "funding_level_to": [ + 1600000 + ], + "langcode": [ + "en" + ], + "nid": [ + 2180 + ], + "status": [ + true + ], + "title": [ + "Aboriginal Community Infrastructure Program" + ], + "type": [ + "grant" + ], + "uid": [ + 59 + ], + "uuid": [ + "24413e6f-082d-4ddc-a099-1033dd002638" + ] + }, + "sort": [ + 1.0, + "Aboriginal Community Infrastructure Program" + ] + }, + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/18471:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/aboriginal-community-initiatives-fund-funding-guidelines" + ], + "changed": [ + "2025-01-21T13:53:26+11:00" + ], + "created": [ + "2021-09-02T12:21:17+10:00" + ], + "field_audience": [ + 82 + ], + "field_audience_name": [ + "Not-for-profit groups" + ], + "field_audience_uuid": [ + "4038b20b-a519-4963-9cb6-04364cbe8eba" + ], + "field_content_category": [ + 1340 + ], + "field_content_category_name": [ + "Grant" + ], + "field_landing_page_intro_text": [ + "Projects funded through the Aboriginal Community Initiatives Fund support and address priorities that are identified by the 11 Dhelk Dja Action Groups to address family violence at a local level." + ], + "field_landing_page_summary": [ + "Projects funded through the Aboriginal Community Initiatives Fund support and address priorities that are identified by the 11 Dhelk Dja Action Groups to address family violence at a local level." + ], + "field_node_dates_end_value": [ + "2025-02-14T17:00:00+11:00" + ], + "field_node_dates_start_value": [ + "2025-01-20T09:00:00+11:00" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 4 + ], + "field_node_site": [ + 4, + 122 + ], + "field_tags": [ + 19, + 32 + ], + "field_tags_name": [ + "Aboriginal Victorians", + "Not-for-profit groups" + ], + "field_tags_path": [ + "/tags/aboriginal-victorians", + "/tags/not-profit-groups" + ], + "field_tags_uuid": [ + "ab3d4289-d60b-475d-a76f-a4290372ae77", + "ac13ac18-41e7-4cca-9e23-17cfdb65f420" + ], + "field_topic": [ + 13 + ], + "field_topic_name": [ + "Health \u0026 social support" + ], + "field_topic_path": [ + "/topic/health-social-support" + ], + "field_topic_uuid": [ + "a5145be6-8c91-46f7-8f0e-6834b7a7348b" + ], + "funding_level_from": [ + 0 + ], + "funding_level_to": [ + 100000 + ], + "langcode": [ + "en" + ], + "nid": [ + 18471 + ], + "status": [ + true + ], + "title": [ + "Aboriginal Community Initiatives Fund: 2024–2025 funding round" + ], + "type": [ + "grant" + ], + "uid": [ + 7948 + ], + "uuid": [ + "f95027f6-5659-4b44-b1d4-4d710960b47d" + ] + }, + "sort": [ + 1.0, + "Aboriginal Community Initiatives Fund: 2024–2025 funding round" + ] + }, + { + "_index": "a83890f7a31dea14e1ae83c6f0afacca--elasticsearch_index_production_node", + "_id": "entity:node/16232:en", + "_score": 1.0, + "_source": { + "_language": "en", + "node_grants": [ + "node_access_all:0" + ], + "url": [ + "/site-4/aboriginal-community-mitigation-and-crisis-management-grants" + ], + "changed": [ + "2022-10-17T09:03:00+11:00" + ], + "created": [ + "2021-04-16T16:35:09+10:00" + ], + "field_audience": [ + 82 + ], + "field_audience_name": [ + "Not-for-profit groups" + ], + "field_audience_uuid": [ + "4038b20b-a519-4963-9cb6-04364cbe8eba" + ], + "field_landing_page_contact_name": [ + "Grant team" + ], + "field_landing_page_intro_text": [ + "To address unmet needs in strengthening Aboriginal communities’ resilience against natural disasters." + ], + "field_landing_page_summary": [ + "This grant program seeks to address unmet needs in strengthening Aboriginal communities’ resilience against natural disasters." + ], + "field_media_image_absolute_path": [ + "https://content.vic.gov.au/sites/default/files/2020-11/Keith%20Gunnai%20Kurnai%20Bataluk%202019.jpg" + ], + "field_node_dates_end_value": [ + "2021-05-16T23:59:00+10:00" + ], + "field_node_dates_start_value": [ + "2021-04-19T09:00:00+10:00" + ], + "field_node_on_going": [ + false + ], + "field_node_primary_csite": [ + 4 + ], + "field_node_site": [ + 293, + 4 + ], + "field_topic": [ + 3 + ], + "field_topic_name": [ + "Communities" + ], + "field_topic_path": [ + "/topic/communities" + ], + "field_topic_uuid": [ + "99d1629f-0227-4e91-bd83-e5998636074a" + ], + "langcode": [ + "en" + ], + "nid": [ + 16232 + ], + "status": [ + true + ], + "title": [ + "Aboriginal Community Mitigation and Crisis Management Grants" + ], + "type": [ + "grant" + ], + "uid": [ + 7796 + ], + "uuid": [ + "f73395ac-6d93-490d-aad3-adbfb5c6d90b" + ] + }, + "sort": [ + 1.0, + "Aboriginal Community Mitigation and Crisis Management Grants" + ] + } + ] + } +} diff --git a/packages/ripple-tide-search/components/global/TideCustomCollection.vue b/packages/ripple-tide-search/components/global/TideCustomCollection.vue index 14c8541d0..7f579d7d5 100644 --- a/packages/ripple-tide-search/components/global/TideCustomCollection.vue +++ b/packages/ripple-tide-search/components/global/TideCustomCollection.vue @@ -3,7 +3,8 @@ import { computed, getActiveFiltersTally, getActiveFilterURL, - ref + ref, + watch } from '#imports' import { submitForm } from '@formkit/vue' import { useBreakpoints, useDebounceFn } from '@vueuse/core' @@ -244,7 +245,9 @@ const baseEvent = () => ({ contextId: props.id, name: props.title, index: page.value, - label: searchTerm.value.q, + label: props.locationQueryConfig?.component + ? locationOrGeolocation.value?.name + : searchTerm.value.q, value: totalResults.value, options: getActiveFilterURL(filterForm.value), section: 'custom-collection' @@ -554,6 +557,22 @@ const locationOrGeolocation = computed(() => { : locationQuery.value }) +watch( + () => isBusy.value, + (loading, prevLoading) => { + if (!loading && prevLoading) { + emitRplEvent( + 'results', + { + ...baseEvent(), + action: 'view' + }, + { global: true } + ) + } + } +) + onMounted(() => { // If filters are shown on load for desktop, we still need to hide them on mobile if (initialFiltersExpanded && isMobile.value) {