mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-3427] Remove About tab when it's not useful (#1491)
* [ACA-3427] Remove About tab when it's not useful * Add unit tests for isLibraryManager rule * Fix e2e tests * Fix e2e tests and add rule to docs * Fix e2e tests
This commit is contained in:
@@ -475,4 +475,34 @@ describe('app.evaluators', () => {
|
||||
expect(app.canShowLogout(context)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isLibraryManager', () => {
|
||||
it('should return true when role is SiteManager', () => {
|
||||
const context: any = {
|
||||
selection: {
|
||||
library: {
|
||||
entry: {
|
||||
role: 'SiteManager'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isLibraryManager(context)).toBe(true);
|
||||
});
|
||||
|
||||
it('should return false when role is different than SiteManager', () => {
|
||||
const context: any = {
|
||||
selection: {
|
||||
library: {
|
||||
entry: {
|
||||
role: 'SiteCollaborator'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isLibraryManager(context)).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user