Browse Source

test(cypress): suite/roles align with UI changes

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/962/head
Raju Udava 3 years ago
parent
commit
4d2d060ef9
  1. 20
      scripts/cypress/integration/spec/roleValidation.spec.js

20
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");

Loading…
Cancel
Save