|
|
|
@ -151,17 +151,25 @@ export const genTest = (type, xcdb) => {
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
it(`Share ${viewType.toUpperCase()} view : verify download CSV`, () => { |
|
|
|
|
// expected output, statically configured
|
|
|
|
|
let storedRecords = [ |
|
|
|
|
`Address,District,PostalCode,Phone,Location,LastUpdate,Address => Customer,Address => Staff,City <= Address,Address <=> Staff`, |
|
|
|
|
`1013 Tabuk Boulevard,West Bengali,96203,158399646978,[object Object],2014-09-25T17:01:19.000Z,2,,Kanchrapara,`, |
|
|
|
|
`1892 Nabereznyje Telny Lane,Tutuila,28396,478229987054,[object Object],2014-09-25T17:00:02.000Z,2,,Tafuna,`, |
|
|
|
|
`1993 Tabuk Lane,Tamil Nadu,64221,648482415405,[object Object],2014-09-25T17:01:27.000Z,2,,Tambaram,`, |
|
|
|
|
`1661 Abha Drive,Tamil Nadu,14400,270456873752,[object Object],2014-09-25T17:01:23.000Z,1,,Pudukkottai,` |
|
|
|
|
] |
|
|
|
|
mainPage.hideUnhideField('LastUpdate') |
|
|
|
|
const verifyCsv = (retrievedRecords) => { |
|
|
|
|
// expected output, statically configured
|
|
|
|
|
let storedRecords = [ |
|
|
|
|
`Address,District,PostalCode,Phone,Location,Address => Customer,Address => Staff,City <= Address,Address <=> Staff`, |
|
|
|
|
`1013 Tabuk Boulevard,West Bengali,96203,158399646978,[object Object],2,,Kanchrapara,`, |
|
|
|
|
`1892 Nabereznyje Telny Lane,Tutuila,28396,478229987054,[object Object],2,,Tafuna,`, |
|
|
|
|
`1993 Tabuk Lane,Tamil Nadu,64221,648482415405,[object Object],2,,Tambaram,`, |
|
|
|
|
`1661 Abha Drive,Tamil Nadu,14400,270456873752,[object Object],1,,Pudukkottai,` |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < storedRecords.length; i++) { |
|
|
|
|
expect(retrievedRecords[i]).to.be.equal(storedRecords[i]) |
|
|
|
|
} |
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// download & verify
|
|
|
|
|
mainPage.downloadAndVerifyCsv(`Address_exported_1.csv`, storedRecords) |
|
|
|
|
mainPage.downloadAndVerifyCsv(`Address_exported_1.csv`, verifyCsv) |
|
|
|
|
mainPage.hideUnhideField('LastUpdate') |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// it(`Share ${viewType} view generate URL with all fields enabled`, () => {
|
|
|
|
@ -289,12 +297,21 @@ export const genTest = (type, xcdb) => {
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
it(`Share ${viewType.toUpperCase()} view : verify download CSV after local filter`, () => { |
|
|
|
|
let storedRecords = [ |
|
|
|
|
`Address,District,PostalCode,Phone,Location,LastUpdate,Address => Customer,Address => Staff,City <= Address,Address <=> Staff`, |
|
|
|
|
`1993 Tabuk Lane,Tamil Nadu,64221,648482415405,[object Object],2014-09-25T17:01:27.000Z,2,,Tambaram,`, |
|
|
|
|
`1661 Abha Drive,Tamil Nadu,14400,270456873752,[object Object],2014-09-25T17:01:23.000Z,1,,Pudukkottai,` |
|
|
|
|
] |
|
|
|
|
mainPage.downloadAndVerifyCsv(`Address_exported_1.csv`, storedRecords) |
|
|
|
|
mainPage.hideUnhideField('LastUpdate') |
|
|
|
|
const verifyCsv = (retrievedRecords) => { |
|
|
|
|
// expected output, statically configured
|
|
|
|
|
let storedRecords = [ |
|
|
|
|
`Address,District,PostalCode,Phone,Location,Address => Customer,Address => Staff,City <= Address,Address <=> Staff`, |
|
|
|
|
`1993 Tabuk Lane,Tamil Nadu,64221,648482415405,[object Object],2,,Tambaram,`, |
|
|
|
|
`1661 Abha Drive,Tamil Nadu,14400,270456873752,[object Object],1,,Pudukkottai,` |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < storedRecords.length; i++) { |
|
|
|
|
expect(retrievedRecords[i]).to.be.equal(storedRecords[i]) |
|
|
|
|
} |
|
|
|
|
}
|
|
|
|
|
mainPage.downloadAndVerifyCsv(`Address_exported_1.csv`, verifyCsv) |
|
|
|
|
mainPage.hideUnhideField('LastUpdate') |
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
it(`Share ${viewType.toUpperCase()} view : Delete Filter`, () => { |
|
|
|
|