mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-5988] - Details tab not opening in custom file preview (#3429)
This commit is contained in:
@@ -29,7 +29,7 @@ import { OnDestroy, OnInit, OnChanges, ViewChild, SimpleChanges, Directive, inje
|
|||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { NodeEntry, Node, NodePaging } from '@alfresco/js-api';
|
import { NodeEntry, Node, NodePaging } from '@alfresco/js-api';
|
||||||
import { Observable, Subject, Subscription } from 'rxjs';
|
import { Observable, Subject, Subscription } from 'rxjs';
|
||||||
import { takeUntil, map } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { DocumentBasePageService } from './document-base-page.service';
|
import { DocumentBasePageService } from './document-base-page.service';
|
||||||
import {
|
import {
|
||||||
AppStore,
|
AppStore,
|
||||||
@@ -90,7 +90,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.sharedPreviewUrl$ = this.store.select(getSharedUrl);
|
this.sharedPreviewUrl$ = this.store.select(getSharedUrl);
|
||||||
this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened).pipe(map((infoDrawerState) => !this.isOutletPreviewUrl() && infoDrawerState));
|
this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened);
|
||||||
|
|
||||||
this.store
|
this.store
|
||||||
.select(getAppSelection)
|
.select(getAppSelection)
|
||||||
|
@@ -355,13 +355,13 @@ describe('Info Drawer state', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not open info drawer if viewer outlet is active', (done) => {
|
it('should open info drawer even if viewer outlet is active', (done) => {
|
||||||
window.history.pushState({}, null, `${locationHref}#test(viewer:view)`);
|
window.history.pushState({}, null, `${locationHref}#test(viewer:view)`);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
component.infoDrawerOpened$.subscribe((state) => {
|
component.infoDrawerOpened$.subscribe((state) => {
|
||||||
expect(state).toBe(false);
|
expect(state).toBe(true);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user