diff --git a/app/assets/js/components/add-service-spinner.js b/app/assets/js/components/add-service-spinner.js index e540dacbb1..bb8a2f250a 100644 --- a/app/assets/js/components/add-service-spinner.js +++ b/app/assets/js/components/add-service-spinner.js @@ -14,6 +14,5 @@ document.getElementById('submit-button').setAttribute('disabled', true) document.getElementById('submit-button').setAttribute('aria-disabled', true) - document.getElementById('submit-button').setAttribute('class', 'govuk-button govuk-button--disabled') } })() diff --git a/app/assets/js/components/request-psp-test-account-spinner.js b/app/assets/js/components/request-psp-test-account-spinner.js index e453c151c0..e6144e5e7a 100644 --- a/app/assets/js/components/request-psp-test-account-spinner.js +++ b/app/assets/js/components/request-psp-test-account-spinner.js @@ -13,6 +13,5 @@ document.getElementById('submit-button').setAttribute('disabled', true) document.getElementById('submit-button').setAttribute('aria-disabled', true) - document.getElementById('submit-button').setAttribute('class', 'govuk-button govuk-button--disabled') } })() diff --git a/app/assets/sass/application.scss b/app/assets/sass/application.scss index 22c8b305b9..76b19f4c3e 100644 --- a/app/assets/sass/application.scss +++ b/app/assets/sass/application.scss @@ -1,7 +1,10 @@ // We set all our pages wider in selfservice because it helps people viewing the list of transactions $govuk-page-width: 1200px; +$govuk-suppressed-warnings: ( + govuk-typography-scale-14 +); -@import "govuk-frontend/govuk/all"; +@import "govuk-frontend/dist/govuk/all"; @import "accessible-autocomplete"; @import "components/cookie-message"; diff --git a/app/assets/sass/components/navigation.scss b/app/assets/sass/components/navigation.scss index c212939ecd..722d7389fc 100644 --- a/app/assets/sass/components/navigation.scss +++ b/app/assets/sass/components/navigation.scss @@ -13,6 +13,7 @@ .service-info--tag { display: inline-block; margin-left: 5px; + max-width: none; } .service-info { diff --git a/app/assets/sass/components/print-button.scss b/app/assets/sass/components/print-button.scss index 7052a77f77..656b57c2c1 100644 --- a/app/assets/sass/components/print-button.scss +++ b/app/assets/sass/components/print-button.scss @@ -2,7 +2,7 @@ display: none; } -.js-enabled { +.govuk-frontend-supported { .print-button-wrapper { display: block; } diff --git a/app/assets/sass/components/request-to-go-live.scss b/app/assets/sass/components/request-to-go-live.scss index 675bb6b6d4..bdaedbdcfd 100644 --- a/app/assets/sass/components/request-to-go-live.scss +++ b/app/assets/sass/components/request-to-go-live.scss @@ -18,17 +18,6 @@ display: inline-block; width: 30px; } - .status { - background-color: govuk-colour("blue"); - color: govuk-colour("white"); - text-transform: uppercase; - letter-spacing: 1px; - font-size: 14px; - font-weight: bold; - padding: 0 5px; - margin-left: govuk-spacing(1); - vertical-align: middle; - } .waiting { background-color: govuk-colour("dark-grey"); } diff --git a/app/views/agreements/macro/status.njk b/app/views/agreements/macro/status.njk index 65b33f2a1c..913ed10a49 100644 --- a/app/views/agreements/macro/status.njk +++ b/app/views/agreements/macro/status.njk @@ -5,10 +5,10 @@ "INACTIVE": "govuk-tag--yellow" } %} {% set statusTextMap = { -"CREATED": "needs payment details", -"ACTIVE": "active", -"CANCELLED": "cancelled", -"INACTIVE": "inactive" +"CREATED": "Needs payment details", +"ACTIVE": "Active", +"CANCELLED": "Cancelled", +"INACTIVE": "Inactive" } %} {% macro agreementStatusTag(status) %} diff --git a/app/views/api-keys/create.njk b/app/views/api-keys/create.njk index 4553069041..898600a9b8 100644 --- a/app/views/api-keys/create.njk +++ b/app/views/api-keys/create.njk @@ -51,7 +51,7 @@
- Warning + Warning

Store your API key securely

