Browse Source

test: cy role suite- default to new user creation, disable preview

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3387/head
Raju Udava 2 years ago
parent
commit
0c518ee7db
  1. 28
      scripts/cypress-v2/integration/common/5a_user_role.js
  2. 2
      scripts/cypress-v2/integration/test/restRoles.js

28
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 // for subsequent projects, they will be required to just add to this project
// using ROW count to identify if its former or latter scenario // using ROW count to identify if its former or latter scenario
// 5 users (owner, creator, editor, viewer, commenter) = 5 // 5 users (owner, creator, editor, viewer, commenter) = 5
cy.get(`.nc-user-row`).then((obj) => { // cy.get(`.nc-user-row`).then((obj) => {
cy.log(obj.length); // cy.log(obj.length);
if (obj.length == 5) { // if (obj.length == 5) {
mainPage.addExistingUserToProject( // mainPage.addExistingUserToProject(
user.credentials.username, // user.credentials.username,
user.name // user.name
); // );
} else { // } else {
// mainPage.addNewUserToProject(
// user.credentials,
// user.name
// );
// }
// });
cy.get(`.nc-user-row`).should('exist')
mainPage.addNewUserToProject( mainPage.addNewUserToProject(
user.credentials, user.credentials,
user.name user.name
); );
}
});
}); });
}; };
@ -79,7 +85,7 @@ export const genTest = (apiType, dbType) => {
addUser(roles.commenter); addUser(roles.commenter);
addUser(roles.viewer); addUser(roles.viewer);
// Access contrl list- configuration // Access control list- configuration
// //
it(`Access control list- configuration`, () => { it(`Access control list- configuration`, () => {
mainPage.closeMetaTab(); mainPage.closeMetaTab();

2
scripts/cypress-v2/integration/test/restRoles.js

@ -11,7 +11,7 @@ const nocoTestSuite = (apiType, dbType) => {
t01.genTest(apiType, dbType); t01.genTest(apiType, dbType);
t5a.genTest(apiType, dbType); t5a.genTest(apiType, dbType);
t5b.genTest(apiType, dbType); // t5b.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", "mysql"); nocoTestSuite("rest", "mysql");

Loading…
Cancel
Save