diff --git a/e2e-tests/commands/shared-commands/assertions/assert-empty-contract-completion-date-field-values.js b/e2e-tests/commands/shared-commands/assertions/assert-empty-contract-completion-date-field-values.js index 9b6d167e45..cdcf25a9f5 100644 --- a/e2e-tests/commands/shared-commands/assertions/assert-empty-contract-completion-date-field-values.js +++ b/e2e-tests/commands/shared-commands/assertions/assert-empty-contract-completion-date-field-values.js @@ -12,9 +12,9 @@ const { * Assert all CONTRACT_COMPLETION_DATE field values are empty. */ const assertEmptyContractCompletionDateFieldValues = () => { - cy.checkValue(field(CONTRACT_COMPLETION_DATE).dayInput(), ''); - cy.checkValue(field(CONTRACT_COMPLETION_DATE).monthInput(), ''); - cy.checkValue(field(CONTRACT_COMPLETION_DATE).yearInput(), ''); + field(CONTRACT_COMPLETION_DATE).dayInput().should('have.value', ''); + field(CONTRACT_COMPLETION_DATE).monthInput().should('have.value', ''); + field(CONTRACT_COMPLETION_DATE).yearInput().should('have.value', ''); }; export default assertEmptyContractCompletionDateFieldValues; diff --git a/e2e-tests/commands/shared-commands/assertions/assert-empty-requested-start-date-field-values.js b/e2e-tests/commands/shared-commands/assertions/assert-empty-requested-start-date-field-values.js index 1c7e1f1ebf..89d09ad720 100644 --- a/e2e-tests/commands/shared-commands/assertions/assert-empty-requested-start-date-field-values.js +++ b/e2e-tests/commands/shared-commands/assertions/assert-empty-requested-start-date-field-values.js @@ -10,9 +10,9 @@ const { * Assert all REQUESTED_START_DATE field values are empty. */ const assertEmptyRequestedStartDateFieldValues = () => { - cy.checkValue(field(REQUESTED_START_DATE).dayInput(), ''); - cy.checkValue(field(REQUESTED_START_DATE).monthInput(), ''); - cy.checkValue(field(REQUESTED_START_DATE).yearInput(), ''); + field(REQUESTED_START_DATE).dayInput().should('have.value', ''); + field(REQUESTED_START_DATE).monthInput().should('have.value', ''); + field(REQUESTED_START_DATE).yearInput().should('have.value', ''); }; export default assertEmptyRequestedStartDateFieldValues; diff --git a/e2e-tests/insurance/cypress/e2e/journeys/account/sign-in/enter-code/validation/account-sign-in-enter-code-validation.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/account/sign-in/enter-code/validation/account-sign-in-enter-code-validation.spec.js index ad03bb0624..f006e6e204 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/account/sign-in/enter-code/validation/account-sign-in-enter-code-validation.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/account/sign-in/enter-code/validation/account-sign-in-enter-code-validation.spec.js @@ -72,7 +72,7 @@ context('Insurance - Account - Sign in - Enter code - validation', () => { expectedErrorMessage, }); - cy.checkValue(field.input(), invalidAccessCode); + cy.checkValue(field.input, invalidAccessCode); }); describe('when submitting a valid access code', () => { diff --git a/e2e-tests/insurance/cypress/e2e/journeys/policy/change-your-answers/multiple-policy/change-your-answers-change-policy-type-multiple-to-single-to-multiple.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/policy/change-your-answers/multiple-policy/change-your-answers-change-policy-type-multiple-to-single-to-multiple.spec.js index bc38b025e0..5aaf5e67c4 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/policy/change-your-answers/multiple-policy/change-your-answers-change-policy-type-multiple-to-single-to-multiple.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/policy/change-your-answers/multiple-policy/change-your-answers-change-policy-type-multiple-to-single-to-multiple.spec.js @@ -64,13 +64,13 @@ context('Insurance - Policy - Change your answers - Policy type - multiple to si it(`should have empty field values when going back to ${MULTIPLE_CONTRACT_POLICY} and ${MULTIPLE_CONTRACT_POLICY_EXPORT_VALUE}`, () => { cy.assertEmptyRequestedStartDateFieldValues(); - cy.checkValue(field(TOTAL_MONTHS_OF_COVER).input(), ''); + cy.checkValue(field(TOTAL_MONTHS_OF_COVER).input, ''); cy.assertCurrencyFormFieldsAreEmpty(); cy.navigateToUrl(exportValueUrl); - cy.checkValue(field(TOTAL_SALES_TO_BUYER).input(), ''); - cy.checkValue(field(MAXIMUM_BUYER_WILL_OWE).input(), ''); + cy.checkValue(field(TOTAL_SALES_TO_BUYER).input, ''); + cy.checkValue(field(MAXIMUM_BUYER_WILL_OWE).input, ''); }); }); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/policy/change-your-answers/single-policy/change-your-answers-change-policy-type-single-to-multiple-to-single.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/policy/change-your-answers/single-policy/change-your-answers-change-policy-type-single-to-multiple-to-single.spec.js index c7a3c8fb79..2dc2f77029 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/policy/change-your-answers/single-policy/change-your-answers-change-policy-type-single-to-multiple-to-single.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/policy/change-your-answers/single-policy/change-your-answers-change-policy-type-single-to-multiple-to-single.spec.js @@ -66,7 +66,7 @@ context('Insurance - Policy - Change your answers - Policy type - single to mult cy.navigateToUrl(totalContractValueUrl); - cy.checkValue(field(TOTAL_CONTRACT_VALUE).input(), ''); - cy.checkValue(field(REQUESTED_CREDIT_LIMIT).input(), ''); + cy.checkValue(field(TOTAL_CONTRACT_VALUE).input, ''); + cy.checkValue(field(REQUESTED_CREDIT_LIMIT).input, ''); }); }); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/export-value/multiple-contract-policy-export-value.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/export-value/multiple-contract-policy-export-value.spec.js index 15e217abc6..8fa77d2b94 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/export-value/multiple-contract-policy-export-value.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/export-value/multiple-contract-policy-export-value.spec.js @@ -127,8 +127,8 @@ context( it('should have the submitted values', () => { cy.navigateToUrl(url); - cy.checkValue(fieldSelector(TOTAL_SALES_TO_BUYER).input(), application.POLICY[TOTAL_SALES_TO_BUYER]); - cy.checkValue(fieldSelector(MAXIMUM_BUYER_WILL_OWE).input(), application.POLICY[MAXIMUM_BUYER_WILL_OWE]); + cy.checkValue(fieldSelector(TOTAL_SALES_TO_BUYER).input, application.POLICY[TOTAL_SALES_TO_BUYER]); + cy.checkValue(fieldSelector(MAXIMUM_BUYER_WILL_OWE).input, application.POLICY[MAXIMUM_BUYER_WILL_OWE]); }); }); }); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/export-value/save-and-back.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/export-value/save-and-back.spec.js index 62a389d1bb..1970df49d8 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/export-value/save-and-back.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/export-value/save-and-back.spec.js @@ -94,7 +94,7 @@ context('Insurance - Policy - Multiple contract policy Export value page - Save }); it('should NOT have saved the submitted value', () => { - cy.checkValue(field.input(), ''); + cy.checkValue(field.input, ''); }); }); }); @@ -124,7 +124,7 @@ context('Insurance - Policy - Multiple contract policy Export value page - Save }); it('should have the submitted value', () => { - cy.checkValue(fieldSelector(TOTAL_SALES_TO_BUYER).input(), application.POLICY[TOTAL_SALES_TO_BUYER]); + cy.checkValue(fieldSelector(TOTAL_SALES_TO_BUYER).input, application.POLICY[TOTAL_SALES_TO_BUYER]); }); }); }); @@ -143,8 +143,8 @@ context('Insurance - Policy - Multiple contract policy Export value page - Save }); it('should render all submitted values', () => { - cy.checkValue(fieldSelector(TOTAL_SALES_TO_BUYER).input(), application.POLICY[TOTAL_SALES_TO_BUYER]); - cy.checkValue(fieldSelector(MAXIMUM_BUYER_WILL_OWE).input(), application.POLICY[MAXIMUM_BUYER_WILL_OWE]); + cy.checkValue(fieldSelector(TOTAL_SALES_TO_BUYER).input, application.POLICY[TOTAL_SALES_TO_BUYER]); + cy.checkValue(fieldSelector(MAXIMUM_BUYER_WILL_OWE).input, application.POLICY[MAXIMUM_BUYER_WILL_OWE]); }); }); }); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/multiple-contract-policy.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/multiple-contract-policy.spec.js index 2a1f0ae70e..2782561ebc 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/multiple-contract-policy.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/policy/multiple-contract-policy/multiple-contract-policy.spec.js @@ -147,9 +147,9 @@ context('Insurance - Policy - Multiple contract policy page - As an exporter, I it('should have the submitted values', () => { cy.navigateToUrl(url); - cy.checkValue(fieldSelector(REQUESTED_START_DATE).dayInput(), application.POLICY[REQUESTED_START_DATE].day); - cy.checkValue(fieldSelector(REQUESTED_START_DATE).monthInput(), application.POLICY[REQUESTED_START_DATE].month); - cy.checkValue(fieldSelector(REQUESTED_START_DATE).yearInput(), application.POLICY[REQUESTED_START_DATE].year); + fieldSelector(REQUESTED_START_DATE).dayInput().should('have.value', application.POLICY[REQUESTED_START_DATE].day); + fieldSelector(REQUESTED_START_DATE).monthInput().should('have.value', application.POLICY[REQUESTED_START_DATE].month); + fieldSelector(REQUESTED_START_DATE).yearInput().should('have.value', application.POLICY[REQUESTED_START_DATE].year); cy.checkValue(fieldSelector(TOTAL_MONTHS_OF_COVER).input(), application.POLICY[TOTAL_MONTHS_OF_COVER]); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/save-and-back.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/save-and-back.spec.js index 271a032985..8db59ff354 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/save-and-back.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/save-and-back.spec.js @@ -89,9 +89,9 @@ context('Insurance - Policy - Single contract policy page - Save and go back', ( cy.startInsurancePolicySection({}); cy.clickSubmitButton(); - cy.checkValue(field.dayInput(), ''); - cy.checkValue(field.monthInput(), ''); - cy.checkValue(field.yearInput(), ''); + field.dayInput().should('have.value', ''); + field.monthInput().should('have.value', ''); + field.yearInput().should('have.value', ''); }); }); @@ -121,9 +121,9 @@ context('Insurance - Policy - Single contract policy page - Save and go back', ( cy.startInsurancePolicySection({}); cy.clickSubmitButton(); - cy.checkValue(field.dayInput(), '1'); - cy.checkValue(field.monthInput(), month); - cy.checkValue(field.yearInput(), new Date(futureDate).getFullYear()); + field.dayInput().should('have.value', '1'); + field.monthInput().should('have.value', month); + field.yearInput().should('have.value', new Date(futureDate).getFullYear()); }); }); }); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/single-contract-policy.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/single-contract-policy.spec.js index 983c9d3e0f..6f8d376c9b 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/single-contract-policy.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/single-contract-policy.spec.js @@ -152,13 +152,13 @@ context('Insurance - Policy - Single contract policy page - As an exporter, I wa cy.navigateToUrl(`${INSURANCE_ROOT}/${referenceNumber}${SINGLE_CONTRACT_POLICY}`); - cy.checkValue(fieldSelector(REQUESTED_START_DATE).dayInput(), application.POLICY[REQUESTED_START_DATE].day); - cy.checkValue(fieldSelector(REQUESTED_START_DATE).monthInput(), application.POLICY[REQUESTED_START_DATE].month); - cy.checkValue(fieldSelector(REQUESTED_START_DATE).yearInput(), application.POLICY[REQUESTED_START_DATE].year); + fieldSelector(REQUESTED_START_DATE).dayInput().should('have.value', application.POLICY[REQUESTED_START_DATE].day); + fieldSelector(REQUESTED_START_DATE).monthInput().should('have.value', application.POLICY[REQUESTED_START_DATE].month); + fieldSelector(REQUESTED_START_DATE).yearInput().should('have.value', application.POLICY[REQUESTED_START_DATE].year); - cy.checkValue(fieldSelector(CONTRACT_COMPLETION_DATE).dayInput(), application.POLICY[CONTRACT_COMPLETION_DATE].day); - cy.checkValue(fieldSelector(CONTRACT_COMPLETION_DATE).monthInput(), application.POLICY[CONTRACT_COMPLETION_DATE].month); - cy.checkValue(fieldSelector(CONTRACT_COMPLETION_DATE).yearInput(), application.POLICY[CONTRACT_COMPLETION_DATE].year); + fieldSelector(CONTRACT_COMPLETION_DATE).dayInput().should('have.value', application.POLICY[CONTRACT_COMPLETION_DATE].day); + fieldSelector(CONTRACT_COMPLETION_DATE).monthInput().should('have.value', application.POLICY[CONTRACT_COMPLETION_DATE].month); + fieldSelector(CONTRACT_COMPLETION_DATE).yearInput().should('have.value', application.POLICY[CONTRACT_COMPLETION_DATE].year); const isoCode = application.POLICY[POLICY_CURRENCY_CODE]; diff --git a/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/total-contract-value/save-and-back.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/total-contract-value/save-and-back.spec.js index 9480450137..c41c932d9c 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/total-contract-value/save-and-back.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/total-contract-value/save-and-back.spec.js @@ -72,8 +72,8 @@ context('Insurance - Policy - Single contract policy - Total contract value page it('should have the submitted values when going back to the page', () => { cy.navigateToUrl(url); - cy.checkValue(fieldSelector(TOTAL_CONTRACT_VALUE).input(), application.POLICY[TOTAL_CONTRACT_VALUE]); - cy.checkValue(fieldSelector(REQUESTED_CREDIT_LIMIT).input(), ''); + cy.checkValue(fieldSelector(TOTAL_CONTRACT_VALUE), application.POLICY[TOTAL_CONTRACT_VALUE]); + cy.checkValue(fieldSelector(REQUESTED_CREDIT_LIMIT), ''); }); }); @@ -97,7 +97,7 @@ context('Insurance - Policy - Single contract policy - Total contract value page it('should have the submitted values when going back to the page', () => { cy.navigateToUrl(url); - cy.checkValue(fieldSelector(REQUESTED_CREDIT_LIMIT).input(), application.POLICY[REQUESTED_CREDIT_LIMIT]); + cy.checkValue(fieldSelector(REQUESTED_CREDIT_LIMIT), application.POLICY[REQUESTED_CREDIT_LIMIT]); }); }); @@ -121,8 +121,8 @@ context('Insurance - Policy - Single contract policy - Total contract value page it('should have the submitted values when going back to the page', () => { cy.navigateToUrl(url); - cy.checkValue(fieldSelector(TOTAL_CONTRACT_VALUE).input(), application.POLICY[TOTAL_CONTRACT_VALUE]); - cy.checkValue(fieldSelector(REQUESTED_CREDIT_LIMIT).input(), application.POLICY[REQUESTED_CREDIT_LIMIT]); + cy.checkValue(fieldSelector(TOTAL_CONTRACT_VALUE), application.POLICY[TOTAL_CONTRACT_VALUE]); + cy.checkValue(fieldSelector(REQUESTED_CREDIT_LIMIT), application.POLICY[REQUESTED_CREDIT_LIMIT]); }); }); }); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/total-contract-value/single-contract-policy-total-contract-value.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/total-contract-value/single-contract-policy-total-contract-value.spec.js index 24fd580335..817c1230dd 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/total-contract-value/single-contract-policy-total-contract-value.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/policy/single-contract-policy/total-contract-value/single-contract-policy-total-contract-value.spec.js @@ -114,9 +114,9 @@ context( it('should have the submitted values', () => { cy.navigateToUrl(url); - cy.checkValue(fieldSelector(TOTAL_CONTRACT_VALUE).input(), application.POLICY[TOTAL_CONTRACT_VALUE]); + cy.checkValue(fieldSelector(TOTAL_CONTRACT_VALUE), application.POLICY[TOTAL_CONTRACT_VALUE]); - cy.checkValue(fieldSelector(REQUESTED_CREDIT_LIMIT).input(), application.POLICY[REQUESTED_CREDIT_LIMIT]); + cy.checkValue(fieldSelector(REQUESTED_CREDIT_LIMIT), application.POLICY[REQUESTED_CREDIT_LIMIT]); }); }); }); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/your-business/nature-of-business/nature-of-business-page.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/your-business/nature-of-business/nature-of-business-page.spec.js index 286690bffa..a1723865ab 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/your-business/nature-of-business/nature-of-business-page.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/your-business/nature-of-business/nature-of-business-page.spec.js @@ -120,8 +120,8 @@ context( expectedValue: application.EXPORTER_BUSINESS[GOODS_OR_SERVICES], }); - cy.checkValue(fieldSelector(YEARS_EXPORTING).input(), application.EXPORTER_BUSINESS[YEARS_EXPORTING]); - cy.checkValue(fieldSelector(EMPLOYEES_UK).input(), application.EXPORTER_BUSINESS[EMPLOYEES_UK]); + cy.checkValue(fieldSelector(YEARS_EXPORTING), application.EXPORTER_BUSINESS[YEARS_EXPORTING]); + cy.checkValue(fieldSelector(EMPLOYEES_UK), application.EXPORTER_BUSINESS[EMPLOYEES_UK]); }); }); }, diff --git a/e2e-tests/insurance/cypress/e2e/journeys/your-business/nature-of-business/save-and-back.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/your-business/nature-of-business/save-and-back.spec.js index 7d25f1bfca..b64cdfcc5a 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/your-business/nature-of-business/save-and-back.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/your-business/nature-of-business/save-and-back.spec.js @@ -81,8 +81,8 @@ context('Insurance - Your business - Nature of your business page - Save and bac expectedValue: application.EXPORTER_BUSINESS[GOODS_OR_SERVICES], }); - cy.checkValue(field(YEARS_EXPORTING).input(), ''); - cy.checkValue(field(EMPLOYEES_UK).input(), ''); + cy.checkValue(field(YEARS_EXPORTING), ''); + cy.checkValue(field(EMPLOYEES_UK), ''); }); }); @@ -116,8 +116,8 @@ context('Insurance - Your business - Nature of your business page - Save and bac expectedValue: application.EXPORTER_BUSINESS[GOODS_OR_SERVICES], }); - cy.checkValue(field(YEARS_EXPORTING).input(), application.EXPORTER_BUSINESS[YEARS_EXPORTING]); - cy.checkValue(field(EMPLOYEES_UK).input(), application.EXPORTER_BUSINESS[EMPLOYEES_UK]); + cy.checkValue(field(YEARS_EXPORTING), application.EXPORTER_BUSINESS[YEARS_EXPORTING]); + cy.checkValue(field(EMPLOYEES_UK), application.EXPORTER_BUSINESS[EMPLOYEES_UK]); }); }); }); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/your-business/turnover/save-and-back.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/your-business/turnover/save-and-back.spec.js index 91331c1861..aab7f0ec81 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/your-business/turnover/save-and-back.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/your-business/turnover/save-and-back.spec.js @@ -76,8 +76,8 @@ context('Insurance - Your business - Turnover page - Save and back', () => { // go through 3 business forms. cy.clickSubmitButtonMultipleTimes({ count: 3 }); - cy.checkValue(field(ESTIMATED_ANNUAL_TURNOVER).input(), application.EXPORTER_BUSINESS[ESTIMATED_ANNUAL_TURNOVER]); - cy.checkValue(field(PERCENTAGE_TURNOVER).input(), ''); + cy.checkValue(field(ESTIMATED_ANNUAL_TURNOVER), application.EXPORTER_BUSINESS[ESTIMATED_ANNUAL_TURNOVER]); + cy.checkValue(field(PERCENTAGE_TURNOVER), ''); }); }); @@ -105,8 +105,8 @@ context('Insurance - Your business - Turnover page - Save and back', () => { // go through 2 business forms. cy.clickSubmitButtonMultipleTimes({ count: 3 }); - cy.checkValue(field(ESTIMATED_ANNUAL_TURNOVER).input(), application.EXPORTER_BUSINESS[ESTIMATED_ANNUAL_TURNOVER]); - cy.checkValue(field(PERCENTAGE_TURNOVER).input(), application.EXPORTER_BUSINESS[PERCENTAGE_TURNOVER]); + cy.checkValue(field(ESTIMATED_ANNUAL_TURNOVER), application.EXPORTER_BUSINESS[ESTIMATED_ANNUAL_TURNOVER]); + cy.checkValue(field(PERCENTAGE_TURNOVER), application.EXPORTER_BUSINESS[PERCENTAGE_TURNOVER]); }); }); }); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/your-business/turnover/turnover-page.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/your-business/turnover/turnover-page.spec.js index 5693e3015f..ee957e6dda 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/your-business/turnover/turnover-page.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/your-business/turnover/turnover-page.spec.js @@ -133,9 +133,9 @@ context( cy.checkText(turnoverPage[FINANCIAL_YEAR_END_DATE](), financialYearEnd.expectedValue); - cy.checkValue(fieldSelector(ESTIMATED_ANNUAL_TURNOVER).input(), application.EXPORTER_BUSINESS[ESTIMATED_ANNUAL_TURNOVER]); + cy.checkValue(fieldSelector(ESTIMATED_ANNUAL_TURNOVER), application.EXPORTER_BUSINESS[ESTIMATED_ANNUAL_TURNOVER]); - cy.checkValue(fieldSelector(PERCENTAGE_TURNOVER).input(), application.EXPORTER_BUSINESS[PERCENTAGE_TURNOVER]); + cy.checkValue(fieldSelector(PERCENTAGE_TURNOVER), application.EXPORTER_BUSINESS[PERCENTAGE_TURNOVER]); }); }); }, diff --git a/e2e-tests/quote/cypress/e2e/journeys/quote/tell-us-about-your-policy/tell-us-about-your-multi-policy.spec.js b/e2e-tests/quote/cypress/e2e/journeys/quote/tell-us-about-your-policy/tell-us-about-your-multi-policy.spec.js index eb510547ed..d55133390c 100644 --- a/e2e-tests/quote/cypress/e2e/journeys/quote/tell-us-about-your-policy/tell-us-about-your-multi-policy.spec.js +++ b/e2e-tests/quote/cypress/e2e/journeys/quote/tell-us-about-your-policy/tell-us-about-your-multi-policy.spec.js @@ -80,10 +80,10 @@ context('Tell us about your multiple policy page - as an exporter, I want to pro const field = fieldSelector(fieldId); - cy.checkValue(field.input().select(1), GBP.isoCode); - cy.checkValue(field.input().select(2), EUR.isoCode); - cy.checkValue(field.input().select(3), USD.isoCode); - cy.checkValue(field.input().select(4), JPY.isoCode); + field.input().select(1).should('have.value', GBP.isoCode); + field.input().select(2).should('have.value', EUR.isoCode); + field.input().select(3).should('have.value', USD.isoCode); + field.input().select(4).should('have.value', JPY.isoCode); }); it('should render `max amount owed` label and input', () => { diff --git a/e2e-tests/quote/cypress/e2e/journeys/quote/tell-us-about-your-policy/tell-us-about-your-single-policy.spec.js b/e2e-tests/quote/cypress/e2e/journeys/quote/tell-us-about-your-policy/tell-us-about-your-single-policy.spec.js index e2d977b7bd..5e6aa6499d 100644 --- a/e2e-tests/quote/cypress/e2e/journeys/quote/tell-us-about-your-policy/tell-us-about-your-single-policy.spec.js +++ b/e2e-tests/quote/cypress/e2e/journeys/quote/tell-us-about-your-policy/tell-us-about-your-single-policy.spec.js @@ -86,10 +86,10 @@ context('Tell us about your single policy page - as an exporter, I want to provi const field = fieldSelector(fieldId); - cy.checkValue(field.input().select(1), GBP.isoCode); - cy.checkValue(field.input().select(2), EUR.isoCode); - cy.checkValue(field.input().select(3), USD.isoCode); - cy.checkValue(field.input().select(4), JPY.isoCode); + field.input().select(1).should('have.value', GBP.isoCode); + field.input().select(2).should('have.value', EUR.isoCode); + field.input().select(3).should('have.value', USD.isoCode); + field.input().select(4).should('have.value', JPY.isoCode); }); it('should render `contract value` label and input', () => {