From 949a768967a9e19a8b2e7b121b67bec44fec8bab Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Wed, 21 Sep 2022 12:30:34 +0530 Subject: [PATCH] fix: Integrated ERD and new tab name in settings modal in roleValidation test of restRole tests --- .../integration/spec/roleValidation.spec.js | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/cypress/integration/spec/roleValidation.spec.js b/scripts/cypress/integration/spec/roleValidation.spec.js index 56b71fa398..4d8f92f125 100644 --- a/scripts/cypress/integration/spec/roleValidation.spec.js +++ b/scripts/cypress/integration/spec/roleValidation.spec.js @@ -41,7 +41,7 @@ export function _advSettings(roleType, mode) { cy.get(`[data-menu-id="teamAndAuth"]`).should("exist"); cy.get(`[data-menu-id="appStore"]`).should("exist"); - cy.get(`[data-menu-id="metaData"]`).should("exist"); + cy.get(`[data-menu-id="projMetaData"]`).should("exist"); cy.get(`[data-menu-id="audit"]`).should("exist"); settingsPage.closeMenu(); @@ -254,25 +254,26 @@ export function _viewMenu(roleType, mode) { // Lock, Download, Upload let menuWithSubmenuCount = 3; - // share view list, webhook - let menuWithoutSubmenuCount = 3; + // share view list, webhook, api snippet, erd + let menuWithoutSubmenuCount = 4; cy.openTableTab(columnName, 25); let validationString = true === roles[roleType].validations.shareView ? "exist" : "not.exist"; - if (roleType === "editor") { - // Download / Upload CSV - menuWithSubmenuCount = 2; - // Get API Snippet - menuWithoutSubmenuCount = 1; - if (mode === "baseShare") menuWithoutSubmenuCount = 0; - } else if (roleType === "commenter" || roleType === "viewer") { - // Download CSV & Download excel - menuWithSubmenuCount = 0; - menuWithoutSubmenuCount = 2; - } + if (roleType === "editor") { + // Download / Upload CSV + menuWithSubmenuCount = 2; + // Get API Snippet and ERD + menuWithoutSubmenuCount = 2 + if(mode === 'baseShare') menuWithoutSubmenuCount = 0 + } else if (roleType === "commenter" || roleType === "viewer") { + // Download CSV & Download excel + menuWithSubmenuCount = 0; + // Get API Snippet and ERD + menuWithoutSubmenuCount = 2 + } // view list field (default GRID view) cy.get(`.nc-view-item`).should("exist");