mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-01 14:41:14 +00:00
[ACS-5540] Implemented the review comments
This commit is contained in:
@@ -4,7 +4,7 @@ app-details-manager {
|
||||
|
||||
.aca-close-details-button {
|
||||
margin-right: 15px;
|
||||
margin-top: 2px;
|
||||
margin-top: 12px;
|
||||
outline: none;
|
||||
border-radius: 4px;
|
||||
|
||||
|
@@ -226,26 +226,6 @@ describe('navigation.evaluators', () => {
|
||||
});
|
||||
|
||||
describe('isDetails', () => {
|
||||
it('should return true if url ends with `/details`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/path/details'
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isDetails(context)).toBe(true);
|
||||
});
|
||||
|
||||
it('should return true if url starts with `/details`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/details/path'
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isDetails(context)).toBe(true);
|
||||
});
|
||||
|
||||
it('should return true if url includes with `/details`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
@@ -255,6 +235,16 @@ describe('navigation.evaluators', () => {
|
||||
|
||||
expect(app.isDetails(context)).toBe(true);
|
||||
});
|
||||
|
||||
it('should return false if url not includes with `/details`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/path'
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isDetails(context)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isRecentFiles', () => {
|
||||
|
@@ -112,7 +112,7 @@ export function isLibraryContent(context: RuleContext): boolean {
|
||||
|
||||
export function isDetails(context: RuleContext): boolean {
|
||||
const { url } = context.navigation;
|
||||
return url && (url.endsWith('/details') || url.includes('/details/') || url.startsWith('/details'));
|
||||
return url?.includes('/details');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user