Browse Source

[test] cypress: User role creation support for linear execution of REST/GQL project

Signed-off-by: Raju Udava <sivadstala@gmail.com>
pull/700/head
Raju Udava 3 years ago
parent
commit
66fd3738fb
  1. 19
      cypress/integration/common/5a_user_role.js

19
cypress/integration/common/5a_user_role.js

@ -19,9 +19,18 @@ export const genTest = (type, xcdb) => {
const addUser = (user) => {
it(`RoleType: ${user.name}`, () => {
//let cred = { username: 'user4@nocodb.com', password: 'Password123.' }
//mainPage.addNewUserToProject(cred, user.name)
// for first project, users need to be added explicitly using "New User" button
// 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) + row header = 6
cy.get(`tr`).then((obj) => {
cy.log(obj.length)
if (obj.length == 6) {
mainPage.addExistingUserToProject(user.credentials.username, user.name)
} else {
mainPage.addNewUserToProject(user.credentials, user.name)
}
})
})
}
@ -30,9 +39,9 @@ export const genTest = (type, xcdb) => {
addUser(roles.commenter)
addUser(roles.viewer)
it(`Logging purpose`, () => {
cy.log(mainPage.roleURL)
})
// it(`Logging purpose`, () => {
// cy.log(mainPage.roleURL)
// })
})
const roleValidation = (roleType) => {

Loading…
Cancel
Save