|
|
@ -1,27 +1,49 @@ |
|
|
|
import { loginPage, projectsPage } from "../support/page_objects/navigation" |
|
|
|
import { loginPage, projectsPage } from "../support/page_objects/navigation" |
|
|
|
|
|
|
|
import { mainPage } from "../support/page_objects/mainPage" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// database
|
|
|
|
|
|
|
|
// validation details
|
|
|
|
|
|
|
|
// advSettings: left navigation bar (audit, metadata, auth, transient view modes)
|
|
|
|
|
|
|
|
// editSchema: create table, add/update/delete column
|
|
|
|
|
|
|
|
// editData: add/ update/ delete row, cell contents
|
|
|
|
|
|
|
|
// editComment: add comment
|
|
|
|
|
|
|
|
// shareView: right navigation bar (share options)
|
|
|
|
|
|
|
|
const roles = { |
|
|
|
|
|
|
|
owner: { |
|
|
|
|
|
|
|
name: 'owner', |
|
|
|
|
|
|
|
credentials: { username: 'user@nocodb.com', password: 'Password123.' }, |
|
|
|
|
|
|
|
validations: { advSettings: true, editSchema: true, editData: true, editComment: true, shareView: true } |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
creator: { |
|
|
|
|
|
|
|
name: 'creator', |
|
|
|
|
|
|
|
credentials: { username: 'creator@nocodb.com', password: 'Password123.' }, |
|
|
|
|
|
|
|
validations: { advSettings: true, editSchema: true, editData: true, editComment: true, shareView: true } |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
editor: { |
|
|
|
|
|
|
|
name: 'editor', |
|
|
|
|
|
|
|
credentials: { username: 'editor@nocodb.com', password: 'Password123.' }, |
|
|
|
|
|
|
|
validations: { advSettings: false, editSchema: false, editData: true, editComment: true, shareView: false } |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
commenter: { |
|
|
|
|
|
|
|
name: 'commenter', |
|
|
|
|
|
|
|
credentials: { username: 'commenter@nocodb.com', password: 'Password123.' }, |
|
|
|
|
|
|
|
validations: { advSettings: false, editSchema: false, editData: false, editComment: true, shareView: false } |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
viewer: { |
|
|
|
|
|
|
|
name: 'viewer', |
|
|
|
|
|
|
|
credentials: { username: 'viewer@nocodb.com', password: 'Password123.' }, |
|
|
|
|
|
|
|
validations: { advSettings: false, editSchema: false, editData: false, editComment: false, shareView: false } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const roleOwner = 0 |
|
|
|
|
|
|
|
const roleCreator = 1 |
|
|
|
|
|
|
|
const roleEditor = 2 |
|
|
|
|
|
|
|
const roleCommenter = 3 |
|
|
|
|
|
|
|
const roleViewer = 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const roleString = ['owner', 'creator', 'editor', 'commenter', 'viewer'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// to store URL links for new user (role based) Sign Up
|
|
|
|
|
|
|
|
let linkText = [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const userCredentials = [ |
|
|
|
|
|
|
|
{ username: 'user@nocodb.com', password: 'Password123.' }, |
|
|
|
|
|
|
|
{ username: 'creator@nocodb.com', password: 'Password123.' }, |
|
|
|
|
|
|
|
{ username: 'editor@nocodb.com', password: 'Password123.' }, |
|
|
|
|
|
|
|
{ username: 'commenter@nocodb.com', password: 'Password123.' }, |
|
|
|
|
|
|
|
{ username: 'viewer@nocodb.com', password: 'Password123.' }] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// add new user to specified role
|
|
|
|
// add new user to specified role
|
|
|
|
//
|
|
|
|
//
|
|
|
|
const addUser = (userCred, role) => { |
|
|
|
const addUser = (userCred, role) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let linkText |
|
|
|
|
|
|
|
|
|
|
|
// click on New User button, feed details
|
|
|
|
// click on New User button, feed details
|
|
|
|
cy.get('button:contains("New User")').first().click() |
|
|
|
cy.get('button:contains("New User")').first().click() |
|
|
|
cy.get('label:contains(Email)').next('input').type(userCred.username).trigger('input') |
|
|
|
cy.get('label:contains(Email)').next('input').type(userCred.username).trigger('input') |
|
|
@ -37,10 +59,10 @@ const addUser = (userCred, role) => { |
|
|
|
|
|
|
|
|
|
|
|
// get URL, invoke
|
|
|
|
// get URL, invoke
|
|
|
|
cy.getActiveModal().find('.v-alert').then(($obj) => { |
|
|
|
cy.getActiveModal().find('.v-alert').then(($obj) => { |
|
|
|
linkText[role] = $obj.text() |
|
|
|
linkText = $obj.text() |
|
|
|
cy.log(linkText[role]) |
|
|
|
cy.log(linkText) |
|
|
|
|
|
|
|
|
|
|
|
cy.visit(linkText[role]) |
|
|
|
cy.visit(linkText) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// SignUp is taken care under userRoleCreation()
|
|
|
|
// SignUp is taken care under userRoleCreation()
|
|
|
@ -50,20 +72,20 @@ const addUser = (userCred, role) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const userRoleCreation = (role) => { |
|
|
|
const userRoleCreation = (roleType) => { |
|
|
|
it(`User creation: ${roleString[role]}`, () => { |
|
|
|
it(`User creation: ${roleType}`, () => { |
|
|
|
|
|
|
|
|
|
|
|
loginPage.signIn(userCredentials[roleOwner]) |
|
|
|
loginPage.signIn(roles.owner.credentials) |
|
|
|
projectsPage.openProject('sakilaDb') |
|
|
|
projectsPage.openProject('sakilaDb') |
|
|
|
|
|
|
|
|
|
|
|
// Team & Auth tab is open by default
|
|
|
|
// Team & Auth tab is open by default
|
|
|
|
//
|
|
|
|
//
|
|
|
|
addUser(userCredentials[role], roleString[role]) |
|
|
|
addUser(roles[roleType].credentials, roleType) |
|
|
|
|
|
|
|
|
|
|
|
// Redirected to new URL, feed details
|
|
|
|
// Redirected to new URL, feed details
|
|
|
|
//
|
|
|
|
//
|
|
|
|
cy.get('input[type="text"]').type(userCredentials[role].username) |
|
|
|
cy.get('input[type="text"]').type(roles[roleType].credentials.username) |
|
|
|
cy.get('input[type="password"]').type(userCredentials[role].password) |
|
|
|
cy.get('input[type="password"]').type(roles[roleType].credentials.password) |
|
|
|
cy.get('button:contains("SIGN UP")').click() |
|
|
|
cy.get('button:contains("SIGN UP")').click() |
|
|
|
|
|
|
|
|
|
|
|
cy.url({ timeout: 6000 }).should('contain', '#/project') |
|
|
|
cy.url({ timeout: 6000 }).should('contain', '#/project') |
|
|
@ -73,15 +95,13 @@ const userRoleCreation = (role) => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
describe(`User role validation`, () => { |
|
|
|
describe('Test project creation, user creation', () => { |
|
|
|
|
|
|
|
|
|
|
|
let projectName = '' |
|
|
|
let projectName = '' |
|
|
|
|
|
|
|
|
|
|
|
// Create project & create different user-roles
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
it('Create Project', () => { |
|
|
|
it('Create Project', () => { |
|
|
|
|
|
|
|
|
|
|
|
loginPage.signUp(userCredentials[roleOwner]) |
|
|
|
loginPage.signUp(roles.owner.credentials) |
|
|
|
|
|
|
|
|
|
|
|
const projectParams = { dbType: 1, apiType: 0, name: 'sakilaDb' } |
|
|
|
const projectParams = { dbType: 1, apiType: 0, name: 'sakilaDb' } |
|
|
|
const databaseParams = { |
|
|
|
const databaseParams = { |
|
|
@ -94,21 +114,52 @@ describe(`User role validation`, () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
projectName = projectsPage.createProject(projectParams, databaseParams) |
|
|
|
projectName = projectsPage.createProject(projectParams, databaseParams) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
userRoleCreation(roleCreator) |
|
|
|
userRoleCreation('creator') |
|
|
|
userRoleCreation(roleEditor) |
|
|
|
userRoleCreation('editor') |
|
|
|
userRoleCreation(roleCommenter) |
|
|
|
userRoleCreation('commenter') |
|
|
|
userRoleCreation(roleViewer) |
|
|
|
userRoleCreation('viewer') |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const genTest = (roleType) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe(`User role validation`, () => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// project configuration settings
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
const advancedSettings = (roleType) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// let validationString = (true == roleValidation[roleIdx].advSettings) ? 'exist' : 'not.exist'
|
|
|
|
|
|
|
|
let validationString = (true == roles[roleType].validations.advSettings) ? 'exist' : 'not.exist' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// hardwired to be enabled for all roles
|
|
|
|
|
|
|
|
mainPage.navigationDraw(mainPage.AUDIT).should('exist') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mainPage.navigationDraw(mainPage.APPSTORE).should(validationString) |
|
|
|
|
|
|
|
mainPage.navigationDraw(mainPage.TEAM_N_AUTH).should(validationString) |
|
|
|
|
|
|
|
mainPage.navigationDraw(mainPage.PROJ_METADATA).should(validationString) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mainPage.navigationDraw(mainPage.ROLE_VIEW).should(validationString) |
|
|
|
|
|
|
|
if ('exist' == validationString) { |
|
|
|
|
|
|
|
mainPage.navigationDraw(mainPage.ROLE_VIEW).contains('editor') |
|
|
|
|
|
|
|
mainPage.navigationDraw(mainPage.ROLE_VIEW).contains('commenter') |
|
|
|
|
|
|
|
mainPage.navigationDraw(mainPage.ROLE_VIEW).contains('viewer') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cy.get('button:contains("New User")').should(validationString) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Schema related validations
|
|
|
|
// Schema related validations
|
|
|
|
// - Add/delete table
|
|
|
|
// - Add/delete table
|
|
|
|
// - Add/Update/delete column
|
|
|
|
// - Add/Update/delete column
|
|
|
|
//
|
|
|
|
//
|
|
|
|
const editSchema = (validationString) => { |
|
|
|
const editSchema = (roleType) => { |
|
|
|
|
|
|
|
|
|
|
|
let columnName = 'City' |
|
|
|
let columnName = 'City' |
|
|
|
|
|
|
|
let validationString = (true == roles[roleType].validations.editSchema) ? 'exist' : 'not.exist' |
|
|
|
|
|
|
|
|
|
|
|
// create table options
|
|
|
|
// create table options
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -133,12 +184,14 @@ describe(`User role validation`, () => { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Table data related validations
|
|
|
|
// Table data related validations
|
|
|
|
// - Add/delete/modify row
|
|
|
|
// - Add/delete/modify row
|
|
|
|
//
|
|
|
|
//
|
|
|
|
const editData = (validationString) => { |
|
|
|
const editData = (roleType) => { |
|
|
|
|
|
|
|
|
|
|
|
let columnName = 'City' |
|
|
|
let columnName = 'City' |
|
|
|
|
|
|
|
let validationString = (true == roles[roleType].validations.editData) ? 'exist' : 'not.exist' |
|
|
|
|
|
|
|
|
|
|
|
cy.openTableTab(columnName) |
|
|
|
cy.openTableTab(columnName) |
|
|
|
|
|
|
|
|
|
|
@ -149,6 +202,7 @@ describe(`User role validation`, () => { |
|
|
|
// update row option (right click)
|
|
|
|
// update row option (right click)
|
|
|
|
//
|
|
|
|
//
|
|
|
|
cy.get(`tbody > :nth-child(4) > [data-col="City"]`).rightclick() |
|
|
|
cy.get(`tbody > :nth-child(4) > [data-col="City"]`).rightclick() |
|
|
|
|
|
|
|
|
|
|
|
cy.get('.menuable__content__active').should(validationString) |
|
|
|
cy.get('.menuable__content__active').should(validationString) |
|
|
|
|
|
|
|
|
|
|
|
if (validationString == 'exist') { |
|
|
|
if (validationString == 'exist') { |
|
|
@ -162,7 +216,8 @@ describe(`User role validation`, () => { |
|
|
|
|
|
|
|
|
|
|
|
// update cell contents option using row expander should be enabled
|
|
|
|
// update cell contents option using row expander should be enabled
|
|
|
|
//
|
|
|
|
//
|
|
|
|
cy.get('.nc-row-expand-icon').eq(4).click({ force: true }) |
|
|
|
//cy.get('.nc-row-expand-icon').eq(4).click({ force: true })
|
|
|
|
|
|
|
|
cy.get('.v-input.row-checkbox').eq(4).next().next().click({ force: true }) |
|
|
|
cy.getActiveModal().find('button').contains('Save Row').should('exist') |
|
|
|
cy.getActiveModal().find('button').contains('Save Row').should('exist') |
|
|
|
cy.get('body').type('{esc}') |
|
|
|
cy.get('body').type('{esc}') |
|
|
|
|
|
|
|
|
|
|
@ -170,7 +225,8 @@ describe(`User role validation`, () => { |
|
|
|
else { |
|
|
|
else { |
|
|
|
// update cell contents option using row expander should be disabled
|
|
|
|
// update cell contents option using row expander should be disabled
|
|
|
|
//
|
|
|
|
//
|
|
|
|
cy.get('.nc-row-expand-icon').eq(4).click({ force: true }) |
|
|
|
//cy.get('.nc-row-expand-icon').eq(4).click({ force: true })
|
|
|
|
|
|
|
|
cy.get('.v-input.row-checkbox').eq(4).next().next().click({ force: true }) |
|
|
|
cy.getActiveModal().find('button:disabled').contains('Save Row').should('exist') |
|
|
|
cy.getActiveModal().find('button:disabled').contains('Save Row').should('exist') |
|
|
|
cy.get('body').type('{esc}') |
|
|
|
cy.get('body').type('{esc}') |
|
|
|
} |
|
|
|
} |
|
|
@ -180,54 +236,117 @@ describe(`User role validation`, () => { |
|
|
|
cy.get(`tbody > :nth-child(4) > [data-col="City"]`).dblclick().find('input').should(validationString) |
|
|
|
cy.get(`tbody > :nth-child(4) > [data-col="City"]`).dblclick().find('input').should(validationString) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
it('Validation: Owner', () => { |
|
|
|
|
|
|
|
loginPage.signIn(userCredentials[roleOwner]) |
|
|
|
|
|
|
|
projectsPage.openProject('sakilaDb') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
editSchema('exist') |
|
|
|
// read &/ update comment
|
|
|
|
editData('exist') |
|
|
|
// Viewer: only allowed to read
|
|
|
|
}) |
|
|
|
// Everyone else: read &/ update
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
const editComment = (roleType) => { |
|
|
|
|
|
|
|
|
|
|
|
it('Validation: Creator', () => { |
|
|
|
let columnName = 'City' |
|
|
|
loginPage.signIn(userCredentials[roleCreator]) |
|
|
|
let validationString = (true == roles[roleType].validations.editComment) ? 'Comment added successfully' : 'Not allowed' |
|
|
|
projectsPage.openProject('sakilaDb') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
editSchema('exist') |
|
|
|
cy.openTableTab(columnName) |
|
|
|
editData('exist') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it.only('Validation: editor', () => { |
|
|
|
// click on comment icon & type comment
|
|
|
|
loginPage.signIn(userCredentials[roleEditor]) |
|
|
|
//
|
|
|
|
projectsPage.openProject('sakilaDb') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
editSchema('not.exist') |
|
|
|
cy.get('.v-input.row-checkbox').eq(4).next().next().click({ force: true }) |
|
|
|
editData('exist') |
|
|
|
//cy.get('.nc-row-expand-icon').eq(4).click({ force: true })
|
|
|
|
}) |
|
|
|
cy.getActiveModal().find('.mdi-comment-multiple-outline').should('exist').click() |
|
|
|
|
|
|
|
cy.getActiveModal().find('.comment-box').type('Comment-1{enter}') |
|
|
|
|
|
|
|
|
|
|
|
it('Validation: commenter', () => { |
|
|
|
// Expected response:
|
|
|
|
loginPage.signIn(userCredentials[roleCommenter]) |
|
|
|
// Viewer: Not allowed
|
|
|
|
projectsPage.openProject('sakilaDb') |
|
|
|
// Everyone else: Comment added successfully
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
cy.get('body').contains(validationString, { timeout: 2000 }).should('exist') |
|
|
|
|
|
|
|
cy.get('body').type('{esc}') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
editSchema('not.exist') |
|
|
|
// right navigation menu bar
|
|
|
|
editData('not.exist') |
|
|
|
// Editor/Viewer/Commenter : can only view 'existing' views
|
|
|
|
}) |
|
|
|
// Rest: can create/edit
|
|
|
|
|
|
|
|
const viewMenu = (roleType) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let columnName = 'City' |
|
|
|
|
|
|
|
let navDrawListCnt = 2 |
|
|
|
|
|
|
|
let navDrawListItemCnt = 5 |
|
|
|
|
|
|
|
cy.openTableTab(columnName) |
|
|
|
|
|
|
|
let validationString = (true == roles[roleType].validations.shareView) ? 'exist' : 'not.exist' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// validate if Share button is visible at header tool bar
|
|
|
|
|
|
|
|
cy.get('header.v-toolbar').eq(0).find('button:contains("Share")').should(validationString) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Owner, Creator will have two navigation drawer (on each side of center panel)
|
|
|
|
|
|
|
|
if (validationString == 'exist') { |
|
|
|
|
|
|
|
navDrawListCnt = 4 |
|
|
|
|
|
|
|
navDrawListItemCnt = 16 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
cy.get('.v-navigation-drawer__content').eq(1).find('[role="list"]').should('have.length', navDrawListCnt) |
|
|
|
|
|
|
|
cy.get('.v-navigation-drawer__content').eq(1).find('.v-list-item').should('have.length', navDrawListItemCnt) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// redundant
|
|
|
|
|
|
|
|
// cy.get('.v-navigation-drawer__content').eq(1).find('.v-list-item').eq(0).contains('Views').should('exist')
|
|
|
|
|
|
|
|
// cy.get('.v-navigation-drawer__content').eq(1).find('.v-list-item').eq(1).contains('City').should('exist')
|
|
|
|
|
|
|
|
|
|
|
|
it('Validation: Viewer', () => { |
|
|
|
// cy.get(`.nc-create-grid-view`).should(validationString)
|
|
|
|
loginPage.signIn(userCredentials[roleViewer]) |
|
|
|
// cy.get(`.nc-create-gallery-view`).should(validationString)
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// Test suite
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] SignIn, Open project SakilaDb`, () => { |
|
|
|
|
|
|
|
loginPage.signIn(roles[roleType].credentials) |
|
|
|
projectsPage.openProject('sakilaDb') |
|
|
|
projectsPage.openProject('sakilaDb') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Left navigation menu, New User add`, () => { |
|
|
|
|
|
|
|
advancedSettings(roleType) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
editSchema('not.exist') |
|
|
|
it(`[${roles[roleType].name}] Schema: create table, add/modify/delete column`, () => { |
|
|
|
editData('not.exist') |
|
|
|
editSchema(roleType) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
it(`[${roles[roleType].name}] Data: add/modify/delete row, update cell contents`, (/*done*/) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// known issue: to be fixed
|
|
|
|
|
|
|
|
// right click raising alarm 'not allowed' for viewer
|
|
|
|
//
|
|
|
|
//
|
|
|
|
it('Delete Project', () => { |
|
|
|
// cy.on('uncaught:exception', (err, runnable) => {
|
|
|
|
projectsPage.deleteProject(projectName) |
|
|
|
// expect(err.message).to.include('Not allowed')
|
|
|
|
|
|
|
|
// done()
|
|
|
|
|
|
|
|
// return false
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (roleType != 'editor') |
|
|
|
|
|
|
|
editData(roleType) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// done()
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Comments: view/add`, () => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Fix me!
|
|
|
|
|
|
|
|
if (roleType != 'viewer') |
|
|
|
|
|
|
|
editComment(roleType) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Right navigation menu, share view`, () => { |
|
|
|
|
|
|
|
viewMenu(roleType) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
genTest('owner') |
|
|
|
|
|
|
|
genTest('creator') |
|
|
|
|
|
|
|
genTest('editor') |
|
|
|
|
|
|
|
genTest('commenter') |
|
|
|
|
|
|
|
genTest('viewer') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|