Skip to content

Commit

Permalink
Add cdcp to contact us
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles-Pham committed Nov 15, 2024
1 parent 6a98cfe commit 5026d0a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cypress/e2e/ContactUs.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Validate Contact Us Landing page', () => {
cy.get('[data-cy = "contact-task-list"]')
.find('a')
.should('be.visible')
.and('have.length', '4')
.and('have.length', '5')
.and('not.have.length', 0)
.and('not.have.attr', 'href', '#undefined')
})
Expand Down
21 changes: 21 additions & 0 deletions graphql/mappers/contact-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export async function getContactUsContent() {
const oasContactFragment = findFragmentByScId(response, 'oas-contact-us')
const cppContactFragment = findFragmentByScId(response, 'cpp-contact-us')
const sinContactFragment = findFragmentByScId(response, 'sin-contact-us')
const cdcpContactFragment = findFragmentByScId(response, 'cdcp-contact-us')

const mappedSecurity = {
en: {
Expand Down Expand Up @@ -155,6 +156,16 @@ export async function getContactUsContent() {
: '',
schBetaPopup: sinContactFragment?.schBetaPopUp,
},
{
linkId: cdcpContactFragment?.scId,
linkTitle: cdcpContactFragment?.scLinkTextEn,
linkAssistiveTitle: cdcpContactFragment?.scLinkTextAssistiveEn,
linkDestination: cdcpContactFragment?.scDestinationURLEn,
linkDescription: cdcpContactFragment?.scDescriptionEn?.json
? cdcpContactFragment.scDescriptionEn.json[0].content[0].value
: '',
schBetaPopup: cdcpContactFragment?.schBetaPopUp,
},
],
},
fr: {
Expand Down Expand Up @@ -211,6 +222,16 @@ export async function getContactUsContent() {
: '',
schBetaPopup: sinContactFragment?.schBetaPopUp,
},
{
linkId: cdcpContactFragment?.scId,
linkTitle: cdcpContactFragment?.scLinkTextFr,
linkAssistiveTitle: cdcpContactFragment?.scLinkTextAssistiveFr,
linkDestination: cdcpContactFragment?.scDestinationURLFr,
linkDescription: cdcpContactFragment?.scDescriptionFr?.json
? cdcpContactFragment.scDescriptionFr.json[0].content[0].value
: '',
schBetaPopup: cdcpContactFragment?.schBetaPopUp,
},
],
},
}
Expand Down

0 comments on commit 5026d0a

Please sign in to comment.