Skip to content

Commit

Permalink
Merge branch 'develop' into release/2.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dylankelly authored Feb 4, 2024
2 parents 6cf7953 + f7774ad commit 1e9d6e9
Show file tree
Hide file tree
Showing 23 changed files with 575 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="tide-extra-component-example">
<RplTag
v-if="item?.field_fv_recommendation_number"
:label="item.field_fv_recommendation_number[0]"
/>
<p v-if="item?.fv_recommendation_status">
{{ ` ${item.fv_recommendation_status[0]}` }}
</p>
</div>
</template>

<script setup lang="ts">
interface Props {
item: any
}
defineProps<Props>()
</script>

<style>
.tide-extra-component-example {
display: flex;
gap: var(--rpl-sp-2);
align-items: center;
padding: var(--rpl-sp-5);
}
</style>
4 changes: 2 additions & 2 deletions examples/nuxt-app/test/features/maps/vsba.feature
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ Feature: School buildings map
Scenario: Click on cluster should zoom in
Given the "/api/tide/elasticsearch/elasticsearch_index_develop_node/_search" network request is stubbed with fixture "/map-table/vsba/response-all" and status 200 as alias "searchReq"
And I visit the page "/map"
When I wait 2 seconds
When I click the map component at coordinates 571 412
When I wait 4 seconds
When I click the map component at coordinates 571 412
When I wait 8 seconds
Then the map matches the image snapshot "map-cluster-zoom"

@mockserver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Feature: Search listing - Filter
When I clear the search filters

And the search network request should be called with the "/search-listing/filters/request-clear-empty" fixture
Then the URL should reflect that the current page number is 1
Then the URL should reflect that the current page has been reset
Then the URL should reflect that the current search term is ""
Then the URL should reflect that the current active filters are as follows:
| id |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Feature: Searching listing - Pagination
When I click the search button
Given I wait 1 seconds
Then the search network request should be called with the "/search-listing/pagination/request-page-1-with-term" fixture
And the URL should reflect that the current page number is 1
And the URL should reflect that the current page has been reset
And the results counter should show 1 to 4 of 10 results
And the search listing results should have following items:
| title |
Expand Down
28 changes: 28 additions & 0 deletions examples/nuxt-app/test/features/search-listing/table.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,31 @@ Feature: Search listing table layout
And the search network request should be called with the "/search-listing/table/request" fixture
And the search listing layout should be "table"

Given a data table with type "search-listing-layout-table"
Then the table should not display extra content

@mockserver
Example: Table shows extra content using a custom component
Given the page endpoint for path "/search-listing-table-extra-components" returns fixture "/search-listing/table/page-extra-component" with status 200
And the search network request is stubbed with fixture "/search-listing/table/response" and status 200
When I visit the page "/search-listing-table-extra-components"
And the search network request should be called with the "/search-listing/table/request" fixture
And the search listing layout should be "table"

Given a data table with type "search-listing-layout-table"
And the table should have the caption "My Table"
And the table should have the footer "Some notes about the table"
When I toggle the tables extra content row
Then the tables extra content should contain the text "1 Implemented"

@mockserver
Example: Table shows extra structured content using object keys
Given the page endpoint for path "/search-listing-table-structured" returns fixture "/search-listing/table/page-extra-structured" with status 200
And the search network request is stubbed with fixture "/search-listing/table/response" and status 200
When I visit the page "/search-listing-table-structured"
And the search network request should be called with the "/search-listing/table/request" fixture
And the search listing layout should be "table"

Given a data table with type "search-listing-layout-table"
When I toggle the tables extra content row
Then the tables extra content should contain the text "Review and begin implementing the Common Risk Assessment Framework"
4 changes: 2 additions & 2 deletions examples/nuxt-app/test/features/site/theme.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ Feature: Site theme
And ripple buttons should have the "neutral" theme applied
And the hero banner should have the "neutral" theme applied
And the vic.gov.au logo should be displayed
And the footer vic.gov.au logo should be displayed

@mockserver
Scenario: Feature flags can disable vic logo
Given the site endpoint returns fixture "/site/disable-vic-logo" with status 200
And the page endpoint for path "/" returns fixture "/landingpage/image-banner" with status 200
Given I visit the page "/"
Then the vic.gov.au logo should not be displayed
And the footer vic.gov.au logo should not be displayed
And the cobrand logo should be displayed


Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"title": "Table with component extra data",
"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": "On 28 January 2023 the Victorian Government announced the implementation of the final recommendations of the Royal Commission into Family Violence. This marks our public commitment to implementing all 227 recommendations.",
"config": {
"searchListingConfig": {
"resultsPerPage": 40,
"customSort": [
{ "_score": "desc" },
{ "field_fv_recommendation_number": "asc" },
{ "_doc": "desc" }
]
},
"queryConfig": {
"multi_match": {
"query": "{{query}}",
"fields": [
"title^3",
"field_landing_page_summary^2",
"body",
"field_paragraph_body",
"summary_processed"
]
}
},
"results": {
"layout": {
"component": "TideSearchResultsTable",
"props": {
"offset": 0,
"showExtraContent": true,
"caption": "My Table",
"footer": "Some notes about the table",
"headingType": { "horizontal": true, "vertical": true },
"columns": [
{
"label": "Recommendation",
"objectKey": "field_fv_recommendation_number"
},
{ "label": "Title", "component": "TideSearchListingTableLink" },
{
"label": "Category",
"objectKey": "field_fv_recommendation_category_name"
},
{ "label": "Status", "objectKey": "fv_recommendation_status" }
],
"extraContent": {
"component": "TableExtraContentComponentExample"
}
}
}
},
"globalFilters": [
{ "terms": { "type": ["fv_recommendation"] } },
{ "terms": { "field_node_site": ["4"] } }
],
"userFilters": [
{
"id": "category",
"component": "TideSearchFilterDropdown",
"filter": {
"type": "terms",
"value": "field_fv_recommendation_category_name.keyword"
},
"aggregations": {
"field": "field_fv_recommendation_category_name.keyword",
"source": "elastic"
},
"props": {
"id": "category",
"label": "Category",
"placeholder": "Select a category",
"type": "RplFormDropdown",
"multiple": true
}
},
{
"id": "department",
"component": "TideSearchFilterDropdown",
"filter": {
"type": "terms",
"value": "field_fv_recommendation_dpt_name.keyword"
},
"aggregations": {
"field": "field_fv_recommendation_dpt_name.keyword",
"source": "elastic"
},
"props": {
"id": "department",
"label": "Deparment",
"placeholder": "Select a department",
"type": "RplFormDropdown",
"multiple": true
}
},
{
"id": "status",
"component": "TideSearchFilterDropdown",
"filter": {
"type": "terms",
"value": "fv_recommendation_status.keyword"
},
"aggregations": {
"field": "recommendation_status",
"source": "taxonomy"
},
"props": {
"id": "status",
"label": "Status",
"placeholder": "Select a status",
"type": "RplFormDropdown",
"multiple": true,
"options": [
{
"id": "1",
"label": "Implemented",
"value": "Implemented"
},
{
"id": "2",
"label": "Not Implemented",
"value": "Not Implemented"
}
]
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"title": "Table with structure extra data",
"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": "On 28 January 2023 the Victorian Government announced the implementation of the final recommendations of the Royal Commission into Family Violence. This marks our public commitment to implementing all 227 recommendations.",
"config": {
"searchListingConfig": {
"resultsPerPage": 40,
"customSort": [
{ "_score": "desc" },
{ "field_fv_recommendation_number": "asc" },
{ "_doc": "desc" }
]
},
"queryConfig": {
"multi_match": {
"query": "{{query}}",
"fields": [
"title^3",
"field_landing_page_summary^2",
"body",
"field_paragraph_body",
"summary_processed"
]
}
},
"results": {
"layout": {
"component": "TideSearchResultsTable",
"props": {
"showExtraContent": true,
"caption": "My Table",
"footer": "Some notes about the table",
"headingType": { "horizontal": true, "vertical": true },
"columns": [
{
"label": "Recommendation",
"objectKey": "field_fv_recommendation_number"
},
{ "label": "Title", "component": "TideSearchListingTableLink" },
{
"label": "Category",
"objectKey": "field_fv_recommendation_category_name"
},
{ "label": "Status", "objectKey": "fv_recommendation_status" }
],
"extraContent": {
"items": [
{
"label": "More info",
"objectKey": "title"
}
]
}
}
}
},
"globalFilters": [
{ "terms": { "type": ["fv_recommendation"] } },
{ "terms": { "field_node_site": ["4"] } }
],
"userFilters": [
{
"id": "category",
"component": "TideSearchFilterDropdown",
"filter": {
"type": "terms",
"value": "field_fv_recommendation_category_name.keyword"
},
"aggregations": {
"field": "field_fv_recommendation_category_name.keyword",
"source": "elastic"
},
"props": {
"id": "category",
"label": "Category",
"placeholder": "Select a category",
"type": "RplFormDropdown",
"multiple": true
}
},
{
"id": "department",
"component": "TideSearchFilterDropdown",
"filter": {
"type": "terms",
"value": "field_fv_recommendation_dpt_name.keyword"
},
"aggregations": {
"field": "field_fv_recommendation_dpt_name.keyword",
"source": "elastic"
},
"props": {
"id": "department",
"label": "Deparment",
"placeholder": "Select a department",
"type": "RplFormDropdown",
"multiple": true
}
},
{
"id": "status",
"component": "TideSearchFilterDropdown",
"filter": {
"type": "terms",
"value": "fv_recommendation_status.keyword"
},
"aggregations": {
"field": "recommendation_status",
"source": "taxonomy"
},
"props": {
"id": "status",
"label": "Status",
"placeholder": "Select a status",
"type": "RplFormDropdown",
"multiple": true,
"options": [
{
"id": "1",
"label": "Implemented",
"value": "Implemented"
},
{
"id": "2",
"label": "Not Implemented",
"value": "Not Implemented"
}
]
}
}
]
}
}
3 changes: 2 additions & 1 deletion examples/nuxt-app/test/fixtures/site/disable-vic-logo.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"altText": ""
},
"featureFlags": {
"disablePrimaryLogo": true
"disablePrimaryLogo": true,
"disableFooterLogo": true
},
"menus": {
"menuMain": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const getIconForUrl = (urlString: string) => {
case 'instagr.am':
return 'icon-instagram'
case 'linkedin.com':
case 'au.linkedin.com':
return 'icon-linkedin'
case 'twitter.com':
case 'x.com':
Expand Down
Loading

0 comments on commit 1e9d6e9

Please sign in to comment.