From 2fcff51ec909841b17b82bef1fd9a7d07ad173cf Mon Sep 17 00:00:00 2001 From: DominikIwanek Date: Mon, 11 Sep 2023 15:04:13 +0200 Subject: [PATCH] [ACS-5988] - Details tab not opening in custom file preview --- .../document-base-page/document-base-page.component.ts | 4 ++-- .../components/document-base-page/document-base-page.spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts index b20ca26987..7c72919a75 100644 --- a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts +++ b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts @@ -29,7 +29,7 @@ import { OnDestroy, OnInit, OnChanges, ViewChild, SimpleChanges, Directive, inje import { Store } from '@ngrx/store'; import { NodeEntry, Node, NodePaging } from '@alfresco/js-api'; 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 { AppStore, @@ -90,7 +90,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges { }); 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 .select(getAppSelection) diff --git a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.spec.ts b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.spec.ts index 47817c536d..bee443e72c 100644 --- a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.spec.ts +++ b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.spec.ts @@ -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)`); fixture.detectChanges(); fixture.whenStable().then(() => { component.infoDrawerOpened$.subscribe((state) => { - expect(state).toBe(false); + expect(state).toBe(true); done(); }); });