Browse Source

feat(cypress): Integrated ERD with menuWithoutSubmenuCount roleValidation test

pull/3612/head
Muhammed Mustafa 2 years ago
parent
commit
560a59b089
  1. 30
      scripts/cypress/integration/spec/roleValidation.spec.js

30
scripts/cypress/integration/spec/roleValidation.spec.js

@ -254,27 +254,27 @@ export function _viewMenu(roleType, mode) {
// Lock, Download, Upload // Lock, Download, Upload
let menuWithSubmenuCount = 3; let menuWithSubmenuCount = 3;
// share view list, webhook, api snippet, erd // share view list, webhook, api snippet, erd
let menuWithoutSubmenuCount = 4; let menuWithoutSubmenuCount = 4;
cy.openTableTab(columnName, 25); cy.openTableTab(columnName, 25);
let validationString = let validationString =
true === roles[roleType].validations.shareView ? "exist" : "not.exist"; true === roles[roleType].validations.shareView ? "exist" : "not.exist";
if (roleType === "editor") { if (roleType === "editor") {
// Download / Upload CSV // Download / Upload CSV
menuWithSubmenuCount = 2; menuWithSubmenuCount = 2;
// Get API Snippet and ERD // Get API Snippet and ERD
menuWithoutSubmenuCount = 2 menuWithoutSubmenuCount = 2;
// ERD // ERD
if(mode === 'baseShare') menuWithoutSubmenuCount = 1 if (mode === "baseShare") menuWithoutSubmenuCount = 1;
} else if (roleType === "commenter" || roleType === "viewer") { } else if (roleType === "commenter" || roleType === "viewer") {
// Download CSV & Download excel // Download CSV & Download excel
menuWithSubmenuCount = 0; menuWithSubmenuCount = 0;
// Get API Snippet and ERD // Get API Snippet and ERD
menuWithoutSubmenuCount = 2 menuWithoutSubmenuCount = 2;
} }
// view list field (default GRID view) // view list field (default GRID view)
cy.get(`.nc-view-item`).should("exist"); cy.get(`.nc-view-item`).should("exist");

Loading…
Cancel
Save