diff --git a/.github/workflows/components.yml b/.github/workflows/components.yml index 6567dac0b2..f76ef9145a 100644 --- a/.github/workflows/components.yml +++ b/.github/workflows/components.yml @@ -2,6 +2,7 @@ name: UI Libraries on: push: paths: + - '.github/workflows/components.yml' - 'packages/ripple-storybook/**' - 'packages/ripple-ui-core/**' - 'packages/ripple-ui-forms/**' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index bf8b123eae..44066a7ec1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,6 +2,7 @@ name: Docs on: push: paths: + - '.github/workflows/docs.yml' - 'docs' - 'packages/ripple-ui-core/**' - 'packages/ripple-ui-forms/**' diff --git a/.github/workflows/nuxt.yml b/.github/workflows/nuxt.yml index e887458cdc..76ed3b5160 100644 --- a/.github/workflows/nuxt.yml +++ b/.github/workflows/nuxt.yml @@ -2,6 +2,7 @@ name: Nuxt on: push: paths: + - '.github/workflows/nuxt.yml' - 'examples/nuxt-app/**' - 'packages/**' - 'pnpm-lock.yaml' @@ -61,10 +62,9 @@ jobs: env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} TZ: 'Australia/Melbourne' - NUXT_PUBLIC_TIDE_BASE_URL: 'https://develop.content.reference.sdp.vic.gov.au/' - NUXT_PUBLIC_TIDE_SITE: '8888' + NUXT_PUBLIC_TIDE_BASE_URL: 'https://test.base.url/' + NUXT_PUBLIC_TIDE_SITE: 'TEST_SITE' NUXT_PUBLIC_API_URL: 'http://localhost:3001' - NUXT_PUBLIC_TIDE_APP_SEARCH_ENGINE_NAME: a83890f7a31dea14e1ae83c6f0afacca-appsearch-index-default-node API_PORT: '3001' LOG_LEVEL: 'debug' # DEBUG: '@cypress/github-action' @@ -74,4 +74,4 @@ jobs: install: false build: pnpm build start: pnpm start - wait-on: 'http://localhost:3000/api/tide/site?id=8888' + wait-on: 'http://localhost:3000/assets/fonts/VIC-Regular.woff2' diff --git a/.github/workflows/vue.yml b/.github/workflows/vue.yml index c6a2bb5cf7..4087db6351 100644 --- a/.github/workflows/vue.yml +++ b/.github/workflows/vue.yml @@ -2,6 +2,7 @@ name: Vue on: push: paths: + - '.github/workflows/vue.yml' - 'examples/vue-app/**' - 'packages/ripple-ui-core/**' - 'packages/ripple-ui-forms/**' diff --git a/.github/workflows/webcomponents.yml b/.github/workflows/webcomponents.yml index 8f66dc8ab5..0f6400b7a2 100644 --- a/.github/workflows/webcomponents.yml +++ b/.github/workflows/webcomponents.yml @@ -2,6 +2,7 @@ name: Webcomponents on: push: paths: + - '.github/workflows/webcomponents.yml' - 'examples/webcomponents/**' - 'packages/ripple-ui-core/**' - 'packages/ripple-ui-forms/**' diff --git a/examples/nuxt-app/cypress.config.mjs b/examples/nuxt-app/cypress.config.mjs index 6ed8768c89..5329014d44 100644 --- a/examples/nuxt-app/cypress.config.mjs +++ b/examples/nuxt-app/cypress.config.mjs @@ -5,7 +5,8 @@ import * as rplCypressConfigPkg from '@dpc-sdp/ripple-test-utils' export default defineConfig({ projectId: 'mie4kg', env: { - searchIndex: process.env.NUXT_PUBLIC_TIDE_APP_SEARCH_ENGINE_NAME + searchIndex: process.env.NUXT_PUBLIC_TIDE_APP_SEARCH_ENGINE_NAME, + NUXT_PUBLIC_TIDE_SITE: process.env.NUXT_PUBLIC_TIDE_SITE, }, e2e: { baseUrl: 'http://localhost:3000', diff --git a/examples/nuxt-app/test/features/errors/errors.feature b/examples/nuxt-app/test/features/errors/errors.feature index e7bd62482a..00d5872033 100644 --- a/examples/nuxt-app/test/features/errors/errors.feature +++ b/examples/nuxt-app/test/features/errors/errors.feature @@ -3,18 +3,18 @@ Feature: Error pages As a site user I can see relevant error pages displayed. Background: - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the site endpoint returns fixture "/site/reference" with status 200 @mockserver Example: 500 - Given the endpoint "/api/tide/page" with query "?path=/500&site=8888" returns fixture "/errors/500" with status 500 + Given the page endpoint for path "/500" returns fixture "/errors/500" with status 500 When I visit the page "/500" Then the error page "/500" has a status of 500 And the error content contains the status 500 @mockserver Example: 404 - Given the endpoint "/api/tide/page" with query "?path=/404&site=8888" returns fixture "/errors/404" with status 404 + Given the page endpoint for path "/404" returns fixture "/errors/404" with status 404 When I visit the page "/404" Then the error page "/404" has a status of 404 And the error content contains the status 404 diff --git a/examples/nuxt-app/test/features/event/event.feature b/examples/nuxt-app/test/features/event/event.feature index 8ecca23cf0..4c611900fb 100644 --- a/examples/nuxt-app/test/features/event/event.feature +++ b/examples/nuxt-app/test/features/event/event.feature @@ -3,8 +3,8 @@ Feature: Event page Example of mocked page Background: - Given the endpoint "/api/tide/page" with query "?path=/sample-event&site=8888" returns fixture "/event/sample-event" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the page endpoint for path "/sample-event" returns fixture "/event/sample-event" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 When I visit the page "/sample-event" @mockserver diff --git a/examples/nuxt-app/test/features/grant/grant.feature b/examples/nuxt-app/test/features/grant/grant.feature index 53c5498ffe..d9e01edbdc 100644 --- a/examples/nuxt-app/test/features/grant/grant.feature +++ b/examples/nuxt-app/test/features/grant/grant.feature @@ -3,8 +3,8 @@ Feature: Grant page Example of mocked page Background: - Given the endpoint "/api/tide/page" with query "?path=/tc-9a-grant-simple-test-date-range&site=8888" returns fixture "/grant/tc-9a-grant-simple-test-date-range" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the page endpoint for path "/tc-9a-grant-simple-test-date-range" returns fixture "/grant/tc-9a-grant-simple-test-date-range" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 When I visit the page "/tc-9a-grant-simple-test-date-range" @mockserver diff --git a/examples/nuxt-app/test/features/landingpage/forms.feature b/examples/nuxt-app/test/features/landingpage/forms.feature index e6ac8b648f..b6b97bcae1 100644 --- a/examples/nuxt-app/test/features/landingpage/forms.feature +++ b/examples/nuxt-app/test/features/landingpage/forms.feature @@ -5,8 +5,8 @@ Feature: Forms @mockserver Scenario: Kitchen sink Given the mock server has started - And the endpoint "/api/tide/page" with query "?path=/kitchen-sink&site=8888" returns fixture "/landingpage/full-form" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + And the page endpoint for path "/kitchen-sink" returns fixture "/landingpage/full-form" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 Given I visit the page "/kitchen-sink" Then the landing page component "TideLandingPageWebForm" should exist And the form with ID "full_form" should exist @@ -42,8 +42,8 @@ Feature: Forms @mockserver Scenario: Error summary Given the mock server has started - And the endpoint "/api/tide/page" with query "?path=/kitchen-sink&site=8888" returns fixture "/landingpage/full-form" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + And the page endpoint for path "/kitchen-sink" returns fixture "/landingpage/full-form" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 Given I visit the page "/kitchen-sink" Then the landing page component "TideLandingPageWebForm" should exist And the form with ID "full_form" should exist @@ -61,8 +61,8 @@ Feature: Forms @mockserver Scenario: Simple validation Given the mock server has started - And the endpoint "/api/tide/page" with query "?path=/kitchen-sink&site=8888" returns fixture "/landingpage/full-form" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + And the page endpoint for path "/kitchen-sink" returns fixture "/landingpage/full-form" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 Given I visit the page "/kitchen-sink" Then the landing page component "TideLandingPageWebForm" should exist And the form with ID "full_form" should exist @@ -79,9 +79,9 @@ Feature: Forms @mockserver Scenario: Form submission - Error Given the mock server has started - And the endpoint "/api/tide/page" with query "?path=/kitchen-sink&site=8888" returns fixture "/landingpage/full-form" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 - And posting to endpoint "/api/tide/webform_submission/full_form" with query "?id=8888" returns fixture "/landingpage/full-form-error-response" with status 500 + And the page endpoint for path "/kitchen-sink" returns fixture "/landingpage/full-form" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 + And posting form to endpoint "/api/tide/webform_submission/full_form" returns fixture "/landingpage/full-form-error-response" with status 500 Given I visit the page "/kitchen-sink" Then the landing page component "TideLandingPageWebForm" should exist And the form with ID "full_form" should exist @@ -100,9 +100,9 @@ Feature: Forms @mockserver Scenario: Form submission - Success Given the mock server has started - And the endpoint "/api/tide/page" with query "?path=/kitchen-sink&site=8888" returns fixture "/landingpage/full-form" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 - And posting to endpoint "/api/tide/webform_submission/full_form" with query "?site=8888" returns fixture "/landingpage/full-form-success-response" with status 201 + And the page endpoint for path "/kitchen-sink" returns fixture "/landingpage/full-form" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 + And posting form to endpoint "/api/tide/webform_submission/full_form" returns fixture "/landingpage/full-form-success-response" with status 201 Given I visit the page "/kitchen-sink" Then the landing page component "TideLandingPageWebForm" should exist And the form with ID "full_form" should exist @@ -128,8 +128,8 @@ Feature: Forms @mockserver Scenario: Field counter Given the mock server has started - And the endpoint "/api/tide/page" with query "?path=/kitchen-sink&site=8888" returns fixture "/landingpage/full-form" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + And the page endpoint for path "/kitchen-sink" returns fixture "/landingpage/full-form" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 Given I visit the page "/kitchen-sink" Then the landing page component "TideLandingPageWebForm" should exist And the form with ID "full_form" should exist diff --git a/examples/nuxt-app/test/features/landingpage/home.feature b/examples/nuxt-app/test/features/landingpage/home.feature index 5550805fad..6bc630fb35 100644 --- a/examples/nuxt-app/test/features/landingpage/home.feature +++ b/examples/nuxt-app/test/features/landingpage/home.feature @@ -2,13 +2,13 @@ Feature: Home page Example of mocked page Background: - Given the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/home" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the page endpoint for path "/" returns fixture "/landingpage/home" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 Given I visit the page "/" @mockserver Scenario: On 404 - Given the endpoint "/api/tide/page" with query "?path=/404&site=8888" returns fixture "/errors/404" with status 404 + Given the page endpoint for path "/404" returns fixture "/errors/404" with status 404 Given I visit the page "/404" @mockserver @@ -62,7 +62,7 @@ Feature: Home page @mockserver Scenario: Header component - Search banner - Given the endpoint "/api/tide/page" with query "?path=/search/cats&site=8888" returns fixture "/landingpage/home" with status 200 + Given the page endpoint for path "/search/cats" returns fixture "/landingpage/home" with status 200 Then a search banner with ID "1911" should exist with the placeholder "Test search placeholder" Then in a search banner with ID "1911", searching for "cats" should take me to "/search/cats" diff --git a/examples/nuxt-app/test/features/landingpage/languages.feature b/examples/nuxt-app/test/features/landingpage/languages.feature index 08b07c7e21..93129e1feb 100644 --- a/examples/nuxt-app/test/features/landingpage/languages.feature +++ b/examples/nuxt-app/test/features/landingpage/languages.feature @@ -1,18 +1,18 @@ Feature: Languages Background: - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the site endpoint returns fixture "/site/reference" with status 200 @mockserver Scenario: RTL languages load with the correct font and direction - Given the endpoint "/api/tide/page" with query "?path=/arabic-page&site=8888" returns fixture "/landingpage/languages-ar" with status 200 + Given the page endpoint for path "/arabic-page" returns fixture "/landingpage/languages-ar" with status 200 When I visit the page "/arabic-page" Then The section ".rpl-header" should be display "rtl" in "ar" with the font "Noto Kufi Arabic" And The section "#rpl-main" should be display "rtl" in "ar" with the font "Noto Kufi Arabic" @mockserver Scenario: LTR languages load with the correct font and direction - Given the endpoint "/api/tide/page" with query "?path=/korean-page&site=8888" returns fixture "/landingpage/languages-ko" with status 200 + Given the page endpoint for path "/korean-page" returns fixture "/landingpage/languages-ko" with status 200 When I visit the page "/korean-page" Then The section ".rpl-header" should be display "ltr" in "ko" with the font "Noto Sans KR" And The section "#rpl-main" should be display "ltr" in "ko" with the font "Noto Sans KR" diff --git a/examples/nuxt-app/test/features/media/media.feature b/examples/nuxt-app/test/features/media/media.feature index ec779843e8..3cbf0647f6 100644 --- a/examples/nuxt-app/test/features/media/media.feature +++ b/examples/nuxt-app/test/features/media/media.feature @@ -4,8 +4,8 @@ Feature: Media page @mockserver Example: Video - Given the endpoint "/api/tide/page" with query "?path=/media/36&site=8888" returns fixture "/media/36" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the page endpoint for path "/media/36" returns fixture "/media/36" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 When I visit the page "/media/36" Then the title should be "Demo: Embedded Video" And the media page should display content which includes "Video transcript content" @@ -14,8 +14,8 @@ Feature: Media page @mockserver Example: Audio - Given the endpoint "/api/tide/page" with query "?path=/media/271&site=8888" returns fixture "/media/271" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the page endpoint for path "/media/271" returns fixture "/media/271" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 When I visit the page "/media/271" Then the title should be "Demo: Audio" And the media page should display content which includes "Audio transcript content" diff --git a/examples/nuxt-app/test/features/news/news.feature b/examples/nuxt-app/test/features/news/news.feature index fcda1ce7c3..695daaa3e1 100644 --- a/examples/nuxt-app/test/features/news/news.feature +++ b/examples/nuxt-app/test/features/news/news.feature @@ -1,8 +1,8 @@ Feature: News page Background: - Given the endpoint "/api/tide/page" with query "?path=/sample-news&site=8888" returns fixture "/news/sample-news" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the page endpoint for path "/sample-news" returns fixture "/news/sample-news" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 When I visit the page "/sample-news" @mockserver diff --git a/examples/nuxt-app/test/features/publication-page/publication-page.feature b/examples/nuxt-app/test/features/publication-page/publication-page.feature index 53c8ab10f6..ee148defc4 100644 --- a/examples/nuxt-app/test/features/publication-page/publication-page.feature +++ b/examples/nuxt-app/test/features/publication-page/publication-page.feature @@ -3,9 +3,9 @@ Feature: Publication page page Example of mocked page Background: - Given the endpoint "/api/tide/page" with query "?path=/demo-publication/demo-publication-chapter-1&site=8888" returns fixture "/publication-page/sample-publication-page" with status 200 + Given the page endpoint for path "/demo-publication/demo-publication-chapter-1" returns fixture "/publication-page/sample-publication-page" with status 200 And the endpoint "/api/tide/publication-index" with query "?id=11dede11-10c0-111e1-1100-000000000500" returns fixture "/publication/sample-index" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 @mockserver Example: On load diff --git a/examples/nuxt-app/test/features/publication/publication.feature b/examples/nuxt-app/test/features/publication/publication.feature index 671941995e..87ca4f0dc4 100644 --- a/examples/nuxt-app/test/features/publication/publication.feature +++ b/examples/nuxt-app/test/features/publication/publication.feature @@ -3,9 +3,9 @@ Feature: Publication page Example of mocked page Background: - Given the endpoint "/api/tide/page" with query "?path=/sample-publication&site=8888" returns fixture "/publication/sample-publication" with status 200 + Given the page endpoint for path "/sample-publication" returns fixture "/publication/sample-publication" with status 200 And the endpoint "/api/tide/publication-index" with query "?id=11dede11-10c0-111e1-1100-000000000500" returns fixture "/publication/sample-index" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 @mockserver Example: On load diff --git a/examples/nuxt-app/test/features/search-listing/aggregations.feature b/examples/nuxt-app/test/features/search-listing/aggregations.feature index 1b32774a0b..c0f03998ca 100644 --- a/examples/nuxt-app/test/features/search-listing/aggregations.feature +++ b/examples/nuxt-app/test/features/search-listing/aggregations.feature @@ -3,13 +3,13 @@ Feature: Search listing - Aggregations As a user I can see lists of values filter values, sourced from either drupal Taxonomies or Elastic Aggregations Background: - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the site endpoint 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: Aggregations and Taxonomies - Given the endpoint "/api/tide/page" with query "?path=/aggregations&site=8888" returns fixture "/search-listing/aggregations/page" with status 200 + Given the page endpoint for path "/aggregations" returns fixture "/search-listing/aggregations/page" with status 200 And the search network request is stubbed with fixture "/search-listing/aggregations/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" diff --git a/examples/nuxt-app/test/features/search-listing/errors.feature b/examples/nuxt-app/test/features/search-listing/errors.feature index 692e560af0..0da2a57a8a 100644 --- a/examples/nuxt-app/test/features/search-listing/errors.feature +++ b/examples/nuxt-app/test/features/search-listing/errors.feature @@ -3,13 +3,13 @@ Feature: Searching listing - Errors As a user I get notified of problems on the search listing page Background: - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the site endpoint 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: No results message - Given the endpoint "/api/tide/page" with query "?path=/errors&site=8888" returns fixture "/search-listing/errors/page" with status 200 + Given the page endpoint for path "/errors" returns fixture "/search-listing/errors/page" with status 200 And the search network request is stubbed with fixture "/search-listing/errors/response-empty" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" When I visit the page "/errors" @@ -32,7 +32,7 @@ Feature: Searching listing - Errors @mockserver Example: Search error - Given the endpoint "/api/tide/page" with query "?path=/errors&site=8888" returns fixture "/search-listing/errors/page" with status 200 + Given the page endpoint for path "/errors" returns fixture "/search-listing/errors/page" with status 200 And the search network request is stubbed with fixture "/search-listing/errors/response-error" and status 403 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" When I visit the page "/errors" diff --git a/examples/nuxt-app/test/features/search-listing/filters.feature b/examples/nuxt-app/test/features/search-listing/filters.feature index 989bb10069..f81b0a7ef0 100644 --- a/examples/nuxt-app/test/features/search-listing/filters.feature +++ b/examples/nuxt-app/test/features/search-listing/filters.feature @@ -3,13 +3,13 @@ Feature: Search listing - Filter As a user I can apply filters to my search Background: - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the site endpoint 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: Raw filter - Should reflect the value from the URL - Given the endpoint "/api/tide/page" with query "?path=/filters&site=8888" returns fixture "/search-listing/filters/page" with status 200 + Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200 And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" @@ -25,7 +25,7 @@ Feature: Search listing - Filter @mockserver Example: Term filter - Should reflect a single value from the URL - Given the endpoint "/api/tide/page" with query "?path=/filters&site=8888" returns fixture "/search-listing/filters/page" with status 200 + Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200 And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" @@ -40,7 +40,7 @@ Feature: Search listing - Filter @mockserver Example: Term filter - Should reflect an array from the URL - Given the endpoint "/api/tide/page" with query "?path=/filters&site=8888" returns fixture "/search-listing/filters/page" with status 200 + Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200 And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" @@ -55,7 +55,7 @@ Feature: Search listing - Filter @mockserver Example: Terms (with an 's') - Should reflect a single value from the URL - Given the endpoint "/api/tide/page" with query "?path=/filters&site=8888" returns fixture "/search-listing/filters/page" with status 200 + Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200 And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" @@ -70,7 +70,7 @@ Feature: Search listing - Filter @mockserver Example: Terms (with an 's') - Should reflect an array from the URL - Given the endpoint "/api/tide/page" with query "?path=/filters&site=8888" returns fixture "/search-listing/filters/page" with status 200 + Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200 And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" @@ -85,7 +85,7 @@ Feature: Search listing - Filter @mockserver Example: Custom function filters - Should reflect an array from the URL - Given the endpoint "/api/tide/page" with query "?path=/filters&site=8888" returns fixture "/search-listing/filters/page" with status 200 + Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200 And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" @@ -100,7 +100,7 @@ Feature: Search listing - Filter @mockserver Example: Clear filters - Given the endpoint "/api/tide/page" with query "?path=/filters&site=8888" returns fixture "/search-listing/filters/page" with status 200 + Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200 And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" @@ -146,7 +146,7 @@ Feature: Search listing - Filter @mockserver Example: Should update the URL when the filters are applied - Given the endpoint "/api/tide/page" with query "?path=/filters&site=8888" returns fixture "/search-listing/filters/page" with status 200 + Given the page endpoint for path "/filters" returns fixture "/search-listing/filters/page" with status 200 And the search network request is stubbed with fixture "/search-listing/filters/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" diff --git a/examples/nuxt-app/test/features/search-listing/grants.feature b/examples/nuxt-app/test/features/search-listing/grants.feature index e9e6f8a500..cae7c202d1 100644 --- a/examples/nuxt-app/test/features/search-listing/grants.feature +++ b/examples/nuxt-app/test/features/search-listing/grants.feature @@ -3,13 +3,13 @@ Feature: Grants collection 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 + Given the site endpoint 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: Results formatting - Given the endpoint "/api/tide/page" with query "?path=/grants&site=8888" returns fixture "/search-listing/grants/page" with status 200 + Given the page endpoint for path "/grants" 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" @@ -23,7 +23,7 @@ Feature: Grants collection @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 + Given the page endpoint for path "/grants" 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" @@ -32,7 +32,7 @@ Feature: Grants collection @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 + Given the page endpoint for path "/grants" 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" @@ -41,7 +41,7 @@ Feature: Grants collection @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 + Given the page endpoint for path "/grants" 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" @@ -50,7 +50,7 @@ Feature: Grants collection @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 + Given the page endpoint for path "/grants" 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" diff --git a/examples/nuxt-app/test/features/search-listing/grid-list.feature b/examples/nuxt-app/test/features/search-listing/grid-list.feature index 45cc7dc1a2..7e66759d28 100644 --- a/examples/nuxt-app/test/features/search-listing/grid-list.feature +++ b/examples/nuxt-app/test/features/search-listing/grid-list.feature @@ -3,13 +3,13 @@ Feature: Grid collection As a site I can see a collection of links to other pages in a grid and interact with it to find the one I want. Background: - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the site endpoint 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: Emergency resource portal - Given the endpoint "/api/tide/page" with query "?path=/search-list-grid&site=8888" returns fixture "/search-listing/grid/page" with status 200 + Given the page endpoint for path "/search-list-grid" returns fixture "/search-listing/grid/page" with status 200 And the search network request is stubbed with fixture "/search-listing/grid/response" and status 200 When I visit the page "/search-list-grid" Then the search listing page should have 9 results diff --git a/examples/nuxt-app/test/features/search-listing/pagination.feature b/examples/nuxt-app/test/features/search-listing/pagination.feature index fcfa7b4705..d9d8495e1d 100644 --- a/examples/nuxt-app/test/features/search-listing/pagination.feature +++ b/examples/nuxt-app/test/features/search-listing/pagination.feature @@ -3,13 +3,13 @@ Feature: Searching listing - Pagination As a user I can navigate through pages of results using pagination controls Background: - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the site endpoint 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: Pagination controls - Given the endpoint "/api/tide/page" with query "?path=/pagination&site=8888" returns fixture "/search-listing/pagination/page" with status 200 + Given the page endpoint for path "/pagination" returns fixture "/search-listing/pagination/page" with status 200 And the search network request is stubbed with fixture "/search-listing/pagination/response-page-1" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" When I visit the page "/pagination" @@ -63,7 +63,7 @@ Feature: Searching listing - Pagination @mockserver Example: Searching resets to page 1 - Given the endpoint "/api/tide/page" with query "?path=/pagination&site=8888" returns fixture "/search-listing/pagination/page" with status 200 + Given the page endpoint for path "/pagination" returns fixture "/search-listing/pagination/page" with status 200 And the search network request is stubbed with fixture "/search-listing/pagination/response-page-1" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" When I visit the page "/pagination" @@ -94,7 +94,7 @@ Feature: Searching listing - Pagination @mockserver Example: Reads initial page from URL - Given the endpoint "/api/tide/page" with query "?path=/pagination&site=8888" returns fixture "/search-listing/pagination/page" with status 200 + Given the page endpoint for path "/pagination" returns fixture "/search-listing/pagination/page" with status 200 And the search network request is stubbed with fixture "/search-listing/pagination/response-page-3" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" When I visit the page "/pagination?page=3" diff --git a/examples/nuxt-app/test/features/search-listing/sort.feature b/examples/nuxt-app/test/features/search-listing/sort.feature index 564d180650..8bea36d5d0 100644 --- a/examples/nuxt-app/test/features/search-listing/sort.feature +++ b/examples/nuxt-app/test/features/search-listing/sort.feature @@ -3,13 +3,13 @@ Feature: Search listing - Filter As a user I can see search results sorted in a useful way Background: - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the site endpoint 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: Custom sort from config - Given the endpoint "/api/tide/page" with query "?path=/sort&site=8888" returns fixture "/search-listing/sort/page" with status 200 + Given the page endpoint for path "/sort" returns fixture "/search-listing/sort/page" with status 200 And the search network request is stubbed with fixture "/search-listing/sort/response" and status 200 And the current date is "Fri, 02 Feb 2050 03:04:05 GMT" diff --git a/examples/nuxt-app/test/features/search-listing/table.feature b/examples/nuxt-app/test/features/search-listing/table.feature index f13d7401a1..a16474199a 100644 --- a/examples/nuxt-app/test/features/search-listing/table.feature +++ b/examples/nuxt-app/test/features/search-listing/table.feature @@ -3,13 +3,13 @@ Feature: Search listing table layout I can see a collection of results displayed in a tabular form Background: - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the site endpoint returns fixture "/site/reference" with status 200 And I am using a "macbook-16" device And the search autocomplete request is stubbed with "/search-listing/suggestions/none" fixture @mockserver Example: Grants - Given the endpoint "/api/tide/page" with query "?path=/search-listing-table&site=8888" returns fixture "/search-listing/table/page" with status 200 + Given the page endpoint for path "/search-listing-table" returns fixture "/search-listing/table/page" 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" And the search network request should be called with the "/search-listing/table/request" fixture diff --git a/examples/nuxt-app/test/features/site/alerts.feature b/examples/nuxt-app/test/features/site/alerts.feature index f83503dc0d..1f6f60c963 100644 --- a/examples/nuxt-app/test/features/site/alerts.feature +++ b/examples/nuxt-app/test/features/site/alerts.feature @@ -4,8 +4,8 @@ Feature: Site alerts @mockserver Scenario: Alert display - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/alerts" with status 200 - And the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/alerts" with status 200 + And the page endpoint for path "/" returns fixture "/landingpage/home" with status 200 Given I visit the page "/" Then the following alerts should be displayed in this order | title | icon | variant | linkText | linkUrl | @@ -29,8 +29,8 @@ Feature: Site alerts | ALERT_8 | | ALERT_9 | - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/alerts" with status 200 - And the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/alerts" with status 200 + And the page endpoint for path "/" returns fixture "/landingpage/home" with status 200 Given I visit the page "/" Then the following alerts should be displayed in this order @@ -44,8 +44,8 @@ Feature: Site alerts @mockserver Scenario: User dismisses alert - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/alerts" with status 200 - And the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/alerts" with status 200 + And the page endpoint for path "/" returns fixture "/landingpage/home" with status 200 Given I visit the page "/" When the user dismisses the alert with ID "ALERT_2" @@ -79,8 +79,8 @@ Feature: Site alerts | ALERT_8 | | ALERT_9 | - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/alerts" with status 200 - And the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/alerts" with status 200 + And the page endpoint for path "/" returns fixture "/landingpage/home" with status 200 Given I visit the page "/" When the user dismisses the alert with ID "ALERT_6" @@ -104,8 +104,8 @@ Feature: Site alerts @mockserver Scenario: More details link - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/alerts" with status 200 - And the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/alerts" with status 200 + And the page endpoint for path "/" returns fixture "/landingpage/home" with status 200 Given I visit the page "/" Then clicking the more details link for the alert with ID "ALERT_2" should take me to "/demo-link" diff --git a/examples/nuxt-app/test/features/site/shared-elements.feature b/examples/nuxt-app/test/features/site/shared-elements.feature index ed3509cb1a..aafe8e5f1a 100644 --- a/examples/nuxt-app/test/features/site/shared-elements.feature +++ b/examples/nuxt-app/test/features/site/shared-elements.feature @@ -4,8 +4,8 @@ Feature: Shared site elements @mockserver Scenario: Breadcrumbs (page exists in menu) - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/shared-elements" with status 200 - And the endpoint "/api/tide/page" with query "?path=/level-3-item-2&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/shared-elements" with status 200 + And the page endpoint for path "/level-3-item-2" returns fixture "/landingpage/home" with status 200 Given I visit the page "/level-3-item-2" Then the breadcrumbs should have the following items | text | url | @@ -16,8 +16,8 @@ Feature: Shared site elements @mockserver Scenario: Breadcrumbs (page does not exists in menu) - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/shared-elements" with status 200 - And the endpoint "/api/tide/page" with query "?path=/some-random-page&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/shared-elements" with status 200 + And the page endpoint for path "/some-random-page" returns fixture "/landingpage/home" with status 200 Given I visit the page "/some-random-page" Then the breadcrumbs should have the following items | text | url | @@ -27,23 +27,23 @@ Feature: Shared site elements @mockserver Scenario: Breadcrumbs (root page) - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/shared-elements" with status 200 - And the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/shared-elements" with status 200 + And the page endpoint for path "/" returns fixture "/landingpage/home" with status 200 Given I visit the page "/" Then the breadcrumbs should not exist @mockserver Scenario: Last updated date - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/shared-elements" with status 200 - And the endpoint "/api/tide/page" with query "?path=/some-random-page&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/shared-elements" with status 200 + And the page endpoint for path "/some-random-page" returns fixture "/landingpage/home" with status 200 Given I visit the page "/some-random-page" Then the last updated date text should read "Updated 2 November 2022" @mockserver Scenario: Topics and tags - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/shared-elements" with status 200 - And the endpoint "/api/tide/page" with query "?path=/some-random-page&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/shared-elements" with status 200 + And the page endpoint for path "/some-random-page" returns fixture "/landingpage/home" with status 200 Given I visit the page "/some-random-page" Then the page should have the following topic tags @@ -53,8 +53,8 @@ Feature: Shared site elements @mockserver Scenario: Footer - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/shared-elements" with status 200 - And the endpoint "/api/tide/page" with query "?path=/some-random-page&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/shared-elements" with status 200 + And the page endpoint for path "/some-random-page" returns fixture "/landingpage/home" with status 200 Given I visit the page "/some-random-page" Then the footer nav section with title "Level 1 - Item 1" should have the following links @@ -72,7 +72,7 @@ Feature: Shared site elements Then the footer copyright text should be "Test footer copyright html" Then the footer acknowledgement text should be "Test footer acknowledgement" Then the footer should have the following logos - | alt | url | src | + | alt | url | src | | Test logo 1 | /test-logo-1 | https://develop.content.reference.sdp.vic.gov.au/sites/default/files/tide_demo_content/Aerial-shot-of-new-housing-development.jpg?w=1984 | | Test logo 2 | /test-logo-2 | https://develop.content.reference.sdp.vic.gov.au/sites/default/files/tide_demo_content/2018-19-State-Budget.jpg?w=1984 | diff --git a/examples/nuxt-app/test/features/site/theme.feature b/examples/nuxt-app/test/features/site/theme.feature index 30254b97ee..e75e5b8f39 100644 --- a/examples/nuxt-app/test/features/site/theme.feature +++ b/examples/nuxt-app/test/features/site/theme.feature @@ -4,8 +4,8 @@ Feature: Site theme @mockserver Scenario: Default Theme - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 - And the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/reference" with status 200 + And the page endpoint for path "/" returns fixture "/landingpage/home" with status 200 Given I visit the page "/" Then the site header background color should be "rgb(107, 25, 163)" Then the site footer should have the "default" theme applied @@ -14,15 +14,15 @@ Feature: Site theme @mockserver Scenario: Alternate Theme - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/theme-red" with status 200 - And the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/home" with status 200 + Given the site endpoint returns fixture "/site/theme-red" with status 200 + And the page endpoint for path "/" returns fixture "/landingpage/home" with status 200 Given I visit the page "/" Then the site header background color should be "rgb(225, 57, 64)" @mockserver Scenario: Feature flags set neutral theme - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/neutral-footer" with status 200 - And the endpoint "/api/tide/page" with query "?path=/&site=8888" returns fixture "/landingpage/image-banner" with status 200 + Given the site endpoint returns fixture "/site/neutral-footer" with status 200 + And the page endpoint for path "/" returns fixture "/landingpage/image-banner" with status 200 Given I visit the page "/" Then the site footer should have the "neutral" theme applied And ripple buttons should have the "neutral" theme applied diff --git a/examples/nuxt-app/test/features/sitemap/sitemap.feature b/examples/nuxt-app/test/features/sitemap/sitemap.feature index e92b5da397..3c85c0c63b 100644 --- a/examples/nuxt-app/test/features/sitemap/sitemap.feature +++ b/examples/nuxt-app/test/features/sitemap/sitemap.feature @@ -4,7 +4,7 @@ Feature: Sitemap @mockserver Scenario: Visit sitemap - Given the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/shared-elements" with status 200 + Given the site endpoint returns fixture "/site/shared-elements" with status 200 Given I visit the page "/sitemap" Then the sitemap should be rendered with these items | text | diff --git a/packages/nuxt-ripple-cli/src/commands/add/_templates/add/content-type/test.feature.t b/packages/nuxt-ripple-cli/src/commands/add/_templates/add/content-type/test.feature.t index 29adf7d8fc..ac7a7b8592 100644 --- a/packages/nuxt-ripple-cli/src/commands/add/_templates/add/content-type/test.feature.t +++ b/packages/nuxt-ripple-cli/src/commands/add/_templates/add/content-type/test.feature.t @@ -5,8 +5,8 @@ to: "<%= locals.createTests ? `${cypressPath}/e2e/${h.changeCase.kebabCase(name) Feature: <%= name %> page Background: - Given the endpoint "/api/tide/page" with query "?path=/sample-<%= h.changeCase.kebabCase(name) %>&site=8888" returns fixture "/<%= h.changeCase.kebabCase(name) %>/sample-<%= h.changeCase.kebabCase(name) %>" with status 200 - And the endpoint "/api/tide/site" with query "?id=8888" returns fixture "/site/reference" with status 200 + Given the page endpoint for path "/sample-<%= h.changeCase.kebabCase(name) %>" returns fixture "/<%= h.changeCase.kebabCase(name) %>/sample-<%= h.changeCase.kebabCase(name) %>" with status 200 + And the site endpoint returns fixture "/site/reference" with status 200 When I visit the page "/sample-<%= h.changeCase.kebabCase(name) %>" @mockserver diff --git a/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/cypress/features/example.feature.t b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/cypress/features/example.feature.t new file mode 100644 index 0000000000..fa7237ab65 --- /dev/null +++ b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/cypress/features/example.feature.t @@ -0,0 +1,10 @@ +--- +to: cypress/features/example.feature +--- +Feature: Example test + +This is an example test which should be modified or removed as required. See @dpc-sdp/ripple-test-utils for more info. + +@mockserver @skip +Scenario: Example - delete me. + Given I visit the page "/" diff --git a/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/cypress/support/step_definitions/index.ts.t b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/cypress/support/step_definitions/index.ts.t new file mode 100644 index 0000000000..ee64f42349 --- /dev/null +++ b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/cypress/support/step_definitions/index.ts.t @@ -0,0 +1,4 @@ +--- +to: cypress/support/step_definitions/index.ts +--- +import '@dpc-sdp/ripple-test-utils/step_definitions' diff --git a/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/github/PULL_REQUEST_TEMPLATE.md.t b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/github/PULL_REQUEST_TEMPLATE.md.t new file mode 100644 index 0000000000..d219207410 --- /dev/null +++ b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/github/PULL_REQUEST_TEMPLATE.md.t @@ -0,0 +1,24 @@ +--- +to: .github/PULL_REQUEST_TEMPLATE.yml +--- + + +**Issue**: + +### What I did + +- +- + +### How to test + +- +- + +### Checklist + + +- [ ] I have read the [Ripple documentation](https://www.ripple.sdp.vic.gov.au/framework/) documentation around adding custom functionality. +- [ ] I have added Cypress integration tests for new content types or components +- [ ] I have added unit tests for helper functions +- [ ] This PR requires changes to environment variables which need to be added in https://github.com/dpc-sdp/sdp-cmdb diff --git a/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/github/main.yml.t b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/github/main.yml.t index 79f4c63b03..8f35361a1b 100644 --- a/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/github/main.yml.t +++ b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/github/main.yml.t @@ -37,13 +37,13 @@ jobs: uses: cypress-io/github-action@v5 env: DEBUG: '@cypress/github-action' - NUXT_PUBLIC_TIDE_BASE_URL: 'https://develop.content.reference.sdp.vic.gov.au/' - NUXT_PUBLIC_TIDE_SITE: '8888' + NUXT_PUBLIC_TIDE_BASE_URL: 'https://test.base.url/' + NUXT_PUBLIC_TIDE_SITE: 'TEST_SITE' NUXT_PUBLIC_API_URL: 'http://localhost:3001' API_PORT: '3001' NODE_AUTH_TOKEN: ${{secrets.GPR_NPM_INSTALL_TOKEN}} with: build: npm run build start: npm start - wait-on: 'http://localhost:3000/api/tide/site?id=8888' + wait-on: 'http://localhost:3000/assets/fonts/VIC-Regular.woff2' diff --git a/packages/nuxt-ripple/components/TideBaseLayout.vue b/packages/nuxt-ripple/components/TideBaseLayout.vue index 1560bdec03..87547698fe 100644 --- a/packages/nuxt-ripple/components/TideBaseLayout.vue +++ b/packages/nuxt-ripple/components/TideBaseLayout.vue @@ -13,7 +13,6 @@ { + cy.fixture(fixture).then((response) => { + cy.task('setMockRouteWithQuery', { + route: '/api/tide/site', + status, + response, + query: `?id=${Cypress.env('NUXT_PUBLIC_TIDE_SITE')}` + }) + }) + } +) + +Given( + `the page endpoint for path {string} returns fixture {string} with status {int}`, + (path: string, fixture: string, status: number) => { + cy.fixture(fixture).then((response) => { + cy.task('setMockRouteWithQuery', { + route: '/api/tide/page', + status, + response, + query: `?path=${path}&site=${Cypress.env('NUXT_PUBLIC_TIDE_SITE')}` + }) + }) + } +) + Given( `the endpoint {string} returns fixture {string} with status {int}`, (route: string, fixture: string, status: number) => { @@ -49,10 +77,15 @@ Given( ) Given( - `posting to endpoint {string} with query {string} returns fixture {string} with status {int}`, - (route: string, query: string, fixture: string, status: number) => { + `posting form to endpoint {string} returns fixture {string} with status {int}`, + (route: string, fixture: string, status: number) => { cy.fixture(fixture).then((response) => { - cy.task('setMockPostRouteWithQuery', { route, status, response, query }) + cy.task('setMockPostRouteWithQuery', { + route, + status, + response, + query: `?site=${Cypress.env('NUXT_PUBLIC_TIDE_SITE')}` + }) }) } ) diff --git a/packages/ripple-tide-api/types.d.ts b/packages/ripple-tide-api/types.d.ts index 6fc1cce095..270fca4953 100644 --- a/packages/ripple-tide-api/types.d.ts +++ b/packages/ripple-tide-api/types.d.ts @@ -23,6 +23,7 @@ export interface TideSiteData { href: string src: string altText: string + printSrc: string } showQuickExit: boolean cornerGraphic?: { diff --git a/packages/ripple-ui-core/src/components/primary-nav/RplPrimaryNav.stories.mdx b/packages/ripple-ui-core/src/components/primary-nav/RplPrimaryNav.stories.mdx index 8c3821e83e..36f3e2b03e 100644 --- a/packages/ripple-ui-core/src/components/primary-nav/RplPrimaryNav.stories.mdx +++ b/packages/ripple-ui-core/src/components/primary-nav/RplPrimaryNav.stories.mdx @@ -56,7 +56,7 @@ export const CustomLoginButtonTemplate = (args) => ({ primaryLogo: { href: '#', src: 'img/primary-nav-logo-primary.svg', - printsrc: 'img/primary-nav-logo-primary-print.svg', + printSrc: 'img/primary-nav-logo-primary-print.svg', altText: 'Primary logo alt text' }, items: RplPrimaryNavItems @@ -121,7 +121,7 @@ This example uses a supplied secondary logo. href: '#', src: 'img/primary-nav-logo-secondary.svg', altText: 'Secondary logo alt text', - printsrc: 'img/primary-nav-logo-secondary-print.svg' + printSrc: 'img/primary-nav-logo-secondary-print.svg' } }} > diff --git a/packages/ripple-ui-core/src/components/primary-nav/components/nav-bar/RplPrimaryNavBar.css b/packages/ripple-ui-core/src/components/primary-nav/components/nav-bar/RplPrimaryNavBar.css index 585a041790..8910434e23 100644 --- a/packages/ripple-ui-core/src/components/primary-nav/components/nav-bar/RplPrimaryNavBar.css +++ b/packages/ripple-ui-core/src/components/primary-nav/components/nav-bar/RplPrimaryNavBar.css @@ -49,6 +49,7 @@ height: 30px; padding-top: var(--rpl-sp-1); padding-bottom: var(--rpl-sp-1); + fill: var(--rpl-clr-type-default); } } diff --git a/packages/ripple-ui-core/src/components/primary-nav/components/nav-bar/RplPrimaryNavBar.vue b/packages/ripple-ui-core/src/components/primary-nav/components/nav-bar/RplPrimaryNavBar.vue index 2478bfdb13..0370dccde9 100644 --- a/packages/ripple-ui-core/src/components/primary-nav/components/nav-bar/RplPrimaryNavBar.vue +++ b/packages/ripple-ui-core/src/components/primary-nav/components/nav-bar/RplPrimaryNavBar.vue @@ -81,7 +81,7 @@ const handleToggleItem = (level: number, item) => { { :alt="primaryLogo.altText" />