Skip to content

Commit

Permalink
feat(EMS-3676): added test for radio option rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Zain Kassam committed Jul 31, 2024
1 parent 3c8d2a2 commit bd6d869
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ context(
const fieldId = IS_MEMBER_OF_A_GROUP;

describe('when clicking the `change` link', () => {
it(`should redirect to ${MEMBER_OF_A_GROUP_CHANGE}`, () => {
beforeEach(() => {
cy.navigateToUrl(url);

summaryList.field(fieldId).changeLink().click();
});

it(`should redirect to ${MEMBER_OF_A_GROUP_CHANGE}`, () => {
cy.assertChangeAnswersPageUrl({ route: MEMBER_OF_A_GROUP_CHANGE, fieldId, isInsuranceEligibility: true });
});

it(`should have the "no" radio selected`, () => {
cy.assertNoRadioOptionIsChecked();
});
});

describe('form submission without changing the answer', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ context(
const fieldId = IS_PARTY_TO_CONSORTIUM;

describe('when clicking the `change` link', () => {
it(`should redirect to ${PARTY_TO_CONSORTIUM_CHANGE}`, () => {
beforeEach(() => {
cy.navigateToUrl(url);

summaryList.field(fieldId).changeLink().click();
});

it(`should redirect to ${PARTY_TO_CONSORTIUM_CHANGE}`, () => {
cy.assertChangeAnswersPageUrl({ route: PARTY_TO_CONSORTIUM_CHANGE, fieldId, isInsuranceEligibility: true });
});

it(`should have the "no" radio selected`, () => {
cy.assertNoRadioOptionIsChecked();
});
});

describe('form submission without changing the answer', () => {
Expand Down

0 comments on commit bd6d869

Please sign in to comment.