Browse Source

test/cypress: grid virtual cell validation

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/2526/head
Raju Udava 2 years ago
parent
commit
0665515d79
  1. 42
      scripts/cypress/integration/common/2a_table_with_belongs_to_colulmn.js
  2. 12
      scripts/cypress/integration/common/2b_table_with_m2m_column.js

42
scripts/cypress/integration/common/2a_table_with_belongs_to_colulmn.js

@ -11,7 +11,7 @@ export const genTest = (apiType, dbType) => {
});
after(() => {
cy.closeTableTab("Country");
cy.closeTableTab("City");
});
it("Table column header, URL validation", () => {
@ -21,7 +21,27 @@ export const genTest = (apiType, dbType) => {
cy.url().should("contain", `name=Country`);
});
it("Expand belongs-to column", () => {
it("Grid cell chip content validation", () => {
// grid cell content validation
mainPage.getCell("City List", 1)
.find('.nc-virtual-cell > .v-lazy > .d-flex > .chips')
.contains("Kabul")
.should('exist');
mainPage.getCell("City List", 2)
.find('.nc-virtual-cell > .v-lazy > .d-flex > .chips')
.contains("Batna")
.should('exist');
mainPage.getCell("City List", 2)
.find('.nc-virtual-cell > .v-lazy > .d-flex > .chips')
.contains("Bchar")
.should('exist');
mainPage.getCell("City List", 2)
.find('.nc-virtual-cell > .v-lazy > .d-flex > .chips')
.contains("Skikda")
.should('exist');
})
it("Expand has-many column", () => {
// expand first row
cy.get('td[data-col="City List"] div:visible', {
timeout: 12000,
@ -66,6 +86,24 @@ export const genTest = (apiType, dbType) => {
});
});
});
it("Belongs to column, validate", () => {
cy.closeTableTab("Country");
cy.openTableTab("City", 25);
cy.get(`.project-tab:contains(City):visible`).should("exist");
cy.url().should("contain", `name=City`);
// grid cell content validation
mainPage.getCell("Country", 1)
.find('.nc-virtual-cell > .v-lazy > .d-flex > .chips')
.contains("Spain")
.should('exist');
mainPage.getCell("Country", 2)
.find('.nc-virtual-cell > .v-lazy > .d-flex > .chips')
.contains("Saudi Arabia")
.should('exist');
})
});
};

12
scripts/cypress/integration/common/2b_table_with_m2m_column.js

@ -21,6 +21,18 @@ export const genTest = (apiType, dbType) => {
cy.url().should("contain", `name=Actor`);
});
it("M2m chip content validation on grid", () => {
// grid m2m content validation
mainPage.getCell("Film List", 1)
.find('.nc-virtual-cell > .v-lazy > .d-flex > .chips')
.contains("ACADEMY DINOSAUR")
.should('exist');
mainPage.getCell("Film List", 1)
.find('.nc-virtual-cell > .v-lazy > .d-flex > .chips')
.contains("ANACONDA CONFESSIONS")
.should('exist');
});
it("Expand m2m column", () => {
// expand first row
cy.get('td[data-col="Film List"] div', { timeout: 12000 })

Loading…
Cancel
Save