-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6888 from ChurchCRM/6887-bug-csvimport-fails-when…
…-importing-birthdate-if-not-all-records-have-birthdate Have GetAge() return -1 if Year is null, and fix return type
- Loading branch information
Showing
3 changed files
with
39 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ImportTest,hasBday,"123 Main St", Downtown, TX, 77777,myBday@example.com,2001-07-04,888-555-1212 | ||
ImportTest,noYrBday,"123 Main St", Downtown, TX, 77777,noYrBday@example.com,0000-07-04,888-555-1212 | ||
ImportTest,noBday,"123 Main St", Downtown, TX, 77777,noBday@example.com,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
context('CSVImport', () => { | ||
it('Verify CSV Import', () => { | ||
cy.loginAdmin('CSVImport.php'); | ||
cy.get('#CSVFileChooser').selectFile('cypress/data/test_import.csv') | ||
cy.get('#UploadCSVBtn').click(); | ||
cy.contains('Total number of rows in the CSV file:3'); | ||
// It is not clear why, but it seems that force:true was needed to get the selections to work | ||
cy.get('#SelField0').select("Last Name",{force:true}); | ||
cy.get('#SelField1').select("First Name",{force:true}); | ||
cy.get('#SelField2').select("Address 1",{force:true}); | ||
cy.get('#SelField3').select("City",{force:true}); | ||
cy.get('#SelField4').select("State",{force:true}); | ||
cy.get('#SelField5').select("Zip",{force:true}); | ||
cy.get('#SelField6').select("Email",{force:true}); | ||
cy.get('#SelField7').select("Birth Date",{force:true}); | ||
cy.get('#SelField8').select("Home Phone",{force:true}); | ||
// Now that we have mapped the right fields, do the import | ||
cy.get('#DoImportBtn').click(); | ||
cy.contains('Data import successful.'); | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters