Skip to content

Commit

Permalink
Merge branch 'develop' into feature/R20-1197-datalayer-events
Browse files Browse the repository at this point in the history
  • Loading branch information
David Featherston committed Jul 28, 2023
2 parents 48daf19 + ec4d1a2 commit 905bcad
Show file tree
Hide file tree
Showing 83 changed files with 1,015 additions and 913 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defaults: &defaults
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
environment:
TERM: xterm
TZ: 'Australia/Melbourne'
TZ: "Australia/Melbourne"
NUXT_PUBLIC_API_URL: http://localhost:3001
auth:
username: $DOCKERHUB_USERNAME
Expand Down Expand Up @@ -269,7 +269,8 @@ jobs:
pnpm release:publish --yes
update-reference:
<<: *defaults
docker:
- image: cimg/node:18.17.0
steps:
- run:
name: Kick off new pipeline
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"vue-app",
"@dpc-sdp/ripple-tide-search",
"@dpc-sdp/ripple-tide-event",
"@dpc-sdp/ripple-tide-topic",
"@dpc-sdp/nuxt-ripple-preview",
"@dpc-sdp/nuxt-ripple",
"@dpc-sdp/ripple-tide-media",
Expand Down
1 change: 1 addition & 0 deletions examples/nuxt-app/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default defineNuxtConfig({
'@dpc-sdp/nuxt-ripple-analytics',
'@dpc-sdp/nuxt-ripple-preview',
'@dpc-sdp/ripple-tide-event',
'@dpc-sdp/ripple-tide-topic',
'@dpc-sdp/ripple-tide-landing-page',
'@dpc-sdp/ripple-tide-grant',
'@dpc-sdp/ripple-tide-publication',
Expand Down
1 change: 1 addition & 0 deletions examples/nuxt-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@dpc-sdp/nuxt-ripple-analytics": "workspace:*",
"@dpc-sdp/nuxt-ripple-preview": "workspace:*",
"@dpc-sdp/ripple-tide-event": "workspace:*",
"@dpc-sdp/ripple-tide-topic": "workspace:*",
"@dpc-sdp/ripple-tide-grant": "workspace:*",
"@dpc-sdp/ripple-tide-landing-page": "workspace:*",
"@dpc-sdp/ripple-tide-media": "workspace:*",
Expand Down
59 changes: 40 additions & 19 deletions examples/nuxt-app/test/features/search-listing/grants.feature
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Feature: Grants collection

As a site I can see a collection of links to other pages and interact with it find the one I want.
As a user I can search for grants and filter them by status

Background:
Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200
And the search autocomplete request is stubbed with "/search-listing/suggestions/none" fixture
And I am using a "macbook-16" device

@mockserver
Example: Grants
Example: Results formatting
Given the endpoint "/api/tide/page" with query "?path=/grants&site=8888" returns fixture "/search-listing/grants/page" with status 200
And the search network request is stubbed with fixture "/search-listing/grants/response" and status 200
And the current date is "Fri, 02 Feb 2050 03:04:05 GMT"
Expand All @@ -17,21 +17,42 @@ Feature: Grants collection
And the search listing layout should be "list"
And the search network request should be called with the "/search-listing/grants/request" fixture
And the grant search listing results should have following items:
| title | url | updated | content | audience | amount | status |
| THIS IS A TEST | /site-8888/tc-9b-grant-page-closed | Updated: 2023-05-09T15:00:46+10:00 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. | Business | $11,326 - $26,494 | Closed |
| TC-9a Grant Simple Test - Date Range | /site-8888/tc-9a-grant-simple-test-date-range | Updated: 2023-05-09T15:00:46+10:00 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. | Not-for-profit groups, government | $11,326 - $26,494 | Open, closing in 163 days |
| title | url | updated | content | audience | amount | status |
| THIS IS A TEST | /tc-9b-grant-page-closed | Updated: 9 May 2023 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. | Business | $11,326 - $26,494 | Closed |
| TC-9a Grant Simple Test - Date Range | /tc-9a-grant-simple-test-date-range | Updated: 9 May 2023 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. | Not-for-profit groups, government | $11,326 - $26,494 | Open, closing in 163 days |

When I toggle the search listing filters section
When I click the search listing dropdown field labelled "View those relevant to me"
# First item is hardcoded, the rest come from ES aggregation
Then the selected dropdown field should have the items:
| Hard coded |
| Business |
| Government |
| Individual |
| Not-for-profit groups |
When I click the search listing dropdown field labelled "Grant or program topic"
# These come from Tide page API response
Then the selected dropdown field should have the items:
| Arts |
| Business |
@mockserver
Example: Grant status filter - Open
Given the endpoint "/api/tide/page" with query "?path=/grants&site=8888" returns fixture "/search-listing/grants/page" with status 200
And the search network request is stubbed with fixture "/search-listing/grants/response" and status 200
And the current date is "Fri, 02 Feb 2050 03:04:05 GMT"
When I visit the page "/grants?status=open"
Then the search listing page should have 2 results
And the search network request should be called with the "/search-listing/grants/request-status-open" fixture

@mockserver
Example: Grant status filter - Closed
Given the endpoint "/api/tide/page" with query "?path=/grants&site=8888" returns fixture "/search-listing/grants/page" with status 200
And the search network request is stubbed with fixture "/search-listing/grants/response" and status 200
And the current date is "Fri, 02 Feb 2050 03:04:05 GMT"
When I visit the page "/grants?status=closed"
Then the search listing page should have 2 results
And the search network request should be called with the "/search-listing/grants/request-status-closed" fixture

@mockserver
Example: Grant status filter - Ongoing
Given the endpoint "/api/tide/page" with query "?path=/grants&site=8888" returns fixture "/search-listing/grants/page" with status 200
And the search network request is stubbed with fixture "/search-listing/grants/response" and status 200
And the current date is "Fri, 02 Feb 2050 03:04:05 GMT"
When I visit the page "/grants?status=ongoing"
Then the search listing page should have 2 results
And the search network request should be called with the "/search-listing/grants/request-status-ongoing" fixture

@mockserver
Example: Grant status filter - Opening soon
Given the endpoint "/api/tide/page" with query "?path=/grants&site=8888" returns fixture "/search-listing/grants/page" with status 200
And the search network request is stubbed with fixture "/search-listing/grants/response" and status 200
And the current date is "Fri, 02 Feb 2050 03:04:05 GMT"
When I visit the page "/grants?status=opening_soon"
Then the search listing page should have 2 results
And the search network request should be called with the "/search-listing/grants/request-status-opening-soon" fixture
4 changes: 2 additions & 2 deletions examples/nuxt-app/test/fixtures/landingpage/full-form.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"showTopicTags": true,
"inPageNavHeadingLevel": "h2",
"background": "default",
"heroHeader": {
"header": {
"title": "Testing forms",
"introText": "",
"summary": "",
"links": {
"title": "",
"items": [],
Expand Down
8 changes: 4 additions & 4 deletions examples/nuxt-app/test/fixtures/landingpage/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@
"showInPageNav": true,
"inPageNavHeadingLevel": "h3",
"background": "default",
"heroHeader": {
"header": {
"title": "Test landing page title",
"introText": "Test landing page title introduction text",
"summary": "Test landing page title introduction text",
"links": {
"title": "Want to know more about...",
"items": [
Expand Down Expand Up @@ -125,14 +125,14 @@
"height": 959
},
"backgroundImage": null,
"cornerTopImage": {
"cornerTop": {
"src": "https://develop.content.reference.sdp.vic.gov.au/sites/default/files/tide_demo_content/Parliament-of-Victoria.jpg",
"alt": "Demo: Parliament of Victoria",
"title": "Demo: Parliament of Victoria",
"width": 1650,
"height": 915
},
"cornerBottomImage": {
"cornerBottom": {
"src": "https://develop.content.reference.sdp.vic.gov.au/sites/default/files/tide_demo_content/VicFleet-Police-car-on-road.jpg",
"alt": "Demo: VicFleet - Police car on road",
"title": "Demo: VicFleet - Police car on road",
Expand Down
8 changes: 4 additions & 4 deletions examples/nuxt-app/test/fixtures/landingpage/image-banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@
"showTopicTags": true,
"inPageNavHeadingLevel": "h2",
"background": "default",
"heroHeader": {
"header": {
"title": "Demo Landing Page",
"introText": "Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae",
"summary": "Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae",
"links": {
"title": "Want to know more about...",
"items": [
Expand All @@ -122,15 +122,15 @@
"height": 650,
"drupal_internal__target_id": 44
},
"cornerTopImage": {
"cornerTop": {
"src": "https://develop.content.reference.sdp.vic.gov.au/sites/default/files/tide_demo_content/Parliament-of-Victoria.jpg",
"alt": "Demo: Parliament of Victoria",
"title": "Demo: Parliament of Victoria",
"width": 1650,
"height": 915,
"drupal_internal__target_id": 46
},
"cornerBottomImage": null,
"cornerBottom": null,
"primaryAction": {
"text": "Phasellus congue",
"url": "https://www.vic.gov.au"
Expand Down
121 changes: 95 additions & 26 deletions examples/nuxt-app/test/fixtures/search-listing/grants/page.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,54 @@
{
"title": "Grants and programs",
"changed": "2022-11-02T12:47:29+11:00",
"created": "2022-11-02T12:47:29+11:00",
"changed": "2023-07-25T01:21:48+00:00",
"created": "2023-07-25T01:21:23+00:00",
"type": "tide_search_listing",
"nid": "11dede11-10c0-111e1-1100-000000000330",
"showTopicTags": true,
"summary": "",
"nid": "a8438744-43b0-4777-b558-0c69f3ff1d21",
"sidebar": {},
"status": "published",
"topicTags": [
{
"url": ""
}
],
"siteSection": null,
"meta": {
"langcode": "en",
"description": "",
"additional": [
{
"tag": "meta",
"attributes": {
"name": "title",
"content": "Grants and programs | Victorian Government"
}
},
{
"tag": "link",
"attributes": {
"rel": "canonical",
"href": "https://nginx-php.pr-1554.content-vic.sdp4.sdp.vic.gov.au/grants"
}
}
],
"keywords": "",
"image": null
},
"showContentRating": true,
"summary": null,
"searchListingConfig": {
"resultsPerPage": 10
"resultsPerPage": 10,
"labels": {
"submit": "Search all grants and programs",
"placeholder": "Search all grants and programs"
},
"customSort": [
{
"title.keyword": "asc"
}
]
},
"index": "a83890f7a31dea14e1ae83c6f0afacca-appsearch-index-default-node",
"queryConfig": {
"multi_match": {
"query": "{{query}}",
Expand All @@ -21,6 +61,18 @@
]
}
},
"globalFilters": [
{
"terms": {
"type": ["grant"]
}
},
{
"terms": {
"field_node_site": [4]
}
}
],
"results": {
"layout": {
"component": "TideSearchResultsList"
Expand All @@ -31,33 +83,44 @@
}
}
},
"globalFilters": [
{ "terms": { "type": ["grant"] } },
{ "terms": { "field_node_site": [8888] } }
],
"userFilters": [
{
"id": "audience",
"component": "TideSearchFilterDropdown",
"filter": {
"type": "terms",
"value": "field_audience_name.keyword"
"value": "field_audience_name"
},
"aggregations": {
"field": "field_audience_name.keyword",
"source": "elastic"
"field": "audience",
"source": "taxonomy"
},
"props": {
"id": "audience",
"label": "View those relevant to me",
"label": "View those relevant to",
"placeholder": "Individuals and organisation types",
"type": "RplFormDropdown",
"multiple": true,
"options": [
{
"id": "1",
"label": "Hard coded",
"value": "Hard coded"
"id": 8918,
"label": "Individual",
"value": "Individual"
},
{
"id": 8920,
"label": "Government",
"value": "Government"
},
{
"id": 8921,
"label": "Not-for-profit groups",
"value": "Not-for-profit groups"
},
{
"id": 8919,
"label": "Business",
"value": "Business"
}
]
}
Expand All @@ -76,19 +139,24 @@
"props": {
"id": "topic",
"label": "Grant or program topic",
"placeholder": "Grant topic",
"placeholder": "Please select",
"type": "RplFormDropdown",
"multiple": true,
"options": [
{
"id": "1",
"label": "Arts",
"value": "Arts"
"id": 1,
"label": "Arts, culture & heritage",
"value": "Arts, culture & heritage"
},
{
"id": "2",
"label": "Business",
"value": "Business"
"id": 2,
"label": "Business & the workplace",
"value": "Business & the workplace"
},
{
"id": 3,
"label": "Communities",
"value": "Communities"
}
]
}
Expand All @@ -102,7 +170,7 @@
},
"props": {
"id": "status",
"label": "Status",
"label": "Grant or program topic",
"placeholder": "Select for opened, closed or upcoming grants",
"type": "RplFormDropdown",
"multiple": true,
Expand Down Expand Up @@ -130,5 +198,6 @@
]
}
}
]
],
"_fetched": 1690260404545
}
Loading

0 comments on commit 905bcad

Please sign in to comment.