From 8b63105ffb9b30bee19a924c8c64cde8a4f2b198 Mon Sep 17 00:00:00 2001 From: Meissa Dia Date: Sat, 10 Oct 2020 21:09:51 -0600 Subject: [PATCH 1/2] Fix Quarterly Filer flag incorrectly flipping to false on save --- src/utils/convert.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, From e08ea85ab5548efe84b0fdfd29626e0199f6b966 Mon Sep 17 00:00:00 2001 From: Meissa Dia Date: Sat, 17 Oct 2020 01:23:51 -0600 Subject: [PATCH 2/2] Cleanup Institutions test file --- cypress/tests/integration/institution.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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")