diff --git a/cypress/tests/integration/institution.spec.js b/cypress/tests/integration/institution.spec.js index 57ea1fa..fbad838 100644 --- a/cypress/tests/integration/institution.spec.js +++ b/cypress/tests/integration/institution.spec.js @@ -34,9 +34,9 @@ describe('HMDA Help', () => { const successMessage = `The institution, ${HH_INSTITUTION}, has been updated.` const nameLabelText = 'Respondent Name' const updateButtonText = 'Update the institution' - const testName = 'Cypress Test Name Update' - const timestamp1 = Date.now() + const testName = 'Cypress - Change respondent name ' + timestamp1 + cy.findByText("Note History").click() cy.get('.note-list li') .first() @@ -45,7 +45,6 @@ describe('HMDA Help', () => { cy.findByLabelText(nameLabelText).then($name => { const savedName = $name.attr('value') - expect($name.attr('value')).to.not.contain(testName) // Change Respondent Name cy.findByLabelText(nameLabelText) @@ -74,6 +73,7 @@ describe('HMDA Help', () => { .find('button .text') .should('contain.text', timestamp1) cy.get('@firstNote') + .click() .find('.details tbody td') .eq(0) .should('contain.text', "respondent") diff --git a/src/utils/convert.js b/src/utils/convert.js index 46603c3..15a4c59 100644 --- a/src/utils/convert.js +++ b/src/utils/convert.js @@ -17,7 +17,7 @@ const flattenApiForInstitutionState = json => { otherLenderCode: json.otherLenderCode || -1, topHolderIdRssd: (json.topHolder && json.topHolder.idRssd) || -1, topHolderName: (json.topHolder && json.topHolder.name) || '', - quarterlyFiler: json.quarterlyFiler || false, + quarterlyFiler: !!json.quarterlyFiler, notes: '', prevNotes: json.notes || '', } @@ -50,7 +50,7 @@ const nestInstitutionStateForAPI = state => { name: state.topHolderName || '' }, hmdaFiler: false, - quarterlyFiler: state.quarterlyFiler === 'true', + quarterlyFiler: !!state.quarterlyFiler, quarterlyFilerHasFiledQ1: false, quarterlyFilerHasFiledQ2: false, quarterlyFilerHasFiledQ3: false,