Skip to content

Commit

Permalink
Update edit page paths (#29929)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie authored May 22, 2024
1 parent 3738b08 commit 68b77a9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('NOD contact info loop', () => {
cy.get('a[href$="phone"]').click();
cy.location('pathname').should(
'eq',
`${NOD_BASE_URL}/edit-contact-information-mobile-phone`,
`${NOD_BASE_URL}/contact-information/edit-mobile-phone`,
);
cy.injectAxe();
cy.axeCheck();
Expand All @@ -93,7 +93,7 @@ describe('NOD contact info loop', () => {
cy.get('a[href$="email-address"]').click();
cy.location('pathname').should(
'eq',
`${NOD_BASE_URL}/edit-contact-information-email-address`,
`${NOD_BASE_URL}/contact-information/edit-email-address`,
);
cy.injectAxe();
cy.axeCheck();
Expand All @@ -119,7 +119,7 @@ describe('NOD contact info loop', () => {
cy.get('a[href$="mailing-address"]').click();
cy.location('pathname').should(
'eq',
`${NOD_BASE_URL}/edit-contact-information-mailing-address`,
`${NOD_BASE_URL}/contact-information/edit-mailing-address`,
);
cy.injectAxe();
cy.axeCheck();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('995 contact info loop', () => {
cy.get('a[href$="home-phone"]').click();
cy.location('pathname').should(
'eq',
`${BASE_URL}/edit-contact-information-home-phone`,
`${BASE_URL}/contact-information/edit-home-phone`,
);
cy.injectAxe();
cy.axeCheck();
Expand All @@ -101,7 +101,7 @@ describe('995 contact info loop', () => {
cy.get('a[href$="mobile-phone"]').click();
cy.location('pathname').should(
'eq',
`${BASE_URL}/edit-contact-information-mobile-phone`,
`${BASE_URL}/contact-information/edit-mobile-phone`,
);
cy.injectAxe();
cy.axeCheck();
Expand All @@ -113,7 +113,7 @@ describe('995 contact info loop', () => {
cy.get('a[href$="email-address"]').click();
cy.location('pathname').should(
'eq',
`${BASE_URL}/edit-contact-information-email-address`,
`${BASE_URL}/contact-information/edit-email-address`,
);
cy.injectAxe();
cy.axeCheck();
Expand All @@ -125,7 +125,7 @@ describe('995 contact info loop', () => {
cy.get('a[href$="mailing-address"]').click();
cy.location('pathname').should(
'eq',
`${BASE_URL}/edit-contact-information-mailing-address`,
`${BASE_URL}/contact-information/edit-mailing-address`,
);
cy.injectAxe();
cy.axeCheck();
Expand All @@ -145,7 +145,7 @@ describe('995 contact info loop', () => {
cy.contains('Edit mobile phone number').should('be.visible');
cy.location('pathname').should(
'eq',
`${BASE_URL}/edit-contact-information-mobile-phone`,
`${BASE_URL}/contact-information/edit-mobile-phone`,
);

cy.get('va-text-input[label^="Mobile phone"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('HLR contact info loop', () => {
cy.get('a[href$="phone"]').click();
cy.location('pathname').should(
'eq',
`${BASE_URL}/edit-contact-information-mobile-phone`,
`${BASE_URL}/contact-information/edit-mobile-phone`,
);
cy.injectAxe();
cy.axeCheck();
Expand All @@ -84,7 +84,7 @@ describe('HLR contact info loop', () => {
cy.get('a[href$="email-address"]').click();
cy.location('pathname').should(
'eq',
`${BASE_URL}/edit-contact-information-email-address`,
`${BASE_URL}/contact-information/edit-email-address`,
);
cy.injectAxe();
cy.axeCheck();
Expand All @@ -96,7 +96,7 @@ describe('HLR contact info loop', () => {
cy.get('a[href$="mailing-address"]').click();
cy.location('pathname').should(
'eq',
`${BASE_URL}/edit-contact-information-mailing-address`,
`${BASE_URL}/contact-information/edit-mailing-address`,
);
cy.injectAxe();
cy.axeCheck();
Expand All @@ -114,7 +114,7 @@ describe('HLR contact info loop', () => {
cy.contains('Edit mobile phone').should('be.visible');
cy.location('pathname').should(
'eq',
`${BASE_URL}/edit-contact-information-mobile-phone`,
`${BASE_URL}/contact-information/edit-mobile-phone`,
);

cy.get('va-text-input[label^="Mobile phone"]')
Expand Down
8 changes: 4 additions & 4 deletions src/platform/forms-system/src/js/components/ContactInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ const ContactInfo = ({
<p className="vads-u-margin-top--0p5">
<Link
id="edit-home-phone"
to={`/edit-${contactPath}-home-phone`}
to={`/${contactPath}/edit-home-phone`}
aria-label={content.editHomePhone}
>
{editText}
Expand All @@ -270,7 +270,7 @@ const ContactInfo = ({
<p className="vads-u-margin-top--0p5">
<Link
id="edit-mobile-phone"
to={`/edit-${contactPath}-mobile-phone`}
to={`/${contactPath}/edit-mobile-phone`}
aria-label={content.editMobilePhone}
>
{editText}
Expand All @@ -291,7 +291,7 @@ const ContactInfo = ({
<p className="vads-u-margin-top--0p5">
<Link
id="edit-email"
to={`/edit-${contactPath}-email-address`}
to={`/${contactPath}/edit-email-address`}
aria-label={content.editEmail}
>
{editText}
Expand All @@ -310,7 +310,7 @@ const ContactInfo = ({
<p className="vads-u-margin-top--0p5">
<Link
id="edit-address"
to={`/edit-${contactPath}-mailing-address`}
to={`/${contactPath}/edit-mailing-address`}
aria-label={content.editMailingAddress}
>
{editText}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const profileContactInfo = ({
wrapperProperties[addressKey] = addressSchema || profileAddressSchema;
config[`${contactInfoPageKey}EditMailingAddress`] = {
title: content.editMailingAddress,
path: `edit-${contactPath}-mailing-address`,
path: `${contactPath}/edit-mailing-address`,
CustomPage: props => EditAddress({ ...props, content, contactPath }),
CustomPageReview: null, // not shown on review & submit
depends: () => false, // accessed from contact info page
Expand All @@ -113,7 +113,7 @@ const profileContactInfo = ({
phoneSchema || standardPhoneSchema(requiredList.includes(keys.homePhone));
config[`${contactInfoPageKey}EditHomePhone`] = {
title: content.editHomePhone,
path: `edit-${contactPath}-home-phone`,
path: `${contactPath}/edit-home-phone`,
CustomPage: props => EditHomePhone({ ...props, content, contactPath }),
CustomPageReview: null, // not shown on review & submit
depends: () => false, // accessed from contact info page
Expand All @@ -128,7 +128,7 @@ const profileContactInfo = ({
standardPhoneSchema(requiredList.includes(keys.mobilePhone));
config[`${contactInfoPageKey}EditMobilePhone`] = {
title: content.editMobilePhone,
path: `edit-${contactPath}-mobile-phone`,
path: `${contactPath}/edit-mobile-phone`,
CustomPage: props => EditMobilePhone({ ...props, content, contactPath }),
CustomPageReview: null, // not shown on review & submit
depends: () => false, // accessed from contact info page
Expand All @@ -141,7 +141,7 @@ const profileContactInfo = ({
wrapperProperties[emailKey] = emailSchema || standardEmailSchema;
config[`${contactInfoPageKey}EditEmailAddress`] = {
title: content.editEmail,
path: `edit-${contactPath}-email-address`,
path: `${contactPath}/edit-email-address`,
CustomPage: props => EditEmail({ ...props, content, contactPath }),
CustomPageReview: null, // not shown on review & submit
depends: () => false, // accessed from contact info page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,15 @@ ProfileInformationFieldController.propTypes = {
showEditView: PropTypes.bool.isRequired,
showValidationView: PropTypes.bool.isRequired,
uiSchema: PropTypes.object.isRequired,
activeEditView: PropTypes.string,
ariaDescribedBy: PropTypes.string,
cancelButtonText: PropTypes.string,
cancelCallback: PropTypes.func,
CustomConfirmCancelModal: PropTypes.oneOfType([
PropTypes.element,
PropTypes.func,
PropTypes.node,
]),
activeEditView: PropTypes.string,
ariaDescribedBy: PropTypes.string,
cancelButtonText: PropTypes.string,
cancelCallback: PropTypes.func,
data: PropTypes.object,
editViewData: PropTypes.object,
forceEditView: PropTypes.bool,
Expand Down

0 comments on commit 68b77a9

Please sign in to comment.