diff --git a/app/views/includes/phase-banner.njk b/app/views/includes/phase-banner.njk index 41ee262466..c3559cd51a 100644 --- a/app/views/includes/phase-banner.njk +++ b/app/views/includes/phase-banner.njk @@ -23,7 +23,7 @@ {% if normalisedPaymentProvider === 'sandbox' %} Test {% else %} - {{ normalisedPaymentProvider }} Test + {{ normalisedPaymentProvider | capitalize }} test {% endif %} {% else %} Live @@ -35,7 +35,7 @@ - switch psp {% endif %} {% endset %} - {{ tagText }} + {{ tagText }} {% endif %} {% endset %} diff --git a/app/views/includes/scripts.njk b/app/views/includes/scripts.njk index 4ca4f8b1a0..cff41d091d 100644 --- a/app/views/includes/scripts.njk +++ b/app/views/includes/scripts.njk @@ -1 +1 @@ - + diff --git a/app/views/payouts/list.njk b/app/views/payouts/list.njk index a52363ede6..da42b1d35d 100644 --- a/app/views/payouts/list.njk +++ b/app/views/payouts/list.njk @@ -8,7 +8,7 @@ Payments to your bank account - GOV.UK Pay {% block beforeContent %} {% set pageTitleBreadcrumbWithTag %} Payments to your bank account - {{ "LIVE" if filterLiveAccounts else "TEST" }} + {{ "Live" if filterLiveAccounts else "Test" }} {% endset %} {{ breadcrumbs([ { text: "My services", href: routes.serviceSwitcher.index }, @@ -20,7 +20,7 @@ Payments to your bank account - GOV.UK Pay

Payments to your bank account - {{ "LIVE" if filterLiveAccounts else "TEST" }} + {{ "Live" if filterLiveAccounts else "Test" }}

diff --git a/app/views/request-to-go-live/index.njk b/app/views/request-to-go-live/index.njk index f5ae0c35ab..c06ad4f07d 100644 --- a/app/views/request-to-go-live/index.njk +++ b/app/views/request-to-go-live/index.njk @@ -1,4 +1,5 @@ {% extends "../layout.njk" %} +{%- from "govuk/components/tag/macro.njk" import govukTag -%} {% block pageTitle %} Request a live account - {{ currentService.name }} - GOV.UK Pay @@ -32,7 +33,7 @@
- Warning + Warning All users with admin permissions can submit this information. You can manage your users here.
@@ -91,19 +92,28 @@
  1. Add your organisation’s name and address. These details will appear on your payment pages. {% if enteredOrganisationAddress %} - Completed - {% elif enteredOrganisationName %} - In Progress + {{ govukTag({ + text: "Completed" + }) }} + {% elif enteredOrganisationName %} + {{ govukTag({ + text: "In progress", + classes: "govuk-tag--grey" + }) }} {% endif %}
  2. Tell us which payment service provider you will use. {% if chosenHowToProcessPayments %} - Completed + {{ govukTag({ + text: "Completed" + }) }} {% endif %}
  3. Read and accept our legal terms. {% if agreedToTerms %} - Completed + {{ govukTag({ + text: "Completed" + }) }} {% endif %}
diff --git a/app/views/services/_service-section.njk b/app/views/services/_service-section.njk index 6df7dfa94f..6d8196f505 100644 --- a/app/views/services/_service-section.njk +++ b/app/views/services/_service-section.njk @@ -7,7 +7,7 @@ {{ service.name }} {% if service.isWorldpayTestService %} {{govukTag({ - text: "WORLDPAY TEST SERVICE", + text: "Worldpay test service", classes: "govuk-tag--grey" })}} {% endif %} diff --git a/app/views/services/_service-switch.njk b/app/views/services/_service-switch.njk index c64468312d..fb4cde136f 100644 --- a/app/views/services/_service-switch.njk +++ b/app/views/services/_service-switch.njk @@ -15,7 +15,7 @@ {% endif %} {% if account.provider_switch_enabled and service.isAdminUser %} - switch PSP + switch PSP {% endif %} diff --git a/app/views/simplified-account/settings/stripe-details/bank-account/index.njk b/app/views/simplified-account/settings/stripe-details/bank-account/index.njk index a25c6b8748..1275e67631 100644 --- a/app/views/simplified-account/settings/stripe-details/bank-account/index.njk +++ b/app/views/simplified-account/settings/stripe-details/bank-account/index.njk @@ -77,7 +77,6 @@ document.getElementById('bank-account-form').addEventListener('submit', function () { submitButton.setAttribute('disabled', 'true') submitButton.setAttribute('aria-disabled', 'true') - submitButton.setAttribute('class', 'govuk-button govuk-button--disabled') submitButton.textContent = "Saving..." }) diff --git a/app/views/switch-psp/switch-psp.njk b/app/views/switch-psp/switch-psp.njk index 9c696d0fce..fa64517b66 100644 --- a/app/views/switch-psp/switch-psp.njk +++ b/app/views/switch-psp/switch-psp.njk @@ -22,11 +22,11 @@ {% if not item.enabled and not item.complete %} - cannot start yet + Cannot start yet {% elif item.enabled and not item.complete %} - not started + Not started {% elif item.complete %} - completed + Completed {% endif %} {% endmacro %} diff --git a/app/views/transaction-detail/index.njk b/app/views/transaction-detail/index.njk index 63c87230c8..a01ed7516c 100644 --- a/app/views/transaction-detail/index.njk +++ b/app/views/transaction-detail/index.njk @@ -12,7 +12,7 @@ {% if contextIsAllServiceTransactions %} {% set pageTitleBreadcrumbWithTag %} Transactions for all services - {{ "LIVE" if live else "TEST" }} + {{ "Live" if live else "Test" }} {% endset %} {{ breadcrumbs([ { text: "My services", href: routes.serviceSwitcher.index }, diff --git a/app/views/transactions/filter.njk b/app/views/transactions/filter.njk index 9b8e3086df..b812c76bb2 100644 --- a/app/views/transactions/filter.njk +++ b/app/views/transactions/filter.njk @@ -270,7 +270,7 @@ {% endif %}
-
+
Advanced filters diff --git a/app/views/transactions/index.njk b/app/views/transactions/index.njk index 25311c704b..b736e5b092 100644 --- a/app/views/transactions/index.njk +++ b/app/views/transactions/index.njk @@ -30,7 +30,7 @@ {% if allServiceTransactions %} {% set pageTitleBreadcrumbWithTag %} Transactions for all services - {{ "LIVE" if filterLiveAccounts else "TEST" }} + {{ "Live" if filterLiveAccounts else "Test" }} {% endset %} {{ breadcrumbs([ { text: "My services", href: routes.serviceSwitcher.index }, @@ -62,7 +62,7 @@

{% if allServiceTransactions %} Transactions for all services - {{ "LIVE" if filterLiveAccounts else "TEST" }} + {{ "Live" if filterLiveAccounts else "Test" }} {% else %} Transactions {% endif %} diff --git a/app/views/transactions/paginator.njk b/app/views/transactions/paginator.njk index 2073079d79..46d4b4f384 100644 --- a/app/views/transactions/paginator.njk +++ b/app/views/transactions/paginator.njk @@ -6,7 +6,7 @@ - diff --git a/app/views/webhooks/_paginator.njk b/app/views/webhooks/_paginator.njk index c984201310..2ff811a96d 100644 --- a/app/views/webhooks/_paginator.njk +++ b/app/views/webhooks/_paginator.njk @@ -6,7 +6,7 @@ - diff --git a/app/views/webhooks/message.njk b/app/views/webhooks/message.njk index daa2969cf3..12a21454a8 100644 --- a/app/views/webhooks/message.njk +++ b/app/views/webhooks/message.njk @@ -54,7 +54,7 @@ }) }}
-
+
{{ messageType }} event body diff --git a/app/views/your-psp/_stripe.njk b/app/views/your-psp/_stripe.njk index f3e259c4d3..54a168547e 100644 --- a/app/views/your-psp/_stripe.njk +++ b/app/views/your-psp/_stripe.njk @@ -14,11 +14,11 @@
{% if not item.enabled and not item.completed %} - cannot start yet + Cannot start yet {% elif item.enabled and not item.completed %} - not started + Not started {% elif item.completed %} - completed + Completed {% endif %}
diff --git a/package-lock.json b/package-lock.json index b3c0c09367..7e97a03a0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "express": "4.21.1", "express-validator": "^7.2.0", "google-libphonenumber": "3.2.33", - "govuk-frontend": "^4.8.0", + "govuk-frontend": "^5.7.1", "http-proxy": "1.18.x", "https-proxy-agent": "5.0.1", "joi": "17.12.1", @@ -9068,9 +9068,9 @@ } }, "node_modules/govuk-frontend": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.8.0.tgz", - "integrity": "sha512-NOmPJxL8IYq1HSNHYKx9XY2LLTxuwb+IFASiGQO4sgJ8K7AG66SlSeqARrcetevV8zOf+i1z+MbJJ2O7//OxAw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.7.1.tgz", + "integrity": "sha512-jF1cq5rn57kxZmJRprUZhTQ31zaBBK4b5AyeJaPX3Yhg22lk90Mx/dQLvOk/ycV3wM7e0y+s4IPvb2fFaPlCGg==", "engines": { "node": ">= 4.2.0" } @@ -25290,9 +25290,9 @@ } }, "govuk-frontend": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.8.0.tgz", - "integrity": "sha512-NOmPJxL8IYq1HSNHYKx9XY2LLTxuwb+IFASiGQO4sgJ8K7AG66SlSeqARrcetevV8zOf+i1z+MbJJ2O7//OxAw==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.7.1.tgz", + "integrity": "sha512-jF1cq5rn57kxZmJRprUZhTQ31zaBBK4b5AyeJaPX3Yhg22lk90Mx/dQLvOk/ycV3wM7e0y+s4IPvb2fFaPlCGg==" }, "graceful-fs": { "version": "4.2.11", diff --git a/package.json b/package.json index 907c9285ee..f958649f14 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "express": "4.21.1", "express-validator": "^7.2.0", "google-libphonenumber": "3.2.33", - "govuk-frontend": "^4.8.0", + "govuk-frontend": "^5.7.1", "http-proxy": "1.18.x", "https-proxy-agent": "5.0.1", "joi": "17.12.1", diff --git a/server.js b/server.js index 5bd44e5150..03a676d6b9 100644 --- a/server.js +++ b/server.js @@ -71,7 +71,7 @@ function initialiseGlobalMiddleware (app) { if (process.env.DISABLE_REQUEST_LOGGING !== 'true') { app.use(/\/((?!public|favicon.ico).)*/, loggingMiddleware()) } - app.use(favicon('node_modules/govuk-frontend/govuk/assets/images/favicon.ico')) + app.use(favicon('node_modules/govuk-frontend/dist/govuk/assets/images/favicon.ico')) app.use(staticify.middleware) app.use(function (req, res, next) { @@ -99,7 +99,7 @@ function initialiseTemplateEngine (app) { // Configure nunjucks // see https://mozilla.github.io/nunjucks/api.html#configure const nunjucksEnvironment = nunjucks.configure([ - 'node_modules/govuk-frontend/', + 'node_modules/govuk-frontend/dist/', 'app/views' ], { express: app, // the express app that nunjucks should install to @@ -132,7 +132,7 @@ function initialiseTemplateEngine (app) { function initialisePublic (app) { app.use('/public', express.static('public')) - app.use('/', express.static('node_modules/govuk-frontend/govuk')) + app.use('/', express.static('node_modules/govuk-frontend/dist/govuk')) } function initialiseRoutes (app) { diff --git a/test/cypress/integration/agreements/agreement.cy.js b/test/cypress/integration/agreements/agreement.cy.js index 93e8ae8e8d..69acfd1a5a 100644 --- a/test/cypress/integration/agreements/agreement.cy.js +++ b/test/cypress/integration/agreements/agreement.cy.js @@ -65,7 +65,7 @@ describe('Agreement detail page', () => { cy.get('[data-cy=agreement-detail]').find('dt').eq(1).contains('Reference') cy.get('[data-cy=agreement-detail]').find('dd').eq(1).contains('valid-reference') cy.get('[data-cy=agreement-detail]').find('dt').eq(2).contains('Status') - cy.get('[data-cy=agreement-detail]').find('dd').eq(2).contains('active') + cy.get('[data-cy=agreement-detail]').find('dd').eq(2).contains('Active') cy.get('[data-cy=agreement-detail]').find('dt').eq(3).contains('Description') cy.get('[data-cy=agreement-detail]').find('dd').eq(3).contains("Reason shown to paying user for taking agreement ") cy.get('[data-cy=agreement-detail]').find('dt').eq(4).contains('Date created') diff --git a/test/cypress/integration/all-service-transactions/all-service-transactions-no-autosearch.cy.js b/test/cypress/integration/all-service-transactions/all-service-transactions-no-autosearch.cy.js index cae86e68d7..35f0ca7441 100644 --- a/test/cypress/integration/all-service-transactions/all-service-transactions-no-autosearch.cy.js +++ b/test/cypress/integration/all-service-transactions/all-service-transactions-no-autosearch.cy.js @@ -79,7 +79,7 @@ describe('All service transactions without automatic search', () => { cy.get('.govuk-breadcrumbs').within(() => { cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2) cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Transactions for all services') - cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'LIVE') + cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Live') }) cy.get('.transactions-list--row').should('have.length', 0) @@ -92,7 +92,7 @@ describe('All service transactions without automatic search', () => { cy.get('.govuk-breadcrumbs').within(() => { cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2) cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Transactions for all services') - cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'TEST') + cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Test') }) cy.get('.transactions-list--row').should('have.length', 2) diff --git a/test/cypress/integration/all-service-transactions/all-service-transactions.cy.js b/test/cypress/integration/all-service-transactions/all-service-transactions.cy.js index 15725aeb77..bea0e0b15a 100644 --- a/test/cypress/integration/all-service-transactions/all-service-transactions.cy.js +++ b/test/cypress/integration/all-service-transactions/all-service-transactions.cy.js @@ -98,7 +98,7 @@ describe('All service transactions', () => { cy.get('.govuk-breadcrumbs').within(() => { cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2) cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Transactions for all services') - cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'LIVE') + cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Live') }) cy.get('.transactions-list--row').should('have.length', 2) @@ -112,7 +112,7 @@ describe('All service transactions', () => { cy.get('.govuk-breadcrumbs').within(() => { cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2) cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Transactions for all services') - cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'TEST') + cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Test') }) cy.get('.transactions-list--row').should('have.length', 2) @@ -159,7 +159,7 @@ describe('All service transactions', () => { cy.get('.govuk-breadcrumbs').within(() => { cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2) cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Transactions for all services') - cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'TEST') + cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Test') }) cy.get('.govuk-back-link') @@ -172,7 +172,7 @@ describe('All service transactions', () => { cy.get('.govuk-breadcrumbs').within(() => { cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2) cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Transactions for all services') - cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'TEST') + cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Test') }) cy.get('.govuk-back-link') diff --git a/test/cypress/integration/my-services/my-services.cy.js b/test/cypress/integration/my-services/my-services.cy.js index 0039ee5878..df75079553 100644 --- a/test/cypress/integration/my-services/my-services.cy.js +++ b/test/cypress/integration/my-services/my-services.cy.js @@ -28,7 +28,7 @@ describe('User has access to Worldpay services', () => { cy.setEncryptedCookies(authenticatedUserId) cy.visit('/my-services') - cy.get('strong').should('have.class', 'govuk-tag govuk-tag--grey').contains('WORLDPAY TEST SERVICE') + cy.get('strong').should('have.class', 'govuk-tag govuk-tag--grey').contains('Worldpay test service') }) it('should not display WORLDPAY TEST SERVICE label where there is a Worldpay Live account', () => { diff --git a/test/cypress/integration/payouts/payouts-list.cy.js b/test/cypress/integration/payouts/payouts-list.cy.js index 1ca76d1e66..7f86c95d19 100644 --- a/test/cypress/integration/payouts/payouts-list.cy.js +++ b/test/cypress/integration/payouts/payouts-list.cy.js @@ -42,14 +42,14 @@ describe('Payout list page', () => { ]) cy.visit('/payments-to-your-bank-account') - cy.get('h1').find('.govuk-tag').should('have.text', 'LIVE') + cy.get('h1').find('.govuk-tag').should('have.text', 'Live') cy.get('#payout-list').find('tr').should('have.length', 2) cy.get('#pagination').should('not.exist') cy.get('.govuk-breadcrumbs').within(() => { cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2) cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Payments to your bank account') - cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'LIVE') + cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Live') }) }) @@ -86,14 +86,14 @@ describe('Payout list page', () => { cy.get('a').contains('Switch to test transactions').click() - cy.get('h1').find('.govuk-tag').should('have.text', 'TEST') + cy.get('h1').find('.govuk-tag').should('have.text', 'Test') cy.get('.govuk-inset-text').contains('Test reports represent') cy.get('#payout-list').find('tr').should('have.length', 2) cy.get('.govuk-breadcrumbs').within(() => { cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2) cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Payments to your bank account') - cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'TEST') + cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Test') }) }) @@ -104,14 +104,14 @@ describe('Payout list page', () => { ]) cy.visit('/payments-to-your-bank-account/test') - cy.get('h1').find('.govuk-tag').should('have.text', 'TEST') + cy.get('h1').find('.govuk-tag').should('have.text', 'Test') cy.get('#payout-list').find('tr').should('have.length', 2) cy.get('#pagination').should('not.exist') cy.get('.govuk-breadcrumbs').within(() => { cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2) cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Payments to your bank account') - cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'TEST') + cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Test') }) }) @@ -122,7 +122,7 @@ describe('Payout list page', () => { ]) cy.visit('/payments-to-your-bank-account') - cy.get('h1').find('.govuk-tag').should('have.text', 'LIVE') + cy.get('h1').find('.govuk-tag').should('have.text', 'Live') cy.get('#pagination').should('not.exist') cy.get('#payout-list').should('not.exist') cy.get('.govuk-section-break.govuk-section-break--l.govuk-section-break--visible').next('p').contains('No payments to your bank account found on or after 22 May 2020') diff --git a/test/cypress/integration/request-to-go-live/index.cy.js b/test/cypress/integration/request-to-go-live/index.cy.js index a52609e9e5..3519ea281d 100644 --- a/test/cypress/integration/request-to-go-live/index.cy.js +++ b/test/cypress/integration/request-to-go-live/index.cy.js @@ -58,13 +58,13 @@ describe('Request to go live: index', () => { cy.get('h1 + p').should('contain', 'Complete these steps to request a live account') cy.get('ol.govuk-list > li:nth-child(1)').should('exist') - cy.get('ol.govuk-list > li:nth-child(1) > span').should('not.exist') + cy.get('ol.govuk-list > li:nth-child(1) > strong').should('not.exist') cy.get('ol.govuk-list > li:nth-child(2)').should('exist') - cy.get('ol.govuk-list > li:nth-child(2) > span').should('not.exist') + cy.get('ol.govuk-list > li:nth-child(2) > strong').should('not.exist') cy.get('ol.govuk-list > li:nth-child(3)').should('exist') - cy.get('ol.govuk-list > li:nth-child(3) > span').should('not.exist') + cy.get('ol.govuk-list > li:nth-child(3) > strong').should('not.exist') cy.get('#request-to-go-live-index-form > button').should('exist') cy.get('#request-to-go-live-index-form > button').should('contain', 'Start now') @@ -85,17 +85,18 @@ describe('Request to go live: index', () => { const requestToGoLivePageUrl = `/service/${serviceExternalId}/request-to-go-live` cy.visit(requestToGoLivePageUrl) + cy.get('h1').should('contain', 'Request a live account') cy.get('h1 + p').should('contain', 'Complete these steps to request a live account') cy.get('ol.govuk-list > li:nth-child(1)').should('exist') - cy.get('ol.govuk-list > li:nth-child(1) > span').should('contain', 'In Progress') + cy.get('ol.govuk-list > li:nth-child(1) > strong').should('contain', 'In progress') cy.get('ol.govuk-list > li:nth-child(2)').should('exist') - cy.get('ol.govuk-list > li:nth-child(2) > span').should('not.exist') + cy.get('ol.govuk-list > li:nth-child(2) > strong').should('not.exist') cy.get('ol.govuk-list > li:nth-child(3)').should('exist') - cy.get('ol.govuk-list > li:nth-child(3) > span').should('not.exist') + cy.get('ol.govuk-list > li:nth-child(3) > strong').should('not.exist') cy.get('#request-to-go-live-index-form > button').should('exist') cy.get('#request-to-go-live-index-form > button').should('contain', 'Continue') @@ -117,13 +118,13 @@ describe('Request to go live: index', () => { cy.visit(requestToGoLivePageUrl) cy.get('ol.govuk-list > li:nth-child(1)').should('exist') - cy.get('ol.govuk-list > li:nth-child(1) > span').should('contain', 'Completed') + cy.get('ol.govuk-list > li:nth-child(1) > strong').should('contain', 'Completed') cy.get('ol.govuk-list > li:nth-child(2)').should('exist') - cy.get('ol.govuk-list > li:nth-child(2) > span').should('not.exist') + cy.get('ol.govuk-list > li:nth-child(2) > strong').should('not.exist') cy.get('ol.govuk-list > li:nth-child(3)').should('exist') - cy.get('ol.govuk-list > li:nth-child(3) > span').should('not.exist') + cy.get('ol.govuk-list > li:nth-child(3) > strong').should('not.exist') cy.get('#request-to-go-live-index-form > button').should('exist') cy.get('#request-to-go-live-index-form > button').should('contain', 'Continue') @@ -144,14 +145,15 @@ describe('Request to go live: index', () => { const requestToGoLivePageUrl = `/service/${serviceExternalId}/request-to-go-live` cy.visit(requestToGoLivePageUrl) + cy.get('ol.govuk-list > li:nth-child(1)').should('exist') - cy.get('ol.govuk-list > li:nth-child(1) > span').should('contain', 'Completed') + cy.get('ol.govuk-list > li:nth-child(1) > strong').should('contain', 'Completed') cy.get('ol.govuk-list > li:nth-child(2)').should('exist') - cy.get('ol.govuk-list > li:nth-child(2) > span').should('contain', 'Completed') + cy.get('ol.govuk-list > li:nth-child(2) > strong').should('contain', 'Completed') cy.get('ol.govuk-list > li:nth-child(3)').should('exist') - cy.get('ol.govuk-list > li:nth-child(3) > span').should('not.exist') + cy.get('ol.govuk-list > li:nth-child(3) > strong').should('not.exist') cy.get('#request-to-go-live-index-form > button').should('exist') cy.get('#request-to-go-live-index-form > button').should('contain', 'Continue') @@ -191,13 +193,13 @@ describe('Request to go live: index', () => { cy.get('h1 + p').should('contain', 'Complete these steps to request a live account') cy.get('ol.govuk-list > li:nth-child(1)').should('exist') - cy.get('ol.govuk-list > li:nth-child(1) > span').should('contain', 'Completed') + cy.get('ol.govuk-list > li:nth-child(1) > strong').should('contain', 'Completed') cy.get('ol.govuk-list > li:nth-child(2)').should('exist') - cy.get('ol.govuk-list > li:nth-child(2) > span').should('contain', 'Completed') + cy.get('ol.govuk-list > li:nth-child(2) > strong').should('contain', 'Completed') cy.get('ol.govuk-list > li:nth-child(3)').should('exist') - cy.get('ol.govuk-list > li:nth-child(3) > span').should('not.exist') + cy.get('ol.govuk-list > li:nth-child(3) > strong').should('not.exist') cy.get('#request-to-go-live-index-form > button').should('exist') cy.get('#request-to-go-live-index-form > button').should('contain', 'Continue') @@ -292,13 +294,13 @@ describe('Request to go live: index', () => { cy.get('.next-steps-panel').should('not.exist') cy.get('ol.govuk-list > li:nth-child(1)').should('exist') - cy.get('ol.govuk-list > li:nth-child(1) > span').should('contain', 'Completed') + cy.get('ol.govuk-list > li:nth-child(1) > strong').should('contain', 'Completed') cy.get('ol.govuk-list > li:nth-child(2)').should('exist') - cy.get('ol.govuk-list > li:nth-child(2) > span').should('contain', 'Completed') + cy.get('ol.govuk-list > li:nth-child(2) > strong').should('contain', 'Completed') cy.get('ol.govuk-list > li:nth-child(3)').should('exist') - cy.get('ol.govuk-list > li:nth-child(3) > span').should('contain', 'Completed') + cy.get('ol.govuk-list > li:nth-child(3) > strong').should('contain', 'Completed') cy.get('#request-to-go-live-index-form > button').should('not.exist') }) diff --git a/test/cypress/integration/settings/switch-psp.cy.js b/test/cypress/integration/settings/switch-psp.cy.js index d3627c8df5..26cad168ac 100644 --- a/test/cypress/integration/settings/switch-psp.cy.js +++ b/test/cypress/integration/settings/switch-psp.cy.js @@ -113,11 +113,11 @@ describe('Switch PSP settings page', () => { .within(() => { cy.get('.app-task-list__item').should('have.length', 3) cy.get('.app-task-list__item').eq(0).should('contain', 'Link your Worldpay account with GOV.UK Pay') - .find('.app-task-list__tag').should('have.text', 'not started') + .find('.app-task-list__tag').should('have.text', 'Not started') cy.get('.app-task-list__item').eq(1).should('contain', 'Provide your Worldpay 3DS Flex credentials') - .find('.app-task-list__tag').should('have.text', 'not started') + .find('.app-task-list__tag').should('have.text', 'Not started') cy.get('.app-task-list__item').eq(2).should('contain', 'Make a live payment to test your Worldpay PSP') - .find('.app-task-list__tag').should('have.text', 'cannot start yet') + .find('.app-task-list__tag').should('have.text', 'Cannot start yet') }) cy.get('button').contains('Switch to Worldpay').should('have.disabled') }) @@ -206,12 +206,13 @@ describe('Switch PSP settings page', () => { ]) cy.visit(`/account/${gatewayAccountExternalId}/switch-psp`) + cy.get('.app-task-list__item').eq(0).should('contain', 'Link your Worldpay account with GOV.UK Pay') - .find('.app-task-list__tag').should('have.text', 'completed') + .find('.app-task-list__tag').should('have.text', 'Completed') cy.get('.app-task-list__item').eq(1).should('contain', 'Provide your Worldpay 3DS Flex credentials') - .find('.app-task-list__tag').should('have.text', 'completed') + .find('.app-task-list__tag').should('have.text', 'Completed') cy.get('.app-task-list__item').eq(2).should('contain', 'Make a live payment to test your Worldpay PSP') - .find('.app-task-list__tag').should('have.text', 'not started') + .find('.app-task-list__tag').should('have.text', 'Not started') }) }) @@ -235,9 +236,9 @@ describe('Switch PSP settings page', () => { .within(() => { cy.get('.app-task-list__item').should('have.length', 2) cy.get('.app-task-list__item').eq(0).should('contain', 'Link your Worldpay account with GOV.UK Pay') - .find('.app-task-list__tag').should('have.text', 'not started') + .find('.app-task-list__tag').should('have.text', 'Not started') cy.get('.app-task-list__item').eq(1).should('contain', 'Make a live payment to test your Worldpay PSP') - .find('.app-task-list__tag').should('have.text', 'cannot start yet') + .find('.app-task-list__tag').should('have.text', 'Cannot start yet') }) cy.get('button').contains('Switch to Worldpay').should('have.disabled') }) @@ -263,10 +264,11 @@ describe('Switch PSP settings page', () => { it('should should the task list with the link Worldpay account step complete', () => { cy.visit(`/account/${gatewayAccountExternalId}/switch-psp`) + cy.get('.app-task-list__item').eq(0).should('contain', 'Link your Worldpay account with GOV.UK Pay') - .find('.app-task-list__tag').should('have.text', 'completed') + .find('.app-task-list__tag').should('have.text', 'Completed') cy.get('.app-task-list__item').eq(1).should('contain', 'Make a live payment to test your Worldpay PSP') - .find('.app-task-list__tag').should('have.text', 'not started') + .find('.app-task-list__tag').should('have.text', 'Not started') }) }) }) @@ -468,23 +470,23 @@ describe('Switch PSP settings page', () => { cy.visit(`/account/${gatewayAccountExternalId}/switch-psp`) cy.get('.govuk-heading-l').should('contain', 'Switch payment service provider (PSP)') - cy.get('strong[id="Add organisation website address-status"]').should('contain', 'not started') + cy.get('strong[id="Add organisation website address-status"]').should('contain', 'Not started') cy.get('span').contains('Add organisation website address').should('exist') - cy.get('strong[id="Provide your bank details-status"]').should('contain', 'not started') + cy.get('strong[id="Provide your bank details-status"]').should('contain', 'Not started') cy.get('span').contains('Provide your bank details').should('exist') - cy.get('strong[id="Provide details about your responsible person-status"]').should('contain', 'not started') + cy.get('strong[id="Provide details about your responsible person-status"]').should('contain', 'Not started') cy.get('span').contains('Provide details about your responsible person').should('exist') - cy.get('strong[id="Provide details about the director of your organisation-status"]').should('contain', 'not started') + cy.get('strong[id="Provide details about the director of your organisation-status"]').should('contain', 'Not started') cy.get('span').contains('Provide details about the director of your organisation').should('exist') - cy.get('strong[id="Provide your organisation’s VAT number-status"]').should('contain', 'not started') + cy.get('strong[id="Provide your organisation’s VAT number-status"]').should('contain', 'Not started') cy.get('span').contains('Provide your organisation’s VAT number').should('exist') - cy.get('strong[id="Provide your Company registration number-status"]').should('contain', 'not started') + cy.get('strong[id="Provide your Company registration number-status"]').should('contain', 'Not started') cy.get('span').contains('Provide your Company registration number').should('exist') - cy.get('strong[id="Confirm your organisation details-status"]').should('contain', 'not started') + cy.get('strong[id="Confirm your organisation details-status"]').should('contain', 'Not started') cy.get('span').contains('Confirm your organisation details').should('exist') - cy.get('strong[id="Upload a government entity document-status"]').should('contain', 'not started') + cy.get('strong[id="Upload a government entity document-status"]').should('contain', 'Not started') cy.get('span').contains('Upload a government entity document').should('exist') - cy.get('strong[id="Make a live payment to test your Stripe PSP-status"]').should('contain', 'cannot start yet') + cy.get('strong[id="Make a live payment to test your Stripe PSP-status"]').should('contain', 'Cannot start yet') cy.get('span').contains('Make a live payment to test your Stripe PSP').should('exist') }) }) @@ -560,15 +562,16 @@ describe('Switch PSP settings page', () => { it('all steps are complete', () => { cy.visit(`/account/${gatewayAccountExternalId}/switch-psp`) - cy.get('strong[id="Add organisation website address-status"]').should('contain', 'completed') - cy.get('strong[id="Provide your bank details-status"]').should('contain', 'completed') - cy.get('strong[id="Provide details about your responsible person-status"]').should('contain', 'completed') - cy.get('strong[id="Provide details about the director of your organisation-status"]').should('contain', 'completed') - cy.get('strong[id="Provide your organisation’s VAT number-status"]').should('contain', 'completed') - cy.get('strong[id="Provide your Company registration number-status"]').should('contain', 'completed') - cy.get('strong[id="Confirm your organisation details-status"]').should('contain', 'completed') - cy.get('strong[id="Upload a government entity document-status"]').should('contain', 'completed') - cy.get('strong[id="Make a live payment to test your Stripe PSP-status"]').should('contain', 'completed') + + cy.get('strong[id="Add organisation website address-status"]').should('contain', 'Completed') + cy.get('strong[id="Provide your bank details-status"]').should('contain', 'Completed') + cy.get('strong[id="Provide details about your responsible person-status"]').should('contain', 'Completed') + cy.get('strong[id="Provide details about the director of your organisation-status"]').should('contain', 'Completed') + cy.get('strong[id="Provide your organisation’s VAT number-status"]').should('contain', 'Completed') + cy.get('strong[id="Provide your Company registration number-status"]').should('contain', 'Completed') + cy.get('strong[id="Confirm your organisation details-status"]').should('contain', 'Completed') + cy.get('strong[id="Upload a government entity document-status"]').should('contain', 'Completed') + cy.get('strong[id="Make a live payment to test your Stripe PSP-status"]').should('contain', 'Completed') cy.get('button').contains('Switch to Stripe').should('not.be.disabled') }) diff --git a/test/cypress/integration/settings/your-psp-stripe-tasklist.cy.js b/test/cypress/integration/settings/your-psp-stripe-tasklist.cy.js index e44aa60069..cb980aa892 100644 --- a/test/cypress/integration/settings/your-psp-stripe-tasklist.cy.js +++ b/test/cypress/integration/settings/your-psp-stripe-tasklist.cy.js @@ -120,13 +120,13 @@ describe('Your PSP Stripe page', () => { cy.get('h2').should('contain', 'Information incomplete') cy.get('[data-cy="progress-indicator"]').should('contain', '2 out of 7 steps complete') - cy.get('strong[id="task-bank-details-status"]').should('contain', 'complete') - cy.get('strong[id="task-sro-status"]').should('contain', 'complete') - cy.get('strong[id="task-director-status"]').should('contain', 'not started') - cy.get('strong[id="task-vatNumber-status"]').should('contain', 'not started') - cy.get('strong[id="task-Company-number-status"]').should('contain', 'not started') - cy.get('strong[id="task-checkorganisation-details-status"]').should('contain', 'not started') - cy.get('strong[id="task-government-entity-document-status"]').should('contain', 'cannot start yet') + cy.get('strong[id="task-bank-details-status"]').should('contain', 'Complete') + cy.get('strong[id="task-sro-status"]').should('contain', 'Complete') + cy.get('strong[id="task-director-status"]').should('contain', 'Not started') + cy.get('strong[id="task-vatNumber-status"]').should('contain', 'Not started') + cy.get('strong[id="task-Company-number-status"]').should('contain', 'Not started') + cy.get('strong[id="task-checkorganisation-details-status"]').should('contain', 'Not started') + cy.get('strong[id="task-government-entity-document-status"]').should('contain', 'Cannot start yet') }) it('should show progress indicator and all completed tasks', () => { @@ -146,26 +146,26 @@ describe('Your PSP Stripe page', () => { cy.get('h2').should('contain', 'Information complete') cy.get('[data-cy="progress-indicator"]').should('contain', '7 out of 7 steps complete') - cy.get('strong[id="task-bank-details-status"]').should('contain', 'complete') - cy.get('strong[id="task-sro-status"]').should('contain', 'complete') - cy.get('strong[id="task-director-status"]').should('contain', 'complete') - cy.get('strong[id="task-vatNumber-status"]').should('contain', 'complete') - cy.get('strong[id="task-Company-number-status"]').should('contain', 'complete') - cy.get('strong[id="task-checkorganisation-details-status"]').should('contain', 'complete') - cy.get('strong[id="task-government-entity-document-status"]').should('contain', 'complete') + cy.get('strong[id="task-bank-details-status"]').should('contain', 'Complete') + cy.get('strong[id="task-sro-status"]').should('contain', 'Complete') + cy.get('strong[id="task-director-status"]').should('contain', 'Complete') + cy.get('strong[id="task-vatNumber-status"]').should('contain', 'Complete') + cy.get('strong[id="task-Company-number-status"]').should('contain', 'Complete') + cy.get('strong[id="task-checkorganisation-details-status"]').should('contain', 'Complete') + cy.get('strong[id="task-government-entity-document-status"]').should('contain', 'Complete') }) it('should autamatically show government document as cannot start yet and the rest of the tasks as not started', () => { setupYourPspStubs() cy.visit(`/account/${gatewayAccountExternalId}/your-psp/${credentialExternalId}`) - cy.get('strong[id="task-bank-details-status"]').should('contain', 'not started') - cy.get('strong[id="task-sro-status"]').should('contain', 'not started') - cy.get('strong[id="task-director-status"]').should('contain', 'not started') - cy.get('strong[id="task-vatNumber-status"]').should('contain', 'not started') - cy.get('strong[id="task-Company-number-status"]').should('contain', 'not started') - cy.get('strong[id="task-checkorganisation-details-status"]').should('contain', 'not started') - cy.get('strong[id="task-government-entity-document-status"]').should('contain', 'cannot start yet') + cy.get('strong[id="task-bank-details-status"]').should('contain', 'Not started') + cy.get('strong[id="task-sro-status"]').should('contain', 'Not started') + cy.get('strong[id="task-director-status"]').should('contain', 'Not started') + cy.get('strong[id="task-vatNumber-status"]').should('contain', 'Not started') + cy.get('strong[id="task-Company-number-status"]').should('contain', 'Not started') + cy.get('strong[id="task-checkorganisation-details-status"]').should('contain', 'Not started') + cy.get('strong[id="task-government-entity-document-status"]').should('contain', 'Cannot start yet') }) }) @@ -189,7 +189,7 @@ describe('Your PSP Stripe page', () => { }) cy.visit(`/account/${gatewayAccountExternalId}/your-psp/${credentialExternalId}`) - cy.get('strong[id="task-bank-details-status"]').should('contain', 'complete') + cy.get('strong[id="task-bank-details-status"]').should('contain', 'Complete') cy.get('[data-cy="task-bank-details"]').contains('Bank Details').should('not.have.attr', 'href') }) }) @@ -214,7 +214,7 @@ describe('Your PSP Stripe page', () => { cy.visit(`/account/${gatewayAccountExternalId}/your-psp/${credentialExternalId}`) cy.get('[data-cy="task-vatNumber"]').contains('VAT registration number').should('not.have.attr', 'href') - cy.get('strong[id="task-vatNumber-status"]').should('contain', 'complete') + cy.get('strong[id="task-vatNumber-status"]').should('contain', 'Complete') }) }) @@ -238,7 +238,7 @@ describe('Your PSP Stripe page', () => { cy.visit(`/account/${gatewayAccountExternalId}/your-psp/${credentialExternalId}`) cy.get('[data-cy="task-Company-number"]').contains('Company registration number').should('not.have.attr', 'href') - cy.get('strong[id="task-Company-number-status"]').should('contain', 'complete') + cy.get('strong[id="task-Company-number-status"]').should('contain', 'Complete') }) }) @@ -265,7 +265,7 @@ describe('Your PSP Stripe page', () => { }) cy.visit(`/account/${gatewayAccountExternalId}/your-psp/${credentialExternalId}`) - cy.get('strong[id="task-director-status"]').should('contain', 'complete') + cy.get('strong[id="task-director-status"]').should('contain', 'Complete') cy.get('[data-cy="task-director"]').contains('Service director').should('not.have.attr', 'href') }) }) @@ -298,7 +298,7 @@ describe('Your PSP Stripe page', () => { cy.visit(`/account/${gatewayAccountExternalId}/your-psp/${credentialExternalId}`) cy.get('[data-cy="task-sro"]').contains('Responsible person').should('not.have.attr', 'href') - cy.get('strong[id="task-sro-status"]').should('contain', 'complete') + cy.get('strong[id="task-sro-status"]').should('contain', 'Complete') }) }) @@ -321,7 +321,7 @@ describe('Your PSP Stripe page', () => { cy.visit(`/account/${gatewayAccountExternalId}/your-psp/${credentialExternalId}`) cy.get('[data-cy="task-checkorganisation-details"]').contains('Confirm your organisation’s name and address match your government entity document').should('not.have.attr', 'href') - cy.get('strong[id="task-checkorganisation-details-status"]').should('contain', 'complete') + cy.get('strong[id="task-checkorganisation-details-status"]').should('contain', 'Complete') }) }) diff --git a/test/test-helpers/html-assertions.js b/test/test-helpers/html-assertions.js index b6585451e0..0a8a357afb 100644 --- a/test/test-helpers/html-assertions.js +++ b/test/test-helpers/html-assertions.js @@ -11,7 +11,7 @@ const formatPSPname = require('../../app/utils/format-PSP-name') const formatAccountPathsFor = require('../../app/utils/format-account-paths-for') const environment = nunjucks.configure([ - './node_modules/govuk-frontend/', + './node_modules/govuk-frontend/dist/', './app/views', './govuk_modules/govuk_template/views/layouts' ], {