added functionality to view a previous version (#5913)

This commit is contained in:
Urse Daniel
2020-07-27 09:29:29 +01:00
committed by GitHub
parent 8d43155c14
commit 7c09fb1fb9
26 changed files with 337 additions and 111 deletions
@@ -23,7 +23,8 @@ import {
LoginPage,
UploadActions,
UserModel,
UsersActions
UsersActions,
ViewerPage
} from '@alfresco/adf-testing';
import { browser, by, element } from 'protractor';
import { FileModel } from '../../models/ACS/file.model';
@@ -41,6 +42,7 @@ describe('Version component actions', () => {
const uploadDialog = new UploadDialogPage();
const apiService = new ApiService();
const usersActions = new UsersActions(apiService);
const viewerPage = new ViewerPage();
let acsUser: UserModel;
@@ -151,6 +153,18 @@ describe('Version component actions', () => {
await contentServicesPage.checkContentIsDisplayed(txtFileModel.name);
});
it('[C362240] Should be possible to view a previous document version', async () => {
await contentServicesPage.versionManagerContent(fileModelVersionTwo.name);
await versionManagePage.viewFileVersion('1.0');
await viewerPage.expectUrlToContain('1.0');
});
it('[C362241] Should be possible to download a previous document version', async () => {
await viewerPage.clickDownloadButton();
await FileBrowserUtil.isFileDownloaded(fileModelVersionTwo.name);
await viewerPage.clickCloseButton();
});
it('[C307033] Should be possible to cancel the upload of a new version', async () => {
await browser.refresh();
await contentServicesPage.versionManagerContent(txtFileModel.name);