|
|
@ -42,9 +42,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
before(() => { |
|
|
|
before(() => { |
|
|
|
// open a table to work on views
|
|
|
|
// open a table to work on views
|
|
|
|
//
|
|
|
|
//
|
|
|
|
cy.openTableTab('Address'); |
|
|
|
cy.openTableTab('Address', 25); |
|
|
|
// wait for page rendering to complete
|
|
|
|
|
|
|
|
cy.get('.nc-grid-row').should('have.length', 25) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cy.saveLocalStorage() |
|
|
|
cy.saveLocalStorage() |
|
|
|
}) |
|
|
|
}) |
|
|
@ -82,7 +80,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
|
|
|
|
|
|
|
|
it(`Share ${viewType.toUpperCase()} hide, sort, filter & verify`, () => { |
|
|
|
it(`Share ${viewType.toUpperCase()} hide, sort, filter & verify`, () => { |
|
|
|
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Address1').click() |
|
|
|
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Address1').click() |
|
|
|
mainPage.hideUnhideField('Address2') |
|
|
|
mainPage.hideField('Address2') |
|
|
|
mainPage.sortField('District', 'Z -> A') |
|
|
|
mainPage.sortField('District', 'Z -> A') |
|
|
|
mainPage.filterField('Address', 'is like', 'Ab')
|
|
|
|
mainPage.filterField('Address', 'is like', 'Ab')
|
|
|
|
generateViewLink('combined') |
|
|
|
generateViewLink('combined') |
|
|
@ -139,7 +137,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it(`Share ${viewType.toUpperCase()} view : verify download CSV`, () => { |
|
|
|
it(`Share ${viewType.toUpperCase()} view : verify download CSV`, () => { |
|
|
|
mainPage.hideUnhideField('LastUpdate') |
|
|
|
mainPage.hideField('LastUpdate') |
|
|
|
const verifyCsv = (retrievedRecords) => { |
|
|
|
const verifyCsv = (retrievedRecords) => { |
|
|
|
// expected output, statically configured
|
|
|
|
// expected output, statically configured
|
|
|
|
let storedRecords = [ |
|
|
|
let storedRecords = [ |
|
|
@ -162,7 +160,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
|
|
|
|
|
|
|
|
// download & verify
|
|
|
|
// download & verify
|
|
|
|
mainPage.downloadAndVerifyCsv(`Address_exported_1.csv`, verifyCsv) |
|
|
|
mainPage.downloadAndVerifyCsv(`Address_exported_1.csv`, verifyCsv) |
|
|
|
mainPage.hideUnhideField('LastUpdate') |
|
|
|
mainPage.unhideField('LastUpdate') |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it(`Share ${viewType.toUpperCase()} view : Disable sort`, () => { |
|
|
|
it(`Share ${viewType.toUpperCase()} view : Disable sort`, () => { |
|
|
@ -186,7 +184,7 @@ 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`, () => { |
|
|
|
mainPage.hideUnhideField('LastUpdate') |
|
|
|
mainPage.hideField('LastUpdate') |
|
|
|
const verifyCsv = (retrievedRecords) => { |
|
|
|
const verifyCsv = (retrievedRecords) => { |
|
|
|
// expected output, statically configured
|
|
|
|
// expected output, statically configured
|
|
|
|
let storedRecords = [ |
|
|
|
let storedRecords = [ |
|
|
@ -208,7 +206,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mainPage.downloadAndVerifyCsv(`Address_exported_1.csv`, verifyCsv) |
|
|
|
mainPage.downloadAndVerifyCsv(`Address_exported_1.csv`, verifyCsv) |
|
|
|
mainPage.hideUnhideField('LastUpdate') |
|
|
|
mainPage.unhideField('LastUpdate') |
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
it(`Share ${viewType.toUpperCase()} view : Delete Filter`, () => { |
|
|
|
it(`Share ${viewType.toUpperCase()} view : Delete Filter`, () => { |
|
|
@ -278,9 +276,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
describe(`${type.toUpperCase()} api - Grid view/ row-column update verification`, () => { |
|
|
|
describe(`${type.toUpperCase()} api - Grid view/ row-column update verification`, () => { |
|
|
|
before(() => { |
|
|
|
before(() => { |
|
|
|
// Address table has belongs to, has many & many-to-many
|
|
|
|
// Address table has belongs to, has many & many-to-many
|
|
|
|
cy.openTableTab('Country') |
|
|
|
cy.openTableTab('Country', 25) |
|
|
|
// wait for page rendering to complete
|
|
|
|
|
|
|
|
cy.get('.nc-grid-row').should('have.length', 25) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cy.saveLocalStorage() |
|
|
|
cy.saveLocalStorage() |
|
|
|
// store base URL- to re-visit and delete form view later
|
|
|
|
// store base URL- to re-visit and delete form view later
|
|
|
|