Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Feature: Content collection UI

Background:
Given the site endpoint returns fixture "/site/reference" with status 200
And the page endpoint for path "/home" returns fixture "/landingpage/home" with status 200
And the page endpoint for path "/" returns fixture "/landingpage/content-collection-ui/page" with status 200

@mockserver
Scenario: Page component - Content collection UI - Cards
Given the "/**/_search" network request is stubbed with fixture "/landingpage/content-collection-ui/response" and status 200 as alias "ccReq"
When I visit the page "/home"
When I click the primary nav logo
Then the content collection UI with ID "3938543" and type "card" exist with the following cards
| title | content | meta | image | url | type |
| Mental health and wellbeing toolkit | Advice to help promote and support student mental health and wellbeing | | /placeholders/medium.png | /mental-health-and-wellbeing-toolkit | promo-card |
| Summer of Cyber Program | The program is boosting the cyber capabilities | Grant | /placeholders/medium.png | https://business.vic.gov.au/grants-and-programs/summer-of-cyber-program | grant-result |
| Grievance progress | See how your grievance is progressing. | | /placeholders/medium.png | /mpb-grievance-progress | promo-card |
| Hilltop Music Festival | Hilltop Music Festival is a music festival | Olinda | /placeholders/medium.png | /hilltop-music-festival | event-result |
Then the content collection UI with ID "3938544" and type "carousel" exist with the following cards
| title | content | meta | url | type |
| Mental health and wellbeing toolkit | Advice to help promote and support student mental health and wellbeing | | /mental-health-and-wellbeing-toolkit | promo-card |
| Summer of Cyber Program | The program is boosting the cyber capabilities | Grant | https://business.vic.gov.au/grants-and-programs/summer-of-cyber-program | grant-result |
| Grievance progress | See how your grievance is progressing. | | /mpb-grievance-progress | promo-card |
| Hilltop Music Festival | Hilltop Music Festival is a music festival | Olinda | /hilltop-music-festival | event-result |
Then the content collection UI with ID "3938545" and type "list" exist with the following cards
| title | content | meta | url | type |
| Mental health and wellbeing toolkit | Advice to help promote and support student mental health and wellbeing | | /mental-health-and-wellbeing-toolkit | search-result |
| Summer of Cyber Program | The program is boosting the cyber capabilities | Closed | https://business.vic.gov.au/grants-and-programs/summer-of-cyber-program | grant-result |
| Grievance progress | See how your grievance is progressing. | | /mpb-grievance-progress | search-result |
| Hilltop Music Festival | Hilltop Music Festival is a music festival | Olinda | /hilltop-music-festival | event-result |
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
{
"title": "Testing content collection",
"changed": "2026-01-05T16:05:42+11:00",
"created": "2026-01-05T14:58:32+11:00",
"type": "landing_page",
"nid": "51e655fc-4809-4908-8a56-1ae303ff679f",
"_sectionId": "4",
"sidebar": {
"contacts": [],
"relatedLinks": [],
"whatsNext": [],
"socialShareNetworks": [],
"siteSectionNav": null
},
"status": "published",
"topicTags": [
{ "text": "Another Demo Topic", "url": "/topic/another-demo-topic" }
],
"tags": [],
"topic": { "text": "Another Demo Topic", "url": "/topic/another-demo-topic" },
"header": {
"title": "Testing content collection",
"summary": "",
"links": { "title": "", "items": [], "more": null },
"backgroundImageCaption": "",
"theme": "default",
"logoImage": null,
"backgroundImage": null,
"cornerTop": null,
"cornerBottom": null,
"primaryAction": null,
"secondaryAction": null,
"secondaryActionLabel": ""
},
"siteSection": {
"id": 4,
"name": "vic.gov.au",
"siteOverrides": {
"showQuickExit": null,
"featureFlags": {
"prodMeasurementID": "G-DPWDSMVDMQ",
"uatMeasurementID": "G-LFHH4C0HYZ",
"gtmContainerID": "GTM-T5283GW",
"search.contentTypes.publication_page": false,
"birtMediaListingUrl": "/find-right-tool-search",
"birtMediaListingLabel": "Search all tools",
"breadcrumbsCollapseInnerLinks": true,
"sectionNavToggleLevels": "3",
"det150.listingLabel": "Victorian Schools Directory",
"det150.listingUrl": "/historical-victorian-state-schools-directory",
"publicNotice.listingLabel": "Find a public notice",
"publicNotice.listingUrl": "/find-public-notice"
}
}
},
"meta": {
"url": "/testing-content-collection",
"langcode": "en",
"description": "...",
"additional": [
{
"tag": "meta",
"attributes": {
"name": "title",
"content": "Testing content collection | Victorian Government"
}
},
{
"tag": "link",
"attributes": {
"rel": "canonical",
"href": "http://localhost:3000/testing-content-collection"
}
},
{
"tag": "meta",
"attributes": { "property": "og:locale", "content": "en-AU" }
}
],
"keywords": "",
"image": null
},
"showContentRating": true,
"summary": "...",
"showHeroAcknowledgement": false,
"showInPageNav": false,
"showHeroImageCaption": false,
"showTopicTags": true,
"inPageNavHeadingLevel": "h2",
"background": "default",
"primaryCampaign": null,
"secondaryCampaign": null,
"headerComponents": [],
"bodyComponents": [
{
"uuid": "6ec9dac8-19e6-447a-8e8e-ab01ef287c4b",
"component": "TideLandingPageContentCollectionUI",
"id": "3938543",
"title": "Manual items 1",
"props": {
"showImage": true,
"displayType": "card",
"displayNumber": 6,
"searchQuery": {
"query": {
"bool": {
"filter": [
{ "terms": { "nid": ["27411", "41304", "49728"] } },
{ "term": { "field_node_site": 4 } }
]
}
},
"sort": [
{
"_script": {
"type": "number",
"script": {
"source": "params.order.get(doc['nid'].value.toString())",
"params": { "order": { "27411": 0, "41304": 1, "49728": 2 } }
},
"order": "asc"
}
}
]
},
"description": "<p>A selection of manual items - card with images</p>",
"link": null
}
},
{
"uuid": "a72d69f3-0604-4cbd-aa53-1a5614e146a5",
"component": "TideLandingPageContentCollectionUI",
"id": "3938544",
"title": "Manual items 2",
"props": {
"showImage": false,
"displayType": "carousel",
"displayNumber": 6,
"searchQuery": {
"query": {
"bool": {
"filter": [
{ "terms": { "nid": ["27411", "58849", "49728"] } },
{ "term": { "field_node_site": 4 } }
]
}
},
"sort": [
{
"_script": {
"type": "number",
"script": {
"source": "params.order.get(doc['nid'].value.toString())",
"params": { "order": { "27411": 0, "49728": 2, "58849": 1 } }
},
"order": "asc"
}
}
]
},
"description": "<p>A selection of manual items - carousel no images</p>",
"link": null
}
},
{
"uuid": "394a0517-fbc5-48bc-88f6-70d9f0372f4c",
"component": "TideLandingPageContentCollectionUI",
"id": "3938545",
"title": "Manual items 3",
"props": {
"showImage": false,
"displayType": "list",
"displayNumber": 6,
"searchQuery": {
"query": {
"bool": {
"filter": [
{ "terms": { "nid": ["27411", "41304", "58849"] } },
{ "term": { "field_node_site": 4 } }
]
}
},
"sort": [
{
"_script": {
"type": "number",
"script": {
"source": "params.order.get(doc['nid'].value.toString())",
"params": { "order": { "27411": 0, "41304": 1, "58849": 2 } }
},
"order": "asc"
}
}
]
},
"description": "<p>A selection of manual items - list</p>",
"link": null
}
},
{
"uuid": "e3739a5d-5633-4020-b87f-ae937f4fbac4",
"component": "TideLandingPageContentCollectionUI",
"id": "3938546",
"title": "Auto items 1",
"props": {
"showImage": true,
"displayType": "card",
"displayNumber": 2,
"searchQuery": {
"query": {
"bool": {
"filter": [
{ "terms": { "type": ["event"] } },
{ "term": { "field_node_site": 4 } }
]
}
},
"sort": [{ "created": "desc" }],
"from": 0,
"size": 2
},
"description": "<p>An automated group of item - all event cards with image</p>",
"link": null
}
},
{
"uuid": "107592aa-fe0e-442c-a082-eddc15286902",
"component": "TideLandingPageContentCollectionUI",
"id": "3938547",
"title": "Auto items 2",
"props": {
"showImage": true,
"displayType": "list",
"displayNumber": 3,
"searchQuery": {
"query": {
"bool": {
"filter": [
{ "terms": { "type": ["grant"] } },
{ "terms": { "field_content_category": [1340] } },
{ "term": { "field_node_site": 4 } }
]
}
},
"sort": [{ "created": "desc" }],
"from": 0,
"size": 3
},
"description": "<p>An automated group of item - grants list, content category: grant</p>",
"link": null
}
},
{
"uuid": "5a0c2747-5d2d-44c3-9397-dfd47a641fb4",
"component": "TideLandingPageContentCollectionUI",
"id": "3938548",
"title": "Auto items 3",
"props": {
"showImage": true,
"displayType": "carousel",
"displayNumber": 6,
"searchQuery": {
"query": {
"bool": {
"filter": [
{ "terms": { "type": ["landing_page"] } },
{ "terms": { "field_tags": [2699] } },
{ "term": { "field_node_site": 4 } }
]
}
},
"sort": [{ "created": "desc" }],
"from": 0,
"size": 6
},
"description": "<p>An automated group of item - landing pages carousel with image, tags: demo tag</p>",
"link": null
}
}
]
}
Loading
Loading