Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #148 from cfpb/fix-flipping-qfiler-flag
Browse files Browse the repository at this point in the history
Fix Quarterly Filer flag incorrectly flipping to false on save
  • Loading branch information
BarakStout committed Oct 19, 2020
2 parents 8289fd2 + e08ea85 commit 47c453a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cypress/tests/integration/institution.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions src/utils/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '',
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 47c453a

Please sign in to comment.