Browse Source

test: cypress- revert drag drop reorder changes for PG

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/1274/head
Raju Udava 3 years ago
parent
commit
95173c1a08
  1. 29
      scripts/cypress/integration/common/1d_table_view_drag_drop_reorder.js

29
scripts/cypress/integration/common/1d_table_view_drag_drop_reorder.js

@ -2,7 +2,6 @@ import {
isTestSuiteActive, isTestSuiteActive,
isXcdb, isXcdb,
getProjectString, getProjectString,
isPostgres,
} from "../../support/page_objects/projectConstants"; } from "../../support/page_objects/projectConstants";
export const genTest = (apiType, dbType) => { export const genTest = (apiType, dbType) => {
@ -16,10 +15,10 @@ export const genTest = (apiType, dbType) => {
} }
/* /*
Original order of list items Original order of list items
Actor, Address, Category, City, Country, Customer, FIlm, FilmText, Language, Payment, Rental Staff Actor, Address, Category, City, Country, Customer, FIlm, FilmText, Language, Payment, Rental Staff
ActorInfo, CustomerList, FilmList, NiceButSlowerFilmList, SalesByFilmCategory, SalesByStore, StaffList ActorInfo, CustomerList, FilmList, NiceButSlowerFilmList, SalesByFilmCategory, SalesByStore, StaffList
*/ */
it(`Table & SQL View list, Drag/drop`, () => { it(`Table & SQL View list, Drag/drop`, () => {
// expand tree-view menu // expand tree-view menu
@ -33,10 +32,10 @@ export const genTest = (apiType, dbType) => {
// move Actor field down, above Staff (drag, drop) // move Actor field down, above Staff (drag, drop)
cy.get(".nc-child-draggable-icon-Actor").drag( cy.get(".nc-child-draggable-icon-Actor").drag(
".nc-child-draggable-icon-Film" ".nc-child-draggable-icon-Staff"
); );
validateTreeField(7, "Actor"); validateTreeField(12, "Actor");
// move ActorInfo (View) field up to first place (drag, drop) // move ActorInfo (View) field up to first place (drag, drop)
cy.get(".nc-child-draggable-icon-ActorInfo").drag( cy.get(".nc-child-draggable-icon-ActorInfo").drag(
@ -45,11 +44,11 @@ export const genTest = (apiType, dbType) => {
validateTreeField(1, "ActorInfo"); validateTreeField(1, "ActorInfo");
validateTreeField(2, "Address"); validateTreeField(2, "Address");
validateTreeField(8, "Actor"); validateTreeField(13, "Actor");
// restore ActorInfo field (drag, drop) // restore ActorInfo field (drag, drop)
cy.get(".nc-child-draggable-icon-ActorInfo").drag( cy.get(".nc-child-draggable-icon-ActorInfo").drag(
".nc-child-draggable-icon-Staff" ".nc-child-draggable-icon-Actor"
); );
// restore Actor field (drag, drop) // restore Actor field (drag, drop)
@ -59,15 +58,9 @@ export const genTest = (apiType, dbType) => {
validateTreeField(1, "Actor"); validateTreeField(1, "Actor");
validateTreeField(2, "Address"); validateTreeField(2, "Address");
if (isPostgres()) { validateTreeField(12, "Staff");
validateTreeField(17, "Staff"); validateTreeField(13, "ActorInfo");
validateTreeField(18, "ActorInfo"); validateTreeField(14, "CustomerList");
validateTreeField(19, "CustomerList");
} else {
validateTreeField(12, "Staff");
validateTreeField(13, "ActorInfo");
validateTreeField(14, "CustomerList");
}
// undo project-tree expand operation // undo project-tree expand operation
cy.get(".nc-project-tree") cy.get(".nc-project-tree")

Loading…
Cancel
Save