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