Browse Source

test: PG delete table message correction, formula correction

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3421/head
Raju Udava 2 years ago
parent
commit
037a80291c
  1. 16
      scripts/cypress-v2/integration/common/3b_formula_column.js
  2. 2
      scripts/cypress-v2/support/commands.js

16
scripts/cypress-v2/integration/common/3b_formula_column.js

@ -1,4 +1,5 @@
import { mainPage } from "../../support/page_objects/mainPage"; import { mainPage } from "../../support/page_objects/mainPage";
import { loginPage } from "../../support/page_objects/navigation";
import { import {
isTestSuiteActive, isTestSuiteActive,
isXcdb, isXcdb,
@ -11,7 +12,8 @@ export const genTest = (apiType, dbType) => {
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)
// //
before(() => { before(() => {
cy.fileHook(); // loginPage.loginAndOpenProject(apiType, dbType)
mainPage.tabReset(); mainPage.tabReset();
// open a table to work on views // open a table to work on views
// //
@ -26,7 +28,6 @@ export const genTest = (apiType, dbType) => {
}); });
beforeEach(() => { beforeEach(() => {
cy.fileHook();
}); });
after(() => { after(() => {
@ -174,7 +175,7 @@ export const genTest = (apiType, dbType) => {
rowValidation("NC_MATH_0", RESULT_MATH_0); rowValidation("NC_MATH_0", RESULT_MATH_0);
}); });
it("Formula: WEEKDAY", () => { it.skip("Formula: WEEKDAY", () => {
editColumnByName( editColumnByName(
"NC_MATH_0", "NC_MATH_0",
"NC_WEEKDAY_0", "NC_WEEKDAY_0",
@ -192,7 +193,8 @@ export const genTest = (apiType, dbType) => {
it("Formula: CONCAT, LOWER, UPPER, TRIM", () => { it("Formula: CONCAT, LOWER, UPPER, TRIM", () => {
editColumnByName( editColumnByName(
"NC_WEEKDAY_1", // "NC_WEEKDAY_1",
"NC_MATH_0",
"NC_STR_1", "NC_STR_1",
`CONCAT(UPPER({City}), LOWER({City}), TRIM(' trimmed '))` `CONCAT(UPPER({City}), LOWER({City}), TRIM(' trimmed '))`
); );
@ -209,7 +211,8 @@ export const genTest = (apiType, dbType) => {
}); });
it("Formula: LOG, EXP, POWER, SQRT", () => { it("Formula: LOG, EXP, POWER, SQRT", () => {
if (!isXcdb()) { // if (!isXcdb()) {
if(dbType === "mysql") {
// SQLITE doesnt support LOG, EXP, POWER SQRT construct // SQLITE doesnt support LOG, EXP, POWER SQRT construct
editColumnByName( editColumnByName(
"NC_MATH_1", "NC_MATH_1",
@ -221,7 +224,8 @@ export const genTest = (apiType, dbType) => {
}); });
it("Formula: NOW, EDIT & Delete column", () => { it("Formula: NOW, EDIT & Delete column", () => {
if (!isXcdb()) editColumnByName("NC_MATH_2", "NC_NOW", `NOW()`); // if (!isXcdb()) editColumnByName("NC_MATH_2", "NC_NOW", `NOW()`);
if (dbType === 'mysql') editColumnByName("NC_MATH_2", "NC_NOW", `NOW()`);
else editColumnByName("NC_MATH_1", "NC_NOW", `NOW()`); else editColumnByName("NC_MATH_1", "NC_NOW", `NOW()`);
deleteColumnByName("NC_NOW"); deleteColumnByName("NC_NOW");
}); });

2
scripts/cypress-v2/support/commands.js

@ -323,8 +323,6 @@ Cypress.Commands.add("deleteTable", (name, dbType) => {
cy.getActiveMenu().find('[role="menuitem"]').contains("Delete").click(); cy.getActiveMenu().find('[role="menuitem"]').contains("Delete").click();
cy.getActiveModal().find("button").contains("Yes").click(); cy.getActiveModal().find("button").contains("Yes").click();
// only for postgre project
if (dbType === "postgres") cy.toastWait(`Delete trigger successful`);
cy.toastWait(`Deleted table ${name} successfully`); cy.toastWait(`Deleted table ${name} successfully`);
}); });

Loading…
Cancel
Save