From 4d2d060ef976a2d07cd3b1577d22d9130a7f7918 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 17 Jan 2022 23:27:13 +0530 Subject: [PATCH] test(cypress): suite/roles align with UI changes Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../integration/spec/roleValidation.spec.js | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/cypress/integration/spec/roleValidation.spec.js b/scripts/cypress/integration/spec/roleValidation.spec.js index d1cb2ade9b..873b061ce8 100644 --- a/scripts/cypress/integration/spec/roleValidation.spec.js +++ b/scripts/cypress/integration/spec/roleValidation.spec.js @@ -169,6 +169,7 @@ export function _editComment(roleType, previewMode) { export function _viewMenu(roleType, previewMode) { let columnName = "City"; let navDrawListCnt = 2; + let actionsMenuItemsCnt = 1; cy.openTableTab(columnName, 25); @@ -183,7 +184,8 @@ export function _viewMenu(roleType, previewMode) { // Owner, Creator will have two navigation drawer (on each side of center panel) if (roleType == "owner" || roleType == "creator") { - navDrawListCnt = 4; + navDrawListCnt = 3; + actionsMenuItemsCnt = 4; } cy.get(".v-navigation-drawer__content") @@ -200,8 +202,16 @@ export function _viewMenu(roleType, previewMode) { cy.get(`.nc-create-form-view`).should(validationString); // share view & automations, exists only for owner/creator - cy.get(`.nc-share-view`).should(validationString); - cy.get(`.nc-automations`).should(validationString); + // cy.get(`.nc-share-view`).should(validationString); + // cy.get(`.nc-automations`).should(validationString); + // mainPage.shareView().should(validationString); + // mainPage.automations().should(validationString); + + // fix me! disabled for now + // cy.get('.nc-btn-share-view').should(validationString); + + cy.get('.nc-actions-menu-btn').click(); + cy.getActiveMenu().find('[role="menuitem"]').should("have.length", actionsMenuItemsCnt); } export function _topRightMenu(roleType, previewMode) { @@ -209,8 +219,8 @@ export function _topRightMenu(roleType, previewMode) { true == roles[roleType].validations.shareView ? "exist" : "not.exist"; cy.get(".nc-topright-menu").find(".nc-menu-share").should(validationString); - cy.get(".nc-topright-menu").find(".nc-menu-theme").should("exist"); - cy.get(".nc-topright-menu").find(".nc-menu-dark-theme").should("exist"); + // cy.get(".nc-topright-menu").find(".nc-menu-theme").should("exist"); + // cy.get(".nc-topright-menu").find(".nc-menu-dark-theme").should("exist"); cy.get(".nc-topright-menu").find(".nc-menu-translate").should("exist"); cy.get(".nc-topright-menu").find(".nc-menu-account").should("exist"); cy.get(".nc-topright-menu").find(".nc-menu-alert").should("exist");