Browse Source

test(cypress): fix xcdb extdb interop

Signed-off-by: Raju Udava <sivadstala@gmail.com>
pull/914/head
Raju Udava 3 years ago
parent
commit
88eedca598
  1. 67
      scripts/cypress/integration/common/1c_sql_view.js
  2. 7
      scripts/cypress/integration/common/3b_formula_column.js

67
scripts/cypress/integration/common/1c_sql_view.js

@ -16,39 +16,46 @@ export const genTest = (type, xcdb) => {
it(`XCDB: SQL View Column operations`, () => { it(`XCDB: SQL View Column operations`, () => {
// Open one of the views & verify validity of first two entries // Open one of the views & verify validity of first two entries
if (isXcdb()) {
cy.openViewsTab("CustomerList", 25);
cy.openViewsTab("CustomerList", 25); // Record-1 validation
mainPage.getCell(`ID`, 1).contains("1").should("exist");
mainPage.getCell(`Name`, 1).contains("MARY SMITH").should("exist");
mainPage
.getCell(`Address`, 1)
.contains("1913 Hanoi Way")
.should("exist");
mainPage.getCell(`ZipCode`, 1).contains("35200").should("exist");
// Record-1 validation // Record-2 validation
mainPage.getCell(`ID`, 1).contains("1").should("exist"); mainPage.getCell(`ID`, 2).contains("2").should("exist");
mainPage.getCell(`Name`, 1).contains("MARY SMITH").should("exist"); mainPage
mainPage.getCell(`Address`, 1).contains("1913 Hanoi Way").should("exist"); .getCell(`Name`, 2)
mainPage.getCell(`ZipCode`, 1).contains("35200").should("exist"); .contains("PATRICIA JOHNSON")
.should("exist");
// Record-2 validation mainPage
mainPage.getCell(`ID`, 2).contains("2").should("exist"); .getCell(`Address`, 2)
mainPage.getCell(`Name`, 2).contains("PATRICIA JOHNSON").should("exist"); .contains("1121 Loja Avenue")
mainPage .should("exist");
.getCell(`Address`, 2) mainPage.getCell(`ZipCode`, 2).contains("17886").should("exist");
.contains("1121 Loja Avenue")
.should("exist");
mainPage.getCell(`ZipCode`, 2).contains("17886").should("exist");
// Column operations: Hide
mainPage.hideField("ZipCode");
mainPage.unhideField("ZipCode");
// Column operations: Sort
mainPage.sortField("Name", "Z -> A");
mainPage.getCell(`Name`, 1).contains("ZACHARY HITE").should("exist");
mainPage.clearSort();
// Column operations: Filter
mainPage.filterField("Name", "is like", "MARY");
mainPage.getCell(`Name`, 1).contains("MARY SMITH").should("exist");
mainPage.filterReset();
cy.closeViewsTab("CustomerList"); // Column operations: Hide
mainPage.hideField(`ZipCode`);
mainPage.unhideField(`ZipCode`);
// Column operations: Sort
mainPage.sortField("Name", "Z -> A");
mainPage.getCell(`Name`, 1).contains("ZACHARY HITE").should("exist");
mainPage.clearSort();
// Column operations: Filter
mainPage.filterField("Name", "is like", "MARY");
mainPage.getCell(`Name`, 1).contains("MARY SMITH").should("exist");
mainPage.filterReset();
cy.closeViewsTab("CustomerList");
}
}); });
it(`SQL View Column operations`, () => { it(`SQL View Column operations`, () => {

7
scripts/cypress/integration/common/3b_formula_column.js

@ -202,15 +202,16 @@ export const genTest = (type, xcdb) => {
// SQLITE doesnt support LOG, EXP, POWER SQRT construct // SQLITE doesnt support LOG, EXP, POWER SQRT construct
editColumnByName( editColumnByName(
"NC_MATH_1", "NC_MATH_1",
"NC_MATH_1", "NC_MATH_2",
`LOG(CityId) + EXP(CityId) + POWER(CityId, 3) + SQRT(CountryId)` `LOG(CityId) + EXP(CityId) + POWER(CityId, 3) + SQRT(CountryId)`
); );
rowValidation("NC_MATH_1", RESULT_MATH_2); rowValidation("NC_MATH_2", RESULT_MATH_2);
} }
}); });
it("Formula: NOW, EDIT & Delete column", () => { it("Formula: NOW, EDIT & Delete column", () => {
editColumnByName("NC_MATH_1", "NC_NOW", `NOW()`); if (!isXcdb()) editColumnByName("NC_MATH_2", "NC_NOW", `NOW()`);
else editColumnByName("NC_MATH_1", "NC_NOW", `NOW()`);
deleteColumnByName("NC_NOW"); deleteColumnByName("NC_NOW");
}); });
}); });

Loading…
Cancel
Save