Browse Source

test/cypress: sort/filter menu operation corrections

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
feat/0523-export-schema
Raju Udava 3 years ago
parent
commit
a8cbd0cae8
  1. 13
      scripts/cypress/support/page_objects/mainPage.js

13
scripts/cypress/support/page_objects/mainPage.js

@ -297,12 +297,13 @@ export class _mainPage {
cy.snipActiveMenu("Menu_SortField"); cy.snipActiveMenu("Menu_SortField");
cy.get(".nc-sort-field-select div").first().click(); cy.get(".nc-sort-field-select div").first().click().type(field);
cy.snipActiveMenu("Menu_SortField_fieldSelection"); cy.snipActiveMenu("Menu_SortField_fieldSelection");
// cy.get(`.menuable__content__active .v-list-item:contains(${field})`) // cy.get(`.menuable__content__active .v-list-item:contains(${field})`)
// .first() // .first()
// .click(); // .click();
cy.getActiveMenu().find(`.nc-sort-fld-${field}`).click(); // cy.wait(3000)
cy.getActiveMenu().find(`.nc-sort-fld-${field}`).should('exist').click();
cy.get(".nc-sort-dir-select div").first().click(); cy.get(".nc-sort-dir-select div").first().click();
cy.snipActiveMenu("Menu_SortField_criteriaSelection"); cy.snipActiveMenu("Menu_SortField_criteriaSelection");
cy.get( cy.get(
@ -319,15 +320,15 @@ export class _mainPage {
filterField = (field, operation, value) => { filterField = (field, operation, value) => {
cy.get(".nc-filter-menu-btn").click(); cy.get(".nc-filter-menu-btn").click();
cy.wait(2000); // cy.wait(2000);
cy.contains("Add Filter").click(); cy.contains("Add Filter").click();
cy.wait(2000); // cy.wait(2000);
cy.snipActiveMenu("Menu_FilterField"); cy.snipActiveMenu("Menu_FilterField");
cy.get(".nc-filter-field-select").should("exist").last().click(); cy.get(".nc-filter-field-select").should("exist").last().click().type(field);;
cy.snipActiveMenu("Menu_FilterField-fieldSelect"); cy.snipActiveMenu("Menu_FilterField-fieldSelect");
cy.getActiveMenu().find(`.nc-filter-fld-${field}`).click(); cy.getActiveMenu().find(`.nc-filter-fld-${field}`).should('exist').click();
cy.get(".nc-filter-operation-select").should("exist").last().click(); cy.get(".nc-filter-operation-select").should("exist").last().click();
cy.snipActiveMenu("Menu_FilterField-operationSelect"); cy.snipActiveMenu("Menu_FilterField-operationSelect");

Loading…
Cancel
Save