From 560a59b0891d9519a7f7e94fcda9e25514e69761 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Wed, 21 Sep 2022 14:44:10 +0530 Subject: [PATCH] feat(cypress): Integrated ERD with menuWithoutSubmenuCount roleValidation test --- .../integration/spec/roleValidation.spec.js | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/cypress/integration/spec/roleValidation.spec.js b/scripts/cypress/integration/spec/roleValidation.spec.js index 4edf81f94b..e245a63649 100644 --- a/scripts/cypress/integration/spec/roleValidation.spec.js +++ b/scripts/cypress/integration/spec/roleValidation.spec.js @@ -254,27 +254,27 @@ export function _viewMenu(roleType, mode) { // Lock, Download, Upload let menuWithSubmenuCount = 3; - // share view list, webhook, api snippet, erd - let menuWithoutSubmenuCount = 4; + // 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 and ERD - menuWithoutSubmenuCount = 2 - // ERD - if(mode === 'baseShare') menuWithoutSubmenuCount = 1 - } else if (roleType === "commenter" || roleType === "viewer") { - // Download CSV & Download excel - menuWithSubmenuCount = 0; - // Get API Snippet and ERD - menuWithoutSubmenuCount = 2 - } + if (roleType === "editor") { + // Download / Upload CSV + menuWithSubmenuCount = 2; + // Get API Snippet and ERD + menuWithoutSubmenuCount = 2; + // ERD + if (mode === "baseShare") menuWithoutSubmenuCount = 1; + } 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");