Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACS-5988] - Details tab not opening in custom file preview #3429

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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));
dominikiwanekhyland marked this conversation as resolved.
Show resolved Hide resolved
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