diff --git a/e2e/content-services/components/viewer-content-services-component.e2e.ts b/e2e/content-services/components/viewer-content-services-component.e2e.ts index c7ae7b664eb..9ffa0830c6c 100644 --- a/e2e/content-services/components/viewer-content-services-component.e2e.ts +++ b/e2e/content-services/components/viewer-content-services-component.e2e.ts @@ -380,72 +380,4 @@ describe('Content Services Viewer', () => { await viewerPage.clickCloseButton(); }); }); - - describe('Viewer - version update with unsupported file', () => { - it('[C587084] Should display unknown format the preview for an unsupported file', async () => { - await changeFileNameInViewer(unsupportedFile.name, 'generic-unsupported-file-1st.3DS'); - await uploadNewVersion(jpgFile.name, unsupportedFileByLocation.location); - await previewUnsupportedFile(unsupportedFileByLocation.name); - - await changeFileNameInViewer(unsupportedFileByLocation.name, 'generic-unsupported-file-2nd.3DS'); - await uploadNewVersion(pdfFile.name, unsupportedFileByLocation.location); - await previewUnsupportedFile(unsupportedFileByLocation.name); - - await changeFileNameInViewer(unsupportedFileByLocation.name, 'generic-unsupported-file-3rd.3DS'); - await uploadNewVersion(mp4File.name, unsupportedFileByLocation.location); - await previewUnsupportedFile(unsupportedFileByLocation.name); - }); - }); - - /** - * Upload a new version of a file - * - * @param originalFileName The name of the original file - * @param newVersionLocation The location of the new version - */ - async function uploadNewVersion(originalFileName: string, newVersionLocation: string): Promise { - await contentServicesPage.doubleClickRow(originalFileName); - await viewerPage.waitTillContentLoaded(); - - await viewerPage.clickCloseButton(); - await contentServicesPage.versionManagerContent(originalFileName); - await versionManagePage.showNewVersionButton.click(); - await versionManagePage.uploadNewVersionFile(newVersionLocation); - await versionManagePage.closeActionsMenu(); - await versionManagePage.closeVersionDialog(); - await browser.refresh(); - } - - /** - * Preview an unsupported file - * - * @param unsupportedFileName The name of the unsupported file - */ - async function previewUnsupportedFile(unsupportedFileName: string): Promise { - await contentServicesPage.doubleClickRow(unsupportedFileName); - await viewerPage.waitTillContentLoaded(); - await viewerPage.checkUnknownFormatIsDisplayed(); - expect(await viewerPage.getUnknownFormatMessage()).toBe(`Couldn't load preview. Unknown format.`); - await viewerPage.clickCloseButton(); - } - - /** - * Change the name of the file in the viewer - * - * @param fileName The name of the file to be changed - * @param newName The new name of the file - */ - async function changeFileNameInViewer(fileName: string, newName: string): Promise { - await contentServicesPage.doubleClickRow(fileName); - await viewerPage.waitTillContentLoaded(); - - await viewerPage.clickInfoButton(); - await viewerPage.checkInfoSideBarIsDisplayed(); - await viewerPage.clickOnTab('Properties'); - await viewerPage.checkTabIsActive('Properties'); - await metadataViewPage.clickEditIconGeneral(); - await metadataViewPage.enterPropertyText('properties.cm:name', newName); - await metadataViewPage.clickSaveGeneralMetadata(); - await viewerPage.clickCloseButton(); - } });