Skip to content

Commit

Permalink
[ACS-5988] - Details tab not opening in custom file preview
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikiwanekhyland committed Sep 11, 2023
1 parent f431009 commit 2fcff51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
Expand Down

0 comments on commit 2fcff51

Please sign in to comment.