mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
@@ -77,7 +77,7 @@ describe('Empty list views', () => {
|
|||||||
await page.clickRecentFiles();
|
await page.clickRecentFiles();
|
||||||
expect(await dataTable.isEmptyList()).toBe(true, 'list is not empty');
|
expect(await dataTable.isEmptyList()).toBe(true, 'list is not empty');
|
||||||
expect(await dataTable.getEmptyStateTitle()).toContain('No recent files');
|
expect(await dataTable.getEmptyStateTitle()).toContain('No recent files');
|
||||||
expect(await dataTable.getEmptyStateSubtitle()).toContain('Items you upload or edit in the last 30 days are shown here.');
|
expect(await dataTable.getEmptyStateSubtitle()).toContain('Items you uploaded or edited in the last 30 days are shown here.');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('empty Favorites - [C280133]', async () => {
|
it('empty Favorites - [C280133]', async () => {
|
||||||
|
@@ -131,19 +131,19 @@ describe('Special permissions', () => {
|
|||||||
it(`on Recent Files - [C213178]`, async () => {
|
it(`on Recent Files - [C213178]`, async () => {
|
||||||
await page.clickRecentFilesAndWait();
|
await page.clickRecentFilesAndWait();
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
||||||
expect(await dataTable.getItemLocation(fileName)).toEqual('');
|
expect(await dataTable.getItemLocation(fileName)).toEqual('Unknown');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`on Favorites - [C213672]`, async () => {
|
it(`on Favorites - [C213672]`, async () => {
|
||||||
await page.clickFavoritesAndWait();
|
await page.clickFavoritesAndWait();
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
||||||
expect(await dataTable.getItemLocation(fileName)).toEqual('');
|
expect(await dataTable.getItemLocation(fileName)).toEqual('Unknown');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`on Shared Files - [C213668]`, async () => {
|
it(`on Shared Files - [C213668]`, async () => {
|
||||||
await page.clickSharedFilesAndWait();
|
await page.clickSharedFilesAndWait();
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
||||||
expect(await dataTable.getItemLocation(fileName)).toEqual('');
|
expect(await dataTable.getItemLocation(fileName)).toEqual('Unknown');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -43,7 +43,7 @@ import { ContentApiService } from '../../../services/content-api.service';
|
|||||||
selector: 'aca-location-link',
|
selector: 'aca-location-link',
|
||||||
template: `
|
template: `
|
||||||
<a href="" [title]="nodeLocation$ | async" (click)="goToLocation()">
|
<a href="" [title]="nodeLocation$ | async" (click)="goToLocation()">
|
||||||
{{ displayText | async }}
|
{{ displayText | async | translate }}
|
||||||
</a>
|
</a>
|
||||||
`,
|
`,
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
@@ -53,7 +53,7 @@ import { ContentApiService } from '../../../services/content-api.service';
|
|||||||
export class LocationLinkComponent implements OnInit {
|
export class LocationLinkComponent implements OnInit {
|
||||||
private _path: PathInfo;
|
private _path: PathInfo;
|
||||||
|
|
||||||
nodeLocation$ = new BehaviorSubject(null);
|
nodeLocation$ = new BehaviorSubject('');
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
context: any;
|
context: any;
|
||||||
@@ -93,6 +93,8 @@ export class LocationLinkComponent implements OnInit {
|
|||||||
if (path && path.name && path.elements) {
|
if (path && path.name && path.elements) {
|
||||||
this.displayText = this.getDisplayText(path);
|
this.displayText = this.getDisplayText(path);
|
||||||
this._path = path;
|
this._path = path;
|
||||||
|
} else {
|
||||||
|
this.displayText = of('APP.BROWSE.SEARCH.UNKNOWN_LOCATION');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -142,6 +144,10 @@ export class LocationLinkComponent implements OnInit {
|
|||||||
|
|
||||||
// todo: review once 5.2.3 is out
|
// todo: review once 5.2.3 is out
|
||||||
private getTooltip(path: PathInfo) {
|
private getTooltip(path: PathInfo) {
|
||||||
|
if (!path) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let result: string = null;
|
let result: string = null;
|
||||||
|
|
||||||
const elements = path.elements.map(e => Object.assign({}, e));
|
const elements = path.elements.map(e => Object.assign({}, e));
|
||||||
|
@@ -36,12 +36,19 @@ import {
|
|||||||
NavigateToFolder,
|
NavigateToFolder,
|
||||||
NAVIGATE_FOLDER,
|
NAVIGATE_FOLDER,
|
||||||
NavigateUrlAction,
|
NavigateUrlAction,
|
||||||
NAVIGATE_URL
|
NAVIGATE_URL,
|
||||||
|
SnackbarErrorAction
|
||||||
} from '../actions';
|
} from '../actions';
|
||||||
|
import { AppStore } from '../states/app.state';
|
||||||
|
import { Store } from '@ngrx/store';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class RouterEffects {
|
export class RouterEffects {
|
||||||
constructor(private actions$: Actions, private router: Router) {}
|
constructor(
|
||||||
|
private store: Store<AppStore>,
|
||||||
|
private actions$: Actions,
|
||||||
|
private router: Router
|
||||||
|
) {}
|
||||||
|
|
||||||
@Effect({ dispatch: false })
|
@Effect({ dispatch: false })
|
||||||
navigateUrl$ = this.actions$.pipe(
|
navigateUrl$ = this.actions$.pipe(
|
||||||
@@ -97,11 +104,13 @@ export class RouterEffects {
|
|||||||
// parent.id could be 'Site' folder or child as 'documentLibrary'
|
// parent.id could be 'Site' folder or child as 'documentLibrary'
|
||||||
link = [area, parent.name === 'Sites' ? {} : id];
|
link = [area, parent.name === 'Sites' ? {} : id];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.router.navigate(link);
|
this.router.navigate(link);
|
||||||
}, 10);
|
}, 10);
|
||||||
|
} else {
|
||||||
|
this.router.navigate(['/personal-files', node.id]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private navigateToParentFolder(node: MinimalNodeEntryEntity) {
|
private navigateToParentFolder(node: MinimalNodeEntryEntity) {
|
||||||
@@ -120,11 +129,15 @@ export class RouterEffects {
|
|||||||
// parent.id could be 'Site' folder or child as 'documentLibrary'
|
// parent.id could be 'Site' folder or child as 'documentLibrary'
|
||||||
link = [area, parent.name === 'Sites' ? {} : parent.id];
|
link = [area, parent.name === 'Sites' ? {} : parent.id];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.router.navigate(link);
|
this.router.navigate(link);
|
||||||
}, 10);
|
}, 10);
|
||||||
|
} else {
|
||||||
|
this.store.dispatch(
|
||||||
|
new SnackbarErrorAction('APP.MESSAGES.ERRORS.CANNOT_NAVIGATE_LOCATION')
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private isLibraryContent(path: PathInfoEntity): boolean {
|
private isLibraryContent(path: PathInfoEntity): boolean {
|
||||||
|
@@ -168,6 +168,7 @@
|
|||||||
"LOCATION": "Location",
|
"LOCATION": "Location",
|
||||||
"SIZE": "Size"
|
"SIZE": "Size"
|
||||||
},
|
},
|
||||||
|
"UNKNOWN_LOCATION": "Unknown",
|
||||||
"NO_RESULTS": "Your search returned 0 results"
|
"NO_RESULTS": "Your search returned 0 results"
|
||||||
},
|
},
|
||||||
"SEARCH_LIBRARIES": {
|
"SEARCH_LIBRARIES": {
|
||||||
@@ -250,6 +251,7 @@
|
|||||||
},
|
},
|
||||||
"MESSAGES": {
|
"MESSAGES": {
|
||||||
"ERRORS":{
|
"ERRORS":{
|
||||||
|
"CANNOT_NAVIGATE_LOCATION": "Cannot navigate location",
|
||||||
"MISSING_CONTENT": "This item no longer exists or you don't have permission to view it.",
|
"MISSING_CONTENT": "This item no longer exists or you don't have permission to view it.",
|
||||||
"GENERIC": "The action was unsuccessful. Try again or contact your IT Team.",
|
"GENERIC": "The action was unsuccessful. Try again or contact your IT Team.",
|
||||||
"CONFLICT": "This name is already in use, try a different name.",
|
"CONFLICT": "This name is already in use, try a different name.",
|
||||||
|
Reference in New Issue
Block a user