|
|
@ -174,51 +174,67 @@ export const genTest = (apiType, dbType) => { |
|
|
|
///////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////
|
|
|
|
// Test suite
|
|
|
|
// Test suite
|
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Left navigation menu, New User add`, () => { |
|
|
|
it.skip(`[${roles[roleType].name}] Left navigation menu, New User add`, () => { |
|
|
|
// project configuration settings
|
|
|
|
// project configuration settings
|
|
|
|
//
|
|
|
|
//
|
|
|
|
_advSettings(roleType, "userRole"); |
|
|
|
if (roleType !== "owner") { |
|
|
|
|
|
|
|
_advSettings(roleType, "userRole"); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Access control`, () => { |
|
|
|
it.skip(`[${roles[roleType].name}] Access control`, () => { |
|
|
|
// Access control validation
|
|
|
|
// Access control validation
|
|
|
|
//
|
|
|
|
//
|
|
|
|
_accessControl(roleType, "userRole"); |
|
|
|
if (roleType !== "owner") { |
|
|
|
|
|
|
|
_accessControl(roleType, "userRole"); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Schema: create table, add/modify/delete column`, () => { |
|
|
|
it.skip(`[${roles[roleType].name}] Schema: create table, add/modify/delete column`, () => { |
|
|
|
// Schema related validations
|
|
|
|
// Schema related validations
|
|
|
|
// - Add/delete table
|
|
|
|
// - Add/delete table
|
|
|
|
// - Add/Update/delete column
|
|
|
|
// - Add/Update/delete column
|
|
|
|
//
|
|
|
|
//
|
|
|
|
_editSchema(roleType, "userRole"); |
|
|
|
if (roleType !== "owner") { |
|
|
|
|
|
|
|
_editSchema(roleType, "userRole"); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Data: add/modify/delete row, update cell contents`, () => { |
|
|
|
it.skip(`[${roles[roleType].name}] Data: add/modify/delete row, update cell contents`, () => { |
|
|
|
// Table data related validations
|
|
|
|
// Table data related validations
|
|
|
|
// - Add/delete/modify row
|
|
|
|
// - Add/delete/modify row
|
|
|
|
//
|
|
|
|
//
|
|
|
|
_editData(roleType, "userRole"); |
|
|
|
if (roleType !== "owner") { |
|
|
|
|
|
|
|
_editData(roleType, "userRole"); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Comments: view/add`, () => { |
|
|
|
it.skip(`[${roles[roleType].name}] Comments: view/add`, () => { |
|
|
|
// read &/ update comment
|
|
|
|
// read &/ update comment
|
|
|
|
// Viewer: only allowed to read
|
|
|
|
// Viewer: only allowed to read
|
|
|
|
// Everyone else: read &/ update
|
|
|
|
// Everyone else: read &/ update
|
|
|
|
//
|
|
|
|
//
|
|
|
|
_editComment(roleType, "userRole"); |
|
|
|
if (roleType !== "owner") { |
|
|
|
|
|
|
|
_editComment(roleType, "userRole"); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Right navigation menu, share view`, () => { |
|
|
|
it.skip(`[${roles[roleType].name}] Right navigation menu, share view`, () => { |
|
|
|
// right navigation menu bar
|
|
|
|
// right navigation menu bar
|
|
|
|
// Editor/Viewer/Commenter : can only view 'existing' views
|
|
|
|
// Editor/Viewer/Commenter : can only view 'existing' views
|
|
|
|
// Rest: can create/edit
|
|
|
|
// Rest: can create/edit
|
|
|
|
_viewMenu(roleType, "userRole"); |
|
|
|
if (roleType !== "owner") { |
|
|
|
|
|
|
|
_viewMenu(roleType, "userRole"); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] Download files`, () => { |
|
|
|
it.skip(`[${roles[roleType].name}] Download files`, () => { |
|
|
|
// to be fixed
|
|
|
|
// to be fixed
|
|
|
|
if (roleType === "commenter" || roleType === "viewer") { |
|
|
|
if ( |
|
|
|
|
|
|
|
roleType === "commenter" || |
|
|
|
|
|
|
|
roleType === "viewer" || |
|
|
|
|
|
|
|
roleType === "owner" |
|
|
|
|
|
|
|
) { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// viewer & commenter doesn't contain hideField option in ncv2
|
|
|
|
// viewer & commenter doesn't contain hideField option in ncv2
|
|
|
|
// #ID, City, LastUpdate, City => Address, Country <= City, +
|
|
|
|
// #ID, City, LastUpdate, City => Address, Country <= City, +
|
|
|
@ -252,11 +268,15 @@ export const genTest = (apiType, dbType) => { |
|
|
|
mainPage.unhideField("LastUpdate"); |
|
|
|
mainPage.unhideField("LastUpdate"); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it(`[${roles[roleType].name}] App store accessiblility`, () => { |
|
|
|
|
|
|
|
cy.visit("/#/apps"); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// skip owner validation as rest of the cases pretty much cover the same
|
|
|
|
// skip owner validation as rest of the cases pretty much cover the same
|
|
|
|
// roleValidation('owner')
|
|
|
|
roleValidation("owner"); |
|
|
|
roleValidation("creator"); |
|
|
|
roleValidation("creator"); |
|
|
|
roleValidation("editor"); |
|
|
|
roleValidation("editor"); |
|
|
|
roleValidation("commenter"); |
|
|
|
roleValidation("commenter"); |
|
|
|