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' + ) + }) }) }) diff --git a/test/sandbox/fixtures/v3/contact/contact-complete-details-uk.json b/test/sandbox/fixtures/v3/contact/contact-complete-details-uk.json index 5874086a9c2..44999f10869 100644 --- a/test/sandbox/fixtures/v3/contact/contact-complete-details-uk.json +++ b/test/sandbox/fixtures/v3/contact/contact-complete-details-uk.json @@ -36,9 +36,9 @@ "accepts_dit_email_marketing":true, "archived":false, "archived_documents_url_path":"/document/123", - "archived_on":null, + "archived_on":"2019-02-04T15:59:14.2Z", "archived_reason":null, - "archived_by":null, + "archived_by":"2019-02-04T15:59:14.267412Z", "created_on":"2019-02-04T15:59:14.267412Z", "modified_on":"2019-02-05T13:17:23.112153Z" }