mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-9158] Remove 'View Details' button from node Details page (#4351)
* [ACS-9158] Remove 'View Details' button from node Details page * [ACS-9158] remove redundant onDestroy$ * cr fix
This commit is contained in:
committed by
GitHub
parent
c799049790
commit
4751dcd12c
@@ -1412,16 +1412,19 @@ describe('app.evaluators', () => {
|
||||
expect(app.canShowInfoDrawer(context)).toBeFalse();
|
||||
});
|
||||
|
||||
it('should return false when user is in libraries or trashcan', () => {
|
||||
it('should return false when user is in libraries or trashcan or details', () => {
|
||||
context.selection.isEmpty = false;
|
||||
context.navigation.url = '/trashcan/test';
|
||||
expect(app.canShowInfoDrawer(context)).toBeFalse();
|
||||
|
||||
context.navigation.url = '/test/libraries';
|
||||
expect(app.canShowInfoDrawer(context)).toBeFalse();
|
||||
|
||||
context.navigation.url = '/test/details';
|
||||
expect(app.canShowInfoDrawer(context)).toBeFalse();
|
||||
});
|
||||
|
||||
it('should return true when selection exists and user is not in trashcan or libraries', () => {
|
||||
it('should return true when selection exists and user is not in trashcan, libraries or details', () => {
|
||||
context.navigation.url = '/personal-files/test';
|
||||
context.selection.isEmpty = false;
|
||||
expect(app.canShowInfoDrawer(context)).toBeTrue();
|
||||
|
@@ -247,6 +247,28 @@ describe('navigation.evaluators', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('isNotDetails', () => {
|
||||
it('should return true if url does not include `/details`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/path'
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isNotDetails(context)).toBe(true);
|
||||
});
|
||||
|
||||
it('should return false if url includes `/details`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: 'personal-files/details/path'
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isNotDetails(context)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isRecentFiles', () => {
|
||||
it('should return [true] if url starts with `/recent-files`', () => {
|
||||
const context: any = {
|
||||
|
@@ -115,6 +115,12 @@ export function isDetails(context: RuleContext): boolean {
|
||||
return url?.includes('/details');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the activated route is not **Details**.
|
||||
* JSON ref: `app.navigation.isNotDetails`
|
||||
*/
|
||||
export const isNotDetails = (context: RuleContext): boolean => !isDetails(context);
|
||||
|
||||
/**
|
||||
* Checks if the activated route is neither **Libraries** nor **Library Search Results**.
|
||||
* JSON ref: `app.navigation.isNotLibraries`
|
||||
|
Reference in New Issue
Block a user