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. 17
      scripts/cypress/integration/common/1c_sql_view.js
  2. 7
      scripts/cypress/integration/common/3b_formula_column.js

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

@ -16,18 +16,24 @@ export const genTest = (type, xcdb) => {
it(`XCDB: SQL View Column operations`, () => {
// Open one of the views & verify validity of first two entries
if (isXcdb()) {
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(`Address`, 1)
.contains("1913 Hanoi Way")
.should("exist");
mainPage.getCell(`ZipCode`, 1).contains("35200").should("exist");
// Record-2 validation
mainPage.getCell(`ID`, 2).contains("2").should("exist");
mainPage.getCell(`Name`, 2).contains("PATRICIA JOHNSON").should("exist");
mainPage
.getCell(`Name`, 2)
.contains("PATRICIA JOHNSON")
.should("exist");
mainPage
.getCell(`Address`, 2)
.contains("1121 Loja Avenue")
@ -35,8 +41,8 @@ export const genTest = (type, xcdb) => {
mainPage.getCell(`ZipCode`, 2).contains("17886").should("exist");
// Column operations: Hide
mainPage.hideField("ZipCode");
mainPage.unhideField("ZipCode");
mainPage.hideField(`ZipCode`);
mainPage.unhideField(`ZipCode`);
// Column operations: Sort
mainPage.sortField("Name", "Z -> A");
@ -49,6 +55,7 @@ export const genTest = (type, xcdb) => {
mainPage.filterReset();
cy.closeViewsTab("CustomerList");
}
});
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
editColumnByName(
"NC_MATH_1",
"NC_MATH_1",
"NC_MATH_2",
`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", () => {
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");
});
});

Loading…
Cancel
Save