mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-2087] Overlay Viewer (#1175)
* viewer outlet over preview route * use ViewNodeAction over ViewFileAction * pass data to dynamic component * ViewNodeComponent for view file custom actions * update docs * pass primary url to show preview outlet * update tests * reset selection on navigation event * document list update selection action when not viewer * close viewer for move and delete from viewer * location as router commands to work with search query * make viewer to behave like former preview * viewer error route * call correct preview method * remove view/error route * navigate to show error * span element for action name * fix folder navigation * fix test * page title fix * update tests * locate better the viewer toolbar * fix viewer url link * update navigation rules * document-list directive tests * try workaround for chrome 76 * try another workaround for using chromedriver 75 instead of 76 * ViewerEffects tests * reset selection over reload * fix tests * add reset event test * remove actions * context menu action refresh on favourite * reset selection on navigation * add delete and upload events * takeUntil after operators * remove chrome workaround parameter * filter navigation event
This commit is contained in:
committed by
Suzana Dirla
parent
8643a8806d
commit
e31c0d6caf
@@ -27,10 +27,10 @@ import * as app from './navigation.rules';
|
||||
|
||||
describe('navigation.evaluators', () => {
|
||||
describe('isPreview', () => {
|
||||
it('should return [true] if url contains `/preview/`', () => {
|
||||
it('should return [true] if url contains `viewer:view`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: 'path/preview/id'
|
||||
url: 'path/(viewer:view/id)'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -271,20 +271,30 @@ describe('navigation.evaluators', () => {
|
||||
});
|
||||
|
||||
describe('isSharedPreview', () => {
|
||||
it('should return [true] if url starts with `/shared/preview/`', () => {
|
||||
it('should return [true] if url starts with `/shared` and contains `viewer:view', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/shared/preview/path'
|
||||
url: '/shared/(viewer:view)'
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isSharedPreview(context)).toBe(true);
|
||||
});
|
||||
|
||||
it('should return [false] if url does not start with `/shared/preview/`', () => {
|
||||
it('should return [false] if url does not start with `/shared`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/path/shared/preview/'
|
||||
url: '/path/shared/(viewer:view)'
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isSharedPreview(context)).toBe(false);
|
||||
});
|
||||
|
||||
it('should return [false] if url starts with `/shared` and does not includes `viewer:view`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/shared/something'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -293,20 +303,30 @@ describe('navigation.evaluators', () => {
|
||||
});
|
||||
|
||||
describe('isFavoritesPreview', () => {
|
||||
it('should return [true] if url starts with `/favorites/preview/`', () => {
|
||||
it('should return [true] if url starts with `/favorites` and includes `viewer:view`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/favorites/preview/path'
|
||||
url: '/favorites/(viewer:view)'
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isFavoritesPreview(context)).toBe(true);
|
||||
});
|
||||
|
||||
it('should return [false] if url does not start with `/favorites/preview/`', () => {
|
||||
it('should return [false] if url does not start with `/favorites`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/path/favorites/preview/'
|
||||
url: '/path/favorites/(viewer:view)'
|
||||
}
|
||||
};
|
||||
|
||||
expect(app.isFavoritesPreview(context)).toBe(false);
|
||||
});
|
||||
|
||||
it('should return [false] if url starts with `/favorites` and does not include `viewer:view`', () => {
|
||||
const context: any = {
|
||||
navigation: {
|
||||
url: '/favorites/other'
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user