From 0c518ee7dbb80cd74d3b65148e56722f83796209 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 29 Aug 2022 14:31:25 +0530 Subject: [PATCH] test: cy role suite- default to new user creation, disable preview Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../integration/common/5a_user_role.js | 36 +++++++++++-------- .../cypress-v2/integration/test/restRoles.js | 2 +- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/scripts/cypress-v2/integration/common/5a_user_role.js b/scripts/cypress-v2/integration/common/5a_user_role.js index 4e7bc71e3a..c64bcddc40 100644 --- a/scripts/cypress-v2/integration/common/5a_user_role.js +++ b/scripts/cypress-v2/integration/common/5a_user_role.js @@ -57,20 +57,26 @@ export const genTest = (apiType, dbType) => { // for subsequent projects, they will be required to just add to this project // using ROW count to identify if its former or latter scenario // 5 users (owner, creator, editor, viewer, commenter) = 5 - cy.get(`.nc-user-row`).then((obj) => { - cy.log(obj.length); - if (obj.length == 5) { - mainPage.addExistingUserToProject( - user.credentials.username, - user.name - ); - } else { - mainPage.addNewUserToProject( - user.credentials, - user.name - ); - } - }); + // cy.get(`.nc-user-row`).then((obj) => { + // cy.log(obj.length); + // if (obj.length == 5) { + // mainPage.addExistingUserToProject( + // user.credentials.username, + // user.name + // ); + // } else { + // mainPage.addNewUserToProject( + // user.credentials, + // user.name + // ); + // } + // }); + + cy.get(`.nc-user-row`).should('exist') + mainPage.addNewUserToProject( + user.credentials, + user.name + ); }); }; @@ -79,7 +85,7 @@ export const genTest = (apiType, dbType) => { addUser(roles.commenter); addUser(roles.viewer); - // Access contrl list- configuration + // Access control list- configuration // it(`Access control list- configuration`, () => { mainPage.closeMetaTab(); diff --git a/scripts/cypress-v2/integration/test/restRoles.js b/scripts/cypress-v2/integration/test/restRoles.js index f6c8172414..0be838464e 100644 --- a/scripts/cypress-v2/integration/test/restRoles.js +++ b/scripts/cypress-v2/integration/test/restRoles.js @@ -11,7 +11,7 @@ const nocoTestSuite = (apiType, dbType) => { t01.genTest(apiType, dbType); t5a.genTest(apiType, dbType); - t5b.genTest(apiType, dbType); + // t5b.genTest(apiType, dbType); }; nocoTestSuite("rest", "mysql");