[ACS-6587] ACA: Viewer does not update after restoring version and the toolbar disappears (#9383)

* [ACS-6587] reload files after update

* [ACS-6587] update view after version change

* [ACS-6587] update view after version change

* [ACS-6587] update tests

* AAE-0000 e2e affected were not running on ADF pipeline' (#9409)

* AAE-14727 Removed unused css rule (#9408)

* [ACS-6587] update tests

* [ACS-6587] rearrange tests description

---------

Co-authored-by: Vito Albano <vito.albano@alfresco.com>
Co-authored-by: Ehsan Rezaei <ehsan.rezaei@hyland.com>
This commit is contained in:
tamaragruszka
2024-03-07 13:48:52 +01:00
committed by GitHub
parent 5dc82f03b4
commit 75f33b1990
9 changed files with 56 additions and 65 deletions

View File

@@ -258,7 +258,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
(node) =>
node &&
node.id === this.nodeId &&
(node.name !== this.fileName || this.getNodeVersionProperty(this.nodeEntry.entry) !== this.getNodeVersionProperty(node))
this.getNodeVersionProperty(this.nodeEntry.entry) !== this.getNodeVersionProperty(node)
),
takeUntil(this.onDestroy$)
)
@@ -323,9 +323,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
: encodeURI('1.0');
urlFileContent = versionData ? this.contentApi.getVersionContentUrl(this.nodeId, versionData.id) : this.contentApi.getContentUrl(this.nodeId);
urlFileContent = this.cacheBusterNumber
? urlFileContent + '&' + currentFileVersion + '&' + this.cacheBusterNumber
: urlFileContent + '&' + currentFileVersion;
urlFileContent = urlFileContent + '&' + currentFileVersion;
const fileExtension = this.viewUtilService.getFileExtension(versionData ? versionData.name : nodeData.name);
this.fileName = versionData ? versionData.name : nodeData.name;
@@ -348,7 +346,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
}
this.mimeType = mimeType;
this.urlFileContent = urlFileContent;
this.urlFileContent = urlFileContent + (this.cacheBusterNumber ? '&' + this.cacheBusterNumber : '');
this.sidebarRightTemplateContext.node = nodeData;
this.sidebarLeftTemplateContext.node = nodeData;
}