diff --git a/src/client/components/ContactLocalHeader/index.jsx b/src/client/components/ContactLocalHeader/index.jsx index 3842598b91f..3132afa2ac4 100644 --- a/src/client/components/ContactLocalHeader/index.jsx +++ b/src/client/components/ContactLocalHeader/index.jsx @@ -100,9 +100,9 @@ const ContactLocalHeader = ({ contact, writeFlashMessage }) => { {contact.archived && ( { writeFlashMessage('Contact record updated') diff --git a/test/component/cypress/specs/Contacts/ContactLocalHeader.cy.jsx b/test/component/cypress/specs/Contacts/ContactLocalHeader.cy.jsx index 5726a08f457..f92665643ef 100644 --- a/test/component/cypress/specs/Contacts/ContactLocalHeader.cy.jsx +++ b/test/component/cypress/specs/Contacts/ContactLocalHeader.cy.jsx @@ -94,6 +94,20 @@ describe('ContactLocalHeader', () => { it('should render the archive panel', () => { cy.get('[data-test=archive-panel]').should('exist') }) + + it('should render an archived message', () => { + cy.get('[data-test="archive-message"]').should( + 'have.text', + 'This contact was archived on 04 Jul 2019 by Bernard Harris-Patel.' + ) + }) + + it('should render an archived reason', () => { + cy.get('[data-test="archive-reason"]').should( + 'have.text', + 'Reason: Left the company' + ) + }) }) })