mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3384] Create automated tests for Version Component (#3631)
* fix version component restore and delete event * version manager actions * fix test * fix unit test * remove fdescribe * fix tslint * fix screenshot rewrite problem * remove fdescribe * multi instance try * remove fdescribe * try uncomment some test * error page * fix user preferences pagiantion * search page test include * fix type tslint e2e * restore code * default lang momentadapter * fix test * [ADF-3384] removed console log from test * [ADF-3384] adding some fixes for tests and code * [ADF-3384] fixed some test and code
This commit is contained in:
committed by
Eugenio Romano
parent
17074478e2
commit
a12662e7e2
28
e2e/actions/ACS/node.actions.ts
Normal file
28
e2e/actions/ACS/node.actions.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export class NodeActions {
|
||||
|
||||
lockNode(alfrescoJsApi, nodeId: string, allowOwner?: string) {
|
||||
|
||||
return alfrescoJsApi.nodes.lockNode(nodeId, {
|
||||
'type': allowOwner ? 'ALLOW_OWNER_CHANGES' : 'FULL',
|
||||
'lifetime': 'PERSISTENT'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@@ -1,3 +1,20 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import TestConfig = require('../../test.config');
|
||||
|
@@ -1,3 +1,20 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import TestConfig = require('../../test.config');
|
||||
@@ -42,7 +59,7 @@ export class AppsActions {
|
||||
return appCreated;
|
||||
}
|
||||
|
||||
async startProcess(alfrescoJsApi, app, processName) {
|
||||
async startProcess(alfrescoJsApi, app, processName?: string) {
|
||||
|
||||
let appDefinitionsList = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
|
||||
@@ -52,7 +69,7 @@ export class AppsActions {
|
||||
|
||||
let processDefinitionList = await alfrescoJsApi.activiti.processApi.getProcessDefinitions({ deploymentId: appDefinition.deploymentId });
|
||||
|
||||
let startProcessOptions = { processDefinitionId: processDefinitionList.data[0].id };
|
||||
let startProcessOptions: any = { processDefinitionId: processDefinitionList.data[0].id };
|
||||
|
||||
if (typeof processName !== 'undefined') {
|
||||
startProcessOptions.name = processName;
|
||||
|
@@ -1,5 +1,19 @@
|
||||
import TestConfig = require('../../test.config');
|
||||
import AppPublish = require('../../models/APS/AppPublish');
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export class ModelsActions {
|
||||
|
||||
|
@@ -1,3 +1,23 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import TestConfig = require('../test.config');
|
||||
@@ -15,7 +35,7 @@ let JS_BIND_INPUT = function (target) {
|
||||
let data = { files: input.files };
|
||||
|
||||
['dragenter', 'dragover', 'drop'].forEach(function (name) {
|
||||
let mouseEvent = document.createEvent('MouseEvent');
|
||||
let mouseEvent: any = document.createEvent('MouseEvent');
|
||||
mouseEvent.initMouseEvent(name, !0, !0, window, 0, 0, 0, x, y, !1, !1, !1, !1, 0, null);
|
||||
mouseEvent.dataTransfer = data;
|
||||
target.dispatchEvent(mouseEvent);
|
||||
@@ -32,7 +52,7 @@ let JS_BIND_INPUT_FOLDER = function (target) {
|
||||
let input = document.createElement('input');
|
||||
input.type = 'file';
|
||||
input.style.display = 'none';
|
||||
input.multiple = 'multiple';
|
||||
input.multiple = true;
|
||||
input.webkitdirectory = true;
|
||||
input.addEventListener('change', function (event) {
|
||||
target.scrollIntoView(true);
|
||||
@@ -43,7 +63,7 @@ let JS_BIND_INPUT_FOLDER = function (target) {
|
||||
let data = { files: input.files };
|
||||
|
||||
['dragenter', 'dragover', 'drop'].forEach(function (name) {
|
||||
let mouseEvent = document.createEvent('MouseEvent');
|
||||
let mouseEvent: any = document.createEvent('MouseEvent');
|
||||
mouseEvent.initMouseEvent(name, !0, !0, window, 0, 0, 0, x, y, !1, !1, !1, !1, 0, null);
|
||||
mouseEvent.dataTransfer = data;
|
||||
target.dispatchEvent(mouseEvent);
|
||||
@@ -61,9 +81,9 @@ export class DropActions {
|
||||
dropFile(dropArea, filePath) {
|
||||
let absolutePath = path.resolve(path.join(TestConfig.main.rootPath, filePath));
|
||||
|
||||
fs.accessSync(absolutePath, fs.F_OK);
|
||||
fs.accessSync(absolutePath, fs.constants.F_OK);
|
||||
return dropArea.getWebElement().then((element) => {
|
||||
browser.executeScript(JS_BIND_INPUT, element).then((input) => {
|
||||
browser.executeScript(JS_BIND_INPUT, element).then((input: any) => {
|
||||
input.sendKeys(absolutePath);
|
||||
|
||||
});
|
||||
@@ -72,10 +92,10 @@ export class DropActions {
|
||||
|
||||
dropFolder(dropArea, folderPath) {
|
||||
let absolutePath = path.resolve(path.join(TestConfig.main.rootPath, folderPath));
|
||||
fs.accessSync(absolutePath, fs.F_OK);
|
||||
fs.accessSync(absolutePath, fs.constants.F_OK);
|
||||
|
||||
return dropArea.getWebElement().then((element) => {
|
||||
browser.executeScript(JS_BIND_INPUT_FOLDER, element).then((input) => {
|
||||
browser.executeScript(JS_BIND_INPUT_FOLDER, element).then((input: any) => {
|
||||
input.sendKeys(absolutePath);
|
||||
|
||||
});
|
||||
|
@@ -1,3 +1,20 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Tenant = require('../models/APS/Tenant');
|
||||
import User = require('../models/APS/User');
|
||||
import TestConfig = require('../test.config');
|
||||
|
@@ -25,7 +25,6 @@ import FileModel = require('../../models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
@@ -43,7 +42,7 @@ describe('Comment Component', () => {
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
let uploadActions = new UploadActions();
|
||||
let nodeId, userFullName;
|
||||
|
||||
let comments = {
|
||||
@@ -73,8 +72,6 @@ describe('Comment Component', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
|
||||
let uploadActions = new UploadActions();
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
let pngUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, '-my-');
|
||||
@@ -94,11 +91,7 @@ describe('Comment Component', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.nodesApi.deleteNode(nodeId, {'permanent': true}).then(function() {
|
||||
console.log('API called successfully.');
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, nodeId);
|
||||
|
||||
done();
|
||||
});
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../pages/adf/contentServicesPage');
|
||||
import NavigationBarPage = require('../pages/adf/navigationBarPage');
|
||||
@@ -24,7 +26,7 @@ import resources = require('../util/resources');
|
||||
import Util = require('../util/util');
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../actions/ACS/upload.actions';
|
||||
import ErrorPage = require('../pages/adf/documentListErrorPage');
|
||||
import ErrorPage = require('../pages/adf/errorPage');
|
||||
import FileModel = require('../models/ACS/fileModel');
|
||||
import moment from 'moment-es6';
|
||||
import { browser } from '../../node_modules/protractor';
|
||||
@@ -95,18 +97,19 @@ describe('Document List Component', () => {
|
||||
expect(errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
});
|
||||
|
||||
xit('[C279924] - Custom error message is displayed', () => {
|
||||
it('[C279924] - Custom error message is displayed', () => {
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.enableCustomPermissionMessage();
|
||||
browser.get(TestConfig.adf.url + '/files/' + privateSite.entry.guid);
|
||||
expect(errorPage.getErrorCode()).toBe('Cris you don\'t have permissions');
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
});
|
||||
|
||||
it('[C279925] - Message is translated', () => {
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navBar.openLanguageMenu();
|
||||
navBar.chooseLanguage('Italian');
|
||||
browser.sleep(2000);
|
||||
browser.get(TestConfig.adf.url + '/files/' + privateSite.entry.guid);
|
||||
expect(errorPage.getErrorDescription()).toBe('Accesso alla risorsa sul server non consentito.');
|
||||
});
|
||||
|
@@ -55,7 +55,7 @@ describe('Document List - Pagination', function () {
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
let newFolderModel = new FolderModel({ 'name': 'newFolder' });
|
||||
let fileNames = [], nrOfFiles = 20, currentPage = 1, secondSetOfFiles, secondSetNumber = 25;
|
||||
let fileNames = [], nrOfFiles = 20, currentPage = 1, secondSetOfFiles, secondSetNumber = 20;
|
||||
let folderTwoModel = new FolderModel({ 'name': 'folderTwo' });
|
||||
let folderThreeModel = new FolderModel({ 'name': 'folderThree' });
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('Document List - Pagination', function () {
|
||||
contentServicesPage.navigateToFolder(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.default);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfFiles + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import SearchDialog = require('../pages/adf/dialog/searchDialog');
|
||||
import ContentServicesPage = require('../pages/adf/contentServicesPage');
|
||||
@@ -26,7 +28,6 @@ import FileModel = require('../models/ACS/fileModel');
|
||||
import FolderModel = require('../models/ACS/folderModel');
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import Util = require('../util/util');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
@@ -201,6 +202,7 @@ describe('Search component - Search Bar', () => {
|
||||
|
||||
it('[C272802] Existing folder is displayed in search page', () => {
|
||||
searchDialog.clickOnSearchIcon();
|
||||
browser.driver.sleep(1000);
|
||||
searchDialog.enterTextAndPressEnter(firstFolderModel.name);
|
||||
searchResultPage.checkContentIsDisplayed(firstFolderModel.name);
|
||||
});
|
||||
@@ -219,6 +221,7 @@ describe('Search component - Search Bar', () => {
|
||||
.clickOnSearchIcon()
|
||||
.enterText(secondFolder.shortName)
|
||||
.pressDownArrowAndEnter();
|
||||
searchDialog.pressDownArrowAndEnter();
|
||||
|
||||
contentServicesPage.checkAcsContainer();
|
||||
expect(contentServicesPage.currentFolderName()).toEqual(secondFolder.name);
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import SearchDialog = require('../pages/adf/dialog/searchDialog');
|
||||
import ContentServicesPage = require('../pages/adf/contentServicesPage');
|
||||
@@ -35,9 +37,9 @@ import { UploadActions } from '../actions/ACS/upload.actions';
|
||||
describe('Search component - Search Page', () => {
|
||||
let search = {
|
||||
active: {
|
||||
firstFile: null,
|
||||
secondFile: null,
|
||||
base: Util.generateRandomString(3),
|
||||
firstFile: Util.generateRandomString(),
|
||||
secondFile: Util.generateRandomString(),
|
||||
extension: '.txt'
|
||||
},
|
||||
no_permission: {
|
||||
@@ -52,17 +54,22 @@ describe('Search component - Search Page', () => {
|
||||
let searchResultPage = new SearchResultPage();
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
let emptyFolderModel = new FolderModel({ 'name': Util.generateRandomString()});
|
||||
let firstFileModel = new FileModel({
|
||||
'name': search.active.firstFile,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT.file_location
|
||||
});
|
||||
let emptyFolderModel = new FolderModel({ 'name': Util.generateRandomString() });
|
||||
let firstFileModel;
|
||||
let newFolderModel = new FolderModel({ 'name': 'newFolder' });
|
||||
let fileNames = [], adminFileNames = [], nrOfFiles = 15, adminNrOfFiles = 5;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
fileNames = Util.generateSeqeunceFiles(1, nrOfFiles, search.active.base, search.active.extension);
|
||||
adminFileNames = Util.generateSeqeunceFiles(nrOfFiles + 1, nrOfFiles + adminNrOfFiles, search.active.base, search.active.extension);
|
||||
search.active.firstFile = fileNames[0];
|
||||
search.active.secondFile = fileNames[1];
|
||||
fileNames.splice(0, 1);
|
||||
|
||||
firstFileModel = new FileModel({
|
||||
'name': search.active.firstFile,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT.file_location
|
||||
});
|
||||
|
||||
let uploadActions = new UploadActions();
|
||||
|
||||
@@ -82,8 +89,7 @@ describe('Search component - Search Page', () => {
|
||||
|
||||
await uploadActions.createEmptyFiles(this.alfrescoJsApi, fileNames, newFolderModelUploaded.entry.id);
|
||||
|
||||
let firstFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, firstFileModel.location, firstFileModel.name, '-my-');
|
||||
Object.assign(firstFileModel, firstFileUploaded.entry);
|
||||
await uploadActions.uploadFile(this.alfrescoJsApi, firstFileModel.location, firstFileModel.name, '-my-');
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
@@ -197,7 +203,6 @@ describe('Search component - Search Page', () => {
|
||||
.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
.enterTextAndPressEnter(search.active.base);
|
||||
|
||||
searchResultPage.checkContentIsDisplayed(search.active.secondFile);
|
||||
searchResultPage.sortAndCheckListIsOrderedByName(true).then((result) => {
|
||||
expect(result).toEqual(true);
|
||||
@@ -273,8 +278,11 @@ describe('Search component - Search Page', () => {
|
||||
|
||||
it('[C272808] Try to delete a folder without rights from the Search Results Page', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
|
||||
.enterTextAndPressEnter(search.no_permission.noPermFolder);
|
||||
searchDialog.checkSearchBarIsNotVisible();
|
||||
searchDialog.checkSearchIconIsVisible();
|
||||
searchDialog.clickOnSearchIcon();
|
||||
searchDialog.enterTextAndPressEnter(search.no_permission.noPermFolder);
|
||||
|
||||
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder);
|
||||
searchResultPage.deleteContent(search.no_permission.noPermFolder);
|
||||
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder);
|
||||
|
@@ -23,7 +23,6 @@ import TagPage = require('../pages/adf/tagPage');
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import Util = require('../util/util');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../actions/ACS/upload.actions';
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import UploadDialog = require('../../pages/adf/dialog/uploadDialog');
|
||||
@@ -30,8 +32,6 @@ import resources = require('../../util/resources');
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { DropActions } from '../../actions/drop.actions';
|
||||
|
||||
import path = require('path');
|
||||
|
||||
describe('Upload component - Excluded Files', () => {
|
||||
|
||||
let contentServicesPage = new ContentServicesPage();
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import UploadDialog = require('../../pages/adf/dialog/uploadDialog');
|
||||
@@ -187,10 +189,11 @@ describe('Upload component', () => {
|
||||
contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.name);
|
||||
});
|
||||
|
||||
xit('[C272792] Cancel a big file through the upload dialog icon before the upload to be done', () => {
|
||||
contentServicesPage.uploadFile(largeFile.location);
|
||||
it('[C272792] Cancel a big file through the upload dialog icon before the upload to be done', () => {
|
||||
browser.executeScript(' setTimeout(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
|
||||
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 5000)');
|
||||
|
||||
uploadDialog.removeFileWhileUploading(largeFile.name).fileIsCancelled(largeFile.name);
|
||||
contentServicesPage.uploadFile(largeFile.location);
|
||||
|
||||
expect(uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
@@ -199,7 +202,6 @@ describe('Upload component', () => {
|
||||
|
||||
xit('[C260169] Cancel a big file through the cancel uploads button', () => {
|
||||
contentServicesPage.uploadFile(largeFile.location);
|
||||
uploadDialog.cancelUploads();
|
||||
expect(uploadDialog.getTitleText()).toEqual('Uploading 0 / 1');
|
||||
expect(uploadDialog.getConfirmationDialogTitleText()).toEqual('Cancel Upload');
|
||||
expect(uploadDialog.getConfirmationDialogDescriptionText()).toEqual('Stop uploading and remove files already uploaded.');
|
||||
@@ -224,22 +226,27 @@ describe('Upload component', () => {
|
||||
|
||||
it('[C272794] Tooltip of uploading multiple files button', () => {
|
||||
uploadToggles.enableMultipleFileUpload();
|
||||
browser.driver.sleep(1000);
|
||||
expect(contentServicesPage.getMultipleFileButtonTooltip()).toEqual('Custom tooltip');
|
||||
uploadToggles.disableMultipleFileUpload();
|
||||
});
|
||||
|
||||
it('[C260171] Should upload only the extension filter allowed when Enable extension filter is enabled', () => {
|
||||
uploadToggles.enableExtensionFilter().addExtension('.docx');
|
||||
uploadToggles.enableExtensionFilter();
|
||||
browser.driver.sleep(1000);
|
||||
uploadToggles.addExtension('.docx');
|
||||
contentServicesPage.uploadFile(docxFileModel.location).checkContentIsDisplayed(docxFileModel.name);
|
||||
uploadDialog.removeUploadedFile(docxFileModel.name).fileIsCancelled(docxFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.uploadFile(largeFile.location).checkContentIsNotDisplayed(largeFile.name);
|
||||
contentServicesPage.uploadFile(pngFileModel.location).checkContentIsNotDisplayed(pngFileModel.name);
|
||||
uploadDialog.dialogIsNotDisplayed();
|
||||
uploadToggles.disableExtensionFilter();
|
||||
});
|
||||
|
||||
it('[C274687] Should upload with drag and drop only the extension filter allowed when Enable extension filter is enabled', () => {
|
||||
uploadToggles.enableExtensionFilter().addExtension('.docx');
|
||||
uploadToggles.enableExtensionFilter();
|
||||
browser.driver.sleep(1000);
|
||||
uploadToggles.addExtension('.docx');
|
||||
|
||||
let dragAndDrop = new DropActions();
|
||||
let dragAndDropArea = element(by.css('adf-upload-drag-area div'));
|
||||
@@ -250,8 +257,8 @@ describe('Upload component', () => {
|
||||
uploadDialog.removeUploadedFile(docxFileModel.name).fileIsCancelled(docxFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
|
||||
dragAndDrop.dropFile(dragAndDropArea, largeFile.location);
|
||||
contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
|
||||
dragAndDrop.dropFile(dragAndDropArea, pngFileModel.location);
|
||||
contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
|
||||
uploadDialog.dialogIsNotDisplayed();
|
||||
uploadToggles.disableExtensionFilter();
|
||||
});
|
||||
@@ -279,8 +286,9 @@ describe('Upload component', () => {
|
||||
uploadToggles.disableVersioning();
|
||||
});
|
||||
|
||||
xit('[C260173] Enable folder upload', () => {
|
||||
it('[C260173] Enable folder upload', () => {
|
||||
uploadToggles.enableFolderUpload();
|
||||
browser.driver.sleep(1000);
|
||||
contentServicesPage.uploadFolder(folderOne.location).checkContentIsDisplayed(folderOne.name);
|
||||
expect(contentServicesPage.getFolderButtonTooltip()).toEqual('Custom tooltip');
|
||||
uploadDialog.fileIsUploaded(uploadedFileInFolder.name);
|
||||
@@ -290,7 +298,7 @@ describe('Upload component', () => {
|
||||
uploadToggles.disableFolderUpload();
|
||||
});
|
||||
|
||||
xit('[C260176] The files uploaded before closing the upload dialog box are not displayed anymore in the upload box', () => {
|
||||
it('[C260176] The files uploaded before closing the upload dialog box are not displayed anymore in the upload box', () => {
|
||||
contentServicesPage.uploadFile(docxFileModel.location).checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
@@ -309,7 +317,7 @@ describe('Upload component', () => {
|
||||
.checkContentsAreNotDisplayed([docxFileModel.name, pngFileModel.name, pdfFileModel.name]);
|
||||
});
|
||||
|
||||
xit('[C260170] Upload files on the same time', () => {
|
||||
it('[C260170] Upload files on the same time', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
|
||||
@@ -331,14 +339,15 @@ describe('Upload component', () => {
|
||||
xit('[C279919] Enable max size and set it to 400', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
uploadToggles.enableMaxSize().addMaxSize('400');
|
||||
uploadToggles.enableMaxSize();
|
||||
uploadToggles.addMaxSize('400');
|
||||
contentServicesPage.uploadFile(fileWithSpecificSize.location).checkContentIsDisplayed(fileWithSpecificSize.name);
|
||||
uploadDialog.fileIsUploaded(fileWithSpecificSize.name).clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.deleteContent(fileWithSpecificSize.name).checkContentIsNotDisplayed(fileWithSpecificSize.name);
|
||||
uploadToggles.addMaxSize('399');
|
||||
contentServicesPage.uploadFile(fileWithSpecificSize.location).checkContentIsNotDisplayed(fileWithSpecificSize.name);
|
||||
uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
|
||||
expect(contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size');
|
||||
uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
|
||||
contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name);
|
||||
uploadDialog.fileIsUploaded(emptyFile.name).clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.deleteContent(emptyFile.name).checkContentIsNotDisplayed(emptyFile.name);
|
||||
@@ -347,19 +356,22 @@ describe('Upload component', () => {
|
||||
|
||||
xit('[C272796] Enable max size and set it to 0', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
uploadToggles.enableMaxSize().addMaxSize('0');
|
||||
uploadToggles.enableMaxSize();
|
||||
uploadToggles.addMaxSize('0');
|
||||
contentServicesPage.uploadFile(fileWithSpecificSize.location).checkContentIsNotDisplayed(fileWithSpecificSize.name);
|
||||
uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
|
||||
expect(contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size');
|
||||
|
||||
uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
|
||||
contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name);
|
||||
uploadDialog.fileIsUploaded(emptyFile.name).clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.deleteContent(emptyFile.name).checkContentIsNotDisplayed(emptyFile.name);
|
||||
uploadToggles.disableMaxSize();
|
||||
});
|
||||
|
||||
xit('[C272797] Set max size to 1 and disable it', () => {
|
||||
uploadToggles.enableMaxSize().addMaxSize('1');
|
||||
it('[C272797] Set max size to 1 and disable it', () => {
|
||||
uploadToggles.enableMaxSize();
|
||||
browser.driver.sleep(1000);
|
||||
uploadToggles.addMaxSize('1');
|
||||
uploadToggles.disableMaxSize();
|
||||
contentServicesPage.uploadFile(fileWithSpecificSize.location).checkContentIsDisplayed(fileWithSpecificSize.name);
|
||||
uploadDialog.fileIsUploaded(fileWithSpecificSize.name).clickOnCloseButton().dialogIsNotDisplayed();
|
||||
@@ -375,6 +387,7 @@ describe('Upload component', () => {
|
||||
|
||||
it('[C279882] Should be possible Upload a folder in a folder', () => {
|
||||
uploadToggles.enableFolderUpload();
|
||||
browser.driver.sleep(1000);
|
||||
contentServicesPage.uploadFolder(folderOne.location).checkContentIsDisplayed(folderOne.name);
|
||||
uploadDialog.fileIsUploaded(uploadedFileInFolder.name);
|
||||
|
||||
@@ -382,6 +395,7 @@ describe('Upload component', () => {
|
||||
contentServicesPage.doubleClickRow(folderOne.name).checkContentIsDisplayed(uploadedFileInFolder.name);
|
||||
|
||||
uploadToggles.enableFolderUpload();
|
||||
browser.driver.sleep(1000);
|
||||
contentServicesPage.uploadFolder(folderTwo.location).checkContentIsDisplayed(folderTwo.name);
|
||||
uploadDialog.fileIsUploaded(uploadedFileInFolderTwo.name);
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import UploadDialog = require('../../pages/adf/dialog/uploadDialog');
|
||||
@@ -32,8 +34,6 @@ import resources = require('../../util/resources');
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { DropActions } from '../../actions/drop.actions';
|
||||
|
||||
import path = require('path');
|
||||
|
||||
describe('Upload - User permission', () => {
|
||||
|
||||
let contentServicesPage = new ContentServicesPage();
|
||||
|
148
e2e/content-services/version/version-actions.e2e.ts
Normal file
148
e2e/content-services/version/version-actions.e2e.ts
Normal file
@@ -0,0 +1,148 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import ContentListPage = require('../../pages/adf/dialog/contentList');
|
||||
import { VersionManagePage } from '../../pages/adf/versionManagerPage';
|
||||
|
||||
import AcsUserModel = require('../../models/ACS/acsUserModel');
|
||||
import FileModel = require('../../models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import Util = require('../../util/util');
|
||||
import path = require('path');
|
||||
|
||||
describe('Version component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const contentListPage = new ContentListPage();
|
||||
const versionManagePage = new VersionManagePage();
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
|
||||
let txtFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT.file_location
|
||||
});
|
||||
|
||||
let fileModelVersionTwo = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
||||
let uploadActions = new UploadActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
let txtUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, txtFileModel.location, txtFileModel.name, '-my-');
|
||||
|
||||
Object.assign(txtFileModel, txtUploadedFile.entry);
|
||||
|
||||
txtFileModel.update(txtUploadedFile.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.navigateToDocumentList();
|
||||
contentListPage.versionManagerContent(txtFileModel.name);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C280003] Should not be possible delete a file version if there is only one version', () => {
|
||||
versionManagePage.clickActionButton('1.0');
|
||||
expect(element(by.css(`[id="adf-version-list-action-delete-1.0"]`)).isEnabled()).toBe(false);
|
||||
versionManagePage.closeActionButton();
|
||||
Util.waitUntilElementIsNotOnPage(element(by.css(`[id="adf-version-list-action-delete-1.0"]`)));
|
||||
});
|
||||
|
||||
it('[C280004] Should not be possible restore the version if there is only one version', () => {
|
||||
versionManagePage.clickActionButton('1.0');
|
||||
expect(element(by.css(`[id="adf-version-list-action-restore-1.0"]`)).isEnabled()).toBe(false);
|
||||
versionManagePage.closeActionButton();
|
||||
Util.waitUntilElementIsNotOnPage(element(by.css(`[id="adf-version-list-action-restore-1.0"]`)));
|
||||
});
|
||||
|
||||
it('[C280005] Should be showed all the default action when you have more then one version', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
versionManagePage.clickActionButton('1.1').checkActionsArePresent('1.1');
|
||||
|
||||
versionManagePage.closeActionButton();
|
||||
});
|
||||
|
||||
it('[C269081] Should be possible download all the version of a file', () => {
|
||||
versionManagePage.downloadFileVersion('1.0');
|
||||
|
||||
expect(Util.fileExists(path.join(__dirname, 'downloads', txtFileModel.name), 20)).toBe(true);
|
||||
|
||||
versionManagePage.downloadFileVersion('1.1');
|
||||
|
||||
expect(Util.fileExists(path.join(__dirname, 'downloads', fileModelVersionTwo.name), 20)).toBe(true);
|
||||
});
|
||||
|
||||
it('[C272819] Should be possible delete a version when click on delete version action', () => {
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
|
||||
versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.chekFileVersionNotExist('1.1');
|
||||
versionManagePage.chekFileVersionExist('1.0');
|
||||
});
|
||||
|
||||
it('[C280006] Should be possible prevent a version to be deleted when click on No on the confirm dialog', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.1');
|
||||
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
|
||||
versionManagePage.clickCancelConfirm();
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.1');
|
||||
versionManagePage.chekFileVersionExist('1.0');
|
||||
});
|
||||
|
||||
it('[C280007] Should be possible restore an old version of your file', () => {
|
||||
versionManagePage.restoreFileVersion('1.0');
|
||||
|
||||
versionManagePage.chekFileVersionExist('2.0');
|
||||
});
|
||||
|
||||
});
|
383
e2e/content-services/version/version-permissions.e2e.ts
Normal file
383
e2e/content-services/version/version-permissions.e2e.ts
Normal file
@@ -0,0 +1,383 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentListPage = require('../../pages/adf/dialog/contentList');
|
||||
import NavigationBarPage = require('../../pages/adf/navigationBarPage');
|
||||
import { VersionManagePage } from '../../pages/adf/versionManagerPage';
|
||||
import UploadDialog = require('../../pages/adf/dialog/uploadDialog');
|
||||
import NotificationPage = require('../../pages/adf/notificationPage');
|
||||
|
||||
import AcsUserModel = require('../../models/ACS/acsUserModel');
|
||||
import FileModel = require('../../models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { NodeActions } from '../../actions/ACS/node.actions';
|
||||
|
||||
import Util = require('../../util/util');
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
|
||||
describe('Version component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentListPage = new ContentListPage();
|
||||
const versionManagePage = new VersionManagePage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const uploadDialog = new UploadDialog();
|
||||
const notificationPage = new NotificationPage();
|
||||
let site;
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
let consumerUser = new AcsUserModel();
|
||||
let collaboratorUser = new AcsUserModel();
|
||||
let contributorUser = new AcsUserModel();
|
||||
let managerUser = new AcsUserModel();
|
||||
let fileCreatorUser = new AcsUserModel();
|
||||
|
||||
let newVersionFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG_B.file_location
|
||||
});
|
||||
|
||||
let lockFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG_C.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG_C.file_location
|
||||
});
|
||||
|
||||
let differentCreatoFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG_D.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG_D.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
||||
let uploadActions = new UploadActions();
|
||||
let nodeActions = new NodeActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(consumerUser);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(collaboratorUser);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(contributorUser);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(managerUser);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(fileCreatorUser);
|
||||
|
||||
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||
title: Util.generateRandomString(),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: consumerUser.id,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: collaboratorUser.id,
|
||||
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: contributorUser.id,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: managerUser.id,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: fileCreatorUser.id,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
let lockFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, lockFileModel.location, lockFileModel.name, site.entry.guid);
|
||||
Object.assign(lockFileModel, lockFileUploaded.entry);
|
||||
|
||||
nodeActions.lockNode(this.alfrescoJsApi, lockFileModel.id);
|
||||
|
||||
await this.alfrescoJsApi.login(fileCreatorUser.id, fileCreatorUser.password);
|
||||
|
||||
await uploadActions.uploadFile(this.alfrescoJsApi, differentCreatoFile.location, differentCreatoFile.name, site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
describe('Manager', () => {
|
||||
|
||||
let sameCreatoFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let uploadActions = new UploadActions();
|
||||
|
||||
await this.alfrescoJsApi.login(managerUser.id, managerUser.password);
|
||||
|
||||
let sameCreatoFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, sameCreatoFile.location, sameCreatoFile.name, site.entry.guid);
|
||||
Object.assign(sameCreatoFile, sameCreatoFileUploaded.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(managerUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await this.alfrescoJsApi.nodes.deleteNode(sameCreatoFile.id);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C277200] should a user with Manager permission be able to upload a new version for a file with different creator', () => {
|
||||
contentListPage.versionManagerContent(differentCreatoFile.name);
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.chekFileVersionNotExist('1.1');
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
|
||||
uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
|
||||
it('[C277204] Should a user with Manager permission not be able to upload a new version for a locked file', () => {
|
||||
contentListPage.versionManagerContent(lockFileModel.name);
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.chekFileVersionNotExist('1.1');
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
|
||||
uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
|
||||
it('[C277196] Should a user with Manager permission be able to upload a new version for the created file', () => {
|
||||
contentListPage.versionManagerContent(sameCreatoFile.name);
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.chekFileVersionNotExist('1.1');
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
|
||||
uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Consumer', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
loginPage.loginToContentServicesUsingUserModel(consumerUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C277197] Should a user with Consumer permission not be able to upload a new version for a file with different creator', () => {
|
||||
contentListPage.versionManagerContent(differentCreatoFile.name);
|
||||
|
||||
notificationPage.checkNotifyContains(`You don't have access to do this`);
|
||||
});
|
||||
|
||||
it('[C277201] Should a user with Consumer permission not be able to upload a new version for a locked file', () => {
|
||||
contentListPage.versionManagerContent(lockFileModel.name);
|
||||
|
||||
notificationPage.checkNotifyContains(`You don't have access to do this`);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Contributor', () => {
|
||||
let sameCreatoFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let uploadActions = new UploadActions();
|
||||
|
||||
await this.alfrescoJsApi.login(contributorUser.id, contributorUser.password);
|
||||
|
||||
let sameCreatoFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, sameCreatoFile.location, sameCreatoFile.name, site.entry.guid);
|
||||
Object.assign(sameCreatoFile, sameCreatoFileUploaded.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(contributorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await this.alfrescoJsApi.nodes.deleteNode(sameCreatoFile.id);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C277177] Should a user with Contributor permission be able to upload a new version for the created file', () => {
|
||||
contentListPage.versionManagerContent(sameCreatoFile.name);
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.chekFileVersionNotExist('1.1');
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
|
||||
uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
|
||||
it('[C277198] Should a user with Contributor permission not be able to upload a new version for a file with different creator', () => {
|
||||
contentListPage.versionManagerContent(differentCreatoFile.name);
|
||||
|
||||
notificationPage.checkNotifyContains(`You don't have access to do this`);
|
||||
});
|
||||
|
||||
it('[C277202] Should a user with Contributor permission not be able to upload a new version for a locked file', () => {
|
||||
contentListPage.versionManagerContent(lockFileModel.name);
|
||||
|
||||
notificationPage.checkNotifyContains(`You don't have access to do this`);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Collaborator', () => {
|
||||
let sameCreatoFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let uploadActions = new UploadActions();
|
||||
|
||||
await this.alfrescoJsApi.login(collaboratorUser.id, collaboratorUser.password);
|
||||
|
||||
let sameCreatoFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, sameCreatoFile.location, sameCreatoFile.name, site.entry.guid);
|
||||
Object.assign(sameCreatoFile, sameCreatoFileUploaded.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(collaboratorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await this.alfrescoJsApi.nodes.deleteNode(sameCreatoFile.id);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C277195] Should a user with Collaborator permission be able to upload a new version for the created file', () => {
|
||||
contentListPage.versionManagerContent(sameCreatoFile.name);
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.chekFileVersionNotExist('1.1');
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
|
||||
uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
|
||||
it('[C277203] Should a user with Collaborator permission not be able to upload a new version for a locked file', () => {
|
||||
contentListPage.versionManagerContent(lockFileModel.name);
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.chekFileVersionNotExist('1.1');
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
|
||||
uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
|
||||
it('[C277199] should a user with Collaborator permission be able to upload a new version for a file with different creator', () => {
|
||||
contentListPage.versionManagerContent(differentCreatoFile.name);
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.clickActionButton('1.1');
|
||||
|
||||
expect(element(by.css(`[id="adf-version-list-action-delete-1.1"]`)).isEnabled()).toBe(false);
|
||||
|
||||
versionManagePage.closeActionButton();
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
139
e2e/content-services/version/version-properties.e2e.ts
Normal file
139
e2e/content-services/version/version-properties.e2e.ts
Normal file
@@ -0,0 +1,139 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import ContentListPage = require('../../pages/adf/dialog/contentList');
|
||||
import { VersionManagePage } from '../../pages/adf/versionManagerPage';
|
||||
|
||||
import AcsUserModel = require('../../models/ACS/acsUserModel');
|
||||
import FileModel = require('../../models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import Util = require('../../util/util');
|
||||
|
||||
describe('Version Properties', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const contentListPage = new ContentListPage();
|
||||
const versionManagePage = new VersionManagePage();
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
|
||||
let txtFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
});
|
||||
|
||||
let fileModelVersionTwo = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
||||
let uploadActions = new UploadActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
let txtUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, txtFileModel.location, txtFileModel.name, '-my-');
|
||||
|
||||
Object.assign(txtFileModel, txtUploadedFile.entry);
|
||||
|
||||
txtFileModel.update(txtUploadedFile.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.navigateToDocumentList();
|
||||
contentListPage.versionManagerContent(txtFileModel.name);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C272817] Should NOT be present the download action when allowDownload property is false', () => {
|
||||
versionManagePage.disableDownload();
|
||||
|
||||
versionManagePage.clickActionButton('1.0');
|
||||
|
||||
Util.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-download-1.0"]`)));
|
||||
|
||||
versionManagePage.closeActionButton();
|
||||
});
|
||||
|
||||
it('[C279992] Should be present the download action when allowDownload property is true', () => {
|
||||
versionManagePage.enableDownload();
|
||||
|
||||
versionManagePage.clickActionButton('1.0');
|
||||
|
||||
Util.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-download-1.0"]`)));
|
||||
|
||||
versionManagePage.closeActionButton();
|
||||
});
|
||||
|
||||
it('[C269085] Should show/hide comments when showComments true/false', () => {
|
||||
versionManagePage.enableComments();
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.enterCommentText('Example comment text');
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionComment('1.1')).toEqual('Example comment text');
|
||||
|
||||
versionManagePage.disableComments();
|
||||
|
||||
Util.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-item-comment-1.1"]`)));
|
||||
});
|
||||
|
||||
it('[C277277] Should show/hide actions menu when readOnly is true/false', () => {
|
||||
versionManagePage.disableReadOnly();
|
||||
|
||||
Util.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-menu-button-1.0"]`)));
|
||||
|
||||
versionManagePage.enableReadOnly();
|
||||
|
||||
Util.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-menu-button-1.0"]`)));
|
||||
});
|
||||
|
||||
it('[C279994] Should show/hide upload new version button when readOnly is true/false', () => {
|
||||
versionManagePage.disableReadOnly();
|
||||
|
||||
Util.waitUntilElementIsVisible(versionManagePage.showNewVersionButton);
|
||||
|
||||
versionManagePage.enableReadOnly();
|
||||
|
||||
Util.waitUntilElementIsNotVisible(versionManagePage.showNewVersionButton);
|
||||
Util.waitUntilElementIsNotVisible(versionManagePage.uploadNewVersionButton);
|
||||
});
|
||||
|
||||
});
|
@@ -15,32 +15,56 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import ViewerPage = require('../../pages/adf/viewerPage');
|
||||
import ContentListPage = require('../../pages/adf/dialog/contentList');
|
||||
import { VersionManagePage } from '../../pages/adf/versionManagerPage';
|
||||
|
||||
import AcsUserModel = require('../../models/ACS/acsUserModel');
|
||||
import FileModel = require('../../models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import Util = require('../../util/util');
|
||||
|
||||
describe('Version component', () => {
|
||||
|
||||
let loginPage = new LoginPage();
|
||||
let contentServicesPage = new ContentServicesPage();
|
||||
let viewerPage = new ViewerPage();
|
||||
let cardViewPage;
|
||||
let txtUploadedFile;
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const contentListPage = new ContentListPage();
|
||||
const versionManagePage = new VersionManagePage();
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
|
||||
let pdfFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF_ALL.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF_ALL.file_location
|
||||
let txtFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT.file_location
|
||||
});
|
||||
|
||||
let fileModelVersionTwo = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
let fileModelVersionThree = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG_B.file_location
|
||||
});
|
||||
|
||||
let fileModelVersionFor = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG_C.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG_C.file_location
|
||||
});
|
||||
|
||||
let fileModelVersionFive = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG_D.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG_D.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
@@ -58,25 +82,93 @@ describe('Version component', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
let pdfUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, pdfFileModel.location, pdfFileModel.name, '-my-');
|
||||
txtUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, txtFileModel.location, txtFileModel.name, '-my-');
|
||||
Object.assign(txtFileModel, txtUploadedFile.entry);
|
||||
|
||||
Object.assign(pdfFileModel, pdfUploadedFile.entry);
|
||||
|
||||
pdfFileModel.update(pdfUploadedFile.entry);
|
||||
txtFileModel.update(txtUploadedFile.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.navigateToDocumentList();
|
||||
contentListPage.versionManagerContent(txtFileModel.name);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C272768] Versions', () => {
|
||||
contentServicesPage.navigateToDocumentList();
|
||||
viewerPage.viewFile(pdfFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
viewerPage.clickOnVersionsTab().checkUploadVersionsButtonIsDisplayed();
|
||||
expect(viewerPage.getActiveTab()).toEqual('VERSIONS');
|
||||
viewerPage.checkVersionIsDisplayed(pdfFileModel.name);
|
||||
it('[C272768] Should be visible the first file version when you upload a file', () => {
|
||||
versionManagePage.checkUploadNewVersionsButtonIsDisplayed();
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.0');
|
||||
expect(versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
});
|
||||
|
||||
it('[C279995] Should show/hide the new upload file options when click on add New version/canclel button', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
browser.driver.sleep(300);
|
||||
|
||||
Util.waitUntilElementIsVisible(versionManagePage.cancelButton);
|
||||
Util.waitUntilElementIsVisible(versionManagePage.majorRadio);
|
||||
Util.waitUntilElementIsVisible(versionManagePage.minorRadio);
|
||||
Util.waitUntilElementIsVisible(versionManagePage.cancelButton);
|
||||
Util.waitUntilElementIsVisible(versionManagePage.commentText);
|
||||
Util.waitUntilElementIsVisible(versionManagePage.uploadNewVersionButton);
|
||||
|
||||
versionManagePage.cancelButton.click();
|
||||
|
||||
browser.driver.sleep(300);
|
||||
|
||||
Util.waitUntilElementIsNotVisible(versionManagePage.cancelButton);
|
||||
Util.waitUntilElementIsNotVisible(versionManagePage.majorRadio);
|
||||
Util.waitUntilElementIsNotVisible(versionManagePage.minorRadio);
|
||||
Util.waitUntilElementIsNotVisible(versionManagePage.cancelButton);
|
||||
Util.waitUntilElementIsNotVisible(versionManagePage.commentText);
|
||||
Util.waitUntilElementIsNotVisible(versionManagePage.uploadNewVersionButton);
|
||||
|
||||
Util.waitUntilElementIsVisible(versionManagePage.showNewVersionButton);
|
||||
});
|
||||
|
||||
it('[C260244] Should show the version history when select a file with multiple version', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.0');
|
||||
expect(versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(fileModelVersionTwo.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
});
|
||||
|
||||
it('[C269084] Should be possible add a comment when add a new version', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.enterCommentText('Example comment text');
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionThree.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('1.2');
|
||||
expect(versionManagePage.getFileVersionName('1.2')).toEqual(fileModelVersionThree.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.2')).not.toBeUndefined();
|
||||
expect(versionManagePage.getFileVersionComment('1.2')).toEqual('Example comment text');
|
||||
});
|
||||
|
||||
it('[C275719] Should be possible preview the file when you add a new version', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.clickMajorChange();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionFor.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('2.0');
|
||||
expect(versionManagePage.getFileVersionName('2.0')).toEqual(fileModelVersionFor.name);
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.clickMinorChange();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionFive.location);
|
||||
|
||||
versionManagePage.chekFileVersionExist('2.1');
|
||||
expect(versionManagePage.getFileVersionName('2.1')).toEqual(fileModelVersionFive.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
@@ -44,15 +44,17 @@ describe('Save screenshot at the end', () => {
|
||||
alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
let folder = await alfrescoJsApi.nodes.addNode('-my-', {
|
||||
'name': 'contetn-services',
|
||||
'relativePath': 'Buiild-screenshot/Screenshot-e2e-' + buildNumber,
|
||||
'name': 'content-services',
|
||||
'relativePath': 'Build-screenshot/Screenshot-e2e-' + buildNumber,
|
||||
'nodeType': 'cm:folder'
|
||||
}, {}, {});
|
||||
}, {}, {
|
||||
'overwrite': true
|
||||
});
|
||||
|
||||
for (const fileName of files) {
|
||||
|
||||
let pathFile = path.join(__dirname, '../../e2e-output/screenshots', fileName);
|
||||
let file = fs.createReadStream(pathFile);
|
||||
let file: any = fs.createReadStream(pathFile);
|
||||
|
||||
await alfrescoJsApi.upload.uploadFile(
|
||||
file,
|
||||
|
@@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import ViewerPage = require('../../pages/adf/viewerPage');
|
||||
import CardViewPage = require('../../pages/adf/metadataViewPage');
|
||||
import ContentListPage = require('../../pages/adf/dialog/contentList');
|
||||
import NavigationBarPage = require('../../pages/adf/navigationBarPage');
|
||||
import { ConfigEditorPage } from '../../pages/adf/configEditorPage';
|
||||
|
||||
@@ -28,31 +28,15 @@ import FileModel = require('../../models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
|
||||
describe('Aspect oriented config', () => {
|
||||
|
||||
const METADATA = {
|
||||
DATAFORMAT: 'mmm dd yyyy',
|
||||
TITLE: 'Details',
|
||||
COMMENTS_TAB: 'COMMENTS',
|
||||
PROPERTY_TAB: 'PROPERTIES',
|
||||
DEFAULT_ASPECT: 'Properties',
|
||||
MORE_INFO_BUTTON: 'More information',
|
||||
LESS_INFO_BUTTON: 'Less information',
|
||||
ARROW_DOWN: 'keyboard_arrow_down',
|
||||
ARROW_UP: 'keyboard_arrow_up',
|
||||
EDIT_BUTTON_TOOLTIP: 'Edit'
|
||||
};
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new CardViewPage();
|
||||
const contentListPage = new ContentListPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const configEditorPage = new ConfigEditorPage();
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import NavigationBarPage = require('../../pages/adf/navigationBarPage');
|
||||
import CardViewPage = require('../../pages/adf/metadataViewPage');
|
||||
@@ -279,13 +281,13 @@ describe('CardView Component', () => {
|
||||
describe('Date and DateTime', () => {
|
||||
|
||||
it('[C279961] Should the label be present', () => {
|
||||
let label = element(by.xpath('div[data-automation-id="card-dateitem-label-date"]'));
|
||||
let labelDate = element(by.xpath('div[data-automation-id="card-dateitem-label-date"]'));
|
||||
|
||||
Util.waitUntilElementIsPresent(label);
|
||||
Util.waitUntilElementIsPresent(labelDate);
|
||||
|
||||
let label = element(by.xpath('div[data-automation-id="card-dateitem-label-datetime"]'));
|
||||
let labelDatetime = element(by.xpath('div[data-automation-id="card-dateitem-label-datetime"]'));
|
||||
|
||||
Util.waitUntilElementIsPresent(label);
|
||||
Util.waitUntilElementIsPresent(labelDatetime);
|
||||
});
|
||||
|
||||
it('[C279962] Should be present a default value', () => {
|
||||
|
@@ -16,10 +16,8 @@
|
||||
*/
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import ViewerPage = require('../../pages/adf/viewerPage');
|
||||
import CardViewPage = require('../../pages/adf/metadataViewPage');
|
||||
import ContentListPage = require('../../pages/adf/dialog/contentList');
|
||||
import NavigationBarPage = require('../../pages/adf/navigationBarPage');
|
||||
|
||||
import AcsUserModel = require('../../models/ACS/acsUserModel');
|
||||
@@ -27,14 +25,12 @@ import FileModel = require('../../models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import Util = require('../../util/util');
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
|
||||
describe('permissions', () => {
|
||||
|
||||
@@ -52,13 +48,10 @@ describe('permissions', () => {
|
||||
};
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new CardViewPage();
|
||||
const contentListPage = new ContentListPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
let consumerUser = new AcsUserModel();
|
||||
let collaboratorUser = new AcsUserModel();
|
||||
let contributorUser = new AcsUserModel();
|
||||
@@ -91,17 +84,17 @@ describe('permissions', () => {
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: consumerUser.id,
|
||||
role: 'SiteConsumer'
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: collaboratorUser.id,
|
||||
role: 'SiteCollaborator'
|
||||
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: contributorUser.id,
|
||||
role: 'SiteContributor'
|
||||
role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
|
||||
});
|
||||
|
||||
await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, site.entry.guid);
|
@@ -25,14 +25,10 @@ import FileModel = require('../../models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
|
||||
describe('CardView Component - properties', () => {
|
||||
|
||||
let METADATA = {
|
||||
|
@@ -15,12 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import ViewerPage = require('../../pages/adf/viewerPage');
|
||||
import CardViewPage = require('../../pages/adf/metadataViewPage');
|
||||
import ContentListPage = require('../../pages/adf/dialog/contentList');
|
||||
import NavigationBarPage = require('../../pages/adf/navigationBarPage');
|
||||
|
||||
import AcsUserModel = require('../../models/ACS/acsUserModel');
|
||||
import FileModel = require('../../models/ACS/fileModel');
|
||||
@@ -52,10 +53,8 @@ describe('Metadata component', () => {
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new CardViewPage();
|
||||
const contentListPage = new ContentListPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
let consumerUser = new AcsUserModel();
|
||||
|
||||
let folderName = 'Metadata Folder';
|
||||
|
||||
|
54
e2e/core/error_component.e2e.ts
Normal file
54
e2e/core/error_component.e2e.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import AcsUserModel = require('../models/ACS/acsUserModel');
|
||||
import TestConfig = require('../test.config');
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import ErrorPage = require('../pages/adf/errorPage');
|
||||
import { browser } from '../../node_modules/protractor';
|
||||
|
||||
describe('Error Component', () => {
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
let loginPage = new LoginPage();
|
||||
let errorPage = new ErrorPage();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C277302] Error message displayed without permissions', () => {
|
||||
browser.get(TestConfig.adf.url + '/error/403');
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
expect(errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
|
||||
expect(errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
});
|
||||
|
||||
});
|
@@ -19,7 +19,6 @@ import NavigationBarPage = require('../pages/adf/navigationBarPage');
|
||||
import { HeaderPage } from '../pages/adf/core/headerPage';
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import Util = require('../util/util.js');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
@@ -54,7 +53,7 @@ describe('Header Component', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async(done) =>{
|
||||
beforeEach(async(done) => {
|
||||
let users = new UsersActions();
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
@@ -83,8 +82,8 @@ describe('Header Component', () => {
|
||||
it('[C280002] Should be able to view Header component', () => {
|
||||
headerPage.checkShowMenuCheckBoxIsDisplayed();
|
||||
headerPage.checkChooseHeaderColourIsDisplayed();
|
||||
headerPage.checkChangeTitleIsDisplayed(title.default);
|
||||
headerPage.checkChangeUrlPathIsDisplayed(urlPath.default);
|
||||
headerPage.checkChangeTitleIsDisplayed();
|
||||
headerPage.checkChangeUrlPathIsDisplayed();
|
||||
|
||||
});
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import ProcessServicesPage = require('../../pages/adf/process_services/processServicesPage');
|
||||
@@ -28,7 +30,6 @@ import AdfSettingsPage = require('../../pages/adf/settingsPage');
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
|
||||
import Util = require('../../util/util');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
|
||||
describe('Login component', () => {
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
|
||||
import ProcessServicesPage = require('../../pages/adf/process_services/processServicesPage');
|
||||
|
@@ -17,8 +17,6 @@
|
||||
|
||||
import LoginPage = require('../../pages/adf/loginPage');
|
||||
|
||||
import AcsUserModel = require('../../models/ACS/acsUserModel');
|
||||
|
||||
import AdfSettingsPage = require('../../pages/adf/settingsPage');
|
||||
|
||||
describe('Login component - Remember Me', () => {
|
||||
|
@@ -77,7 +77,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
xit('Pagination - returns to previous page when current is empty', () => {
|
||||
it('Pagination - returns to previous page when current is empty', () => {
|
||||
contentServicesPage.navigateToFolder(folderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
@@ -14,6 +14,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { protractor } from 'protractor';
|
||||
|
||||
import AdfSettingsPage = require('../pages/adf/settingsPage');
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import UserInfoDialog = require('../pages/adf/dialog/userInfoDialog');
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
@@ -139,7 +141,7 @@ describe('Content Services Viewer', () => {
|
||||
|
||||
viewerPage.viewFile(pdfFile.name);
|
||||
|
||||
browser.driver.sleep(3000); //wait open file
|
||||
browser.driver.sleep(3000); // wait open file
|
||||
|
||||
viewerPage.checkFileContent('1', pdfFile.firstPageText);
|
||||
viewerPage.checkCloseButtonIsDisplayed();
|
||||
@@ -304,7 +306,7 @@ describe('Content Services Viewer', () => {
|
||||
it('[C261123] Should be able to preview all pages and navigate to a page when using thumbnails', () => {
|
||||
viewerPage.viewFile(pdfFile.name);
|
||||
|
||||
browser.driver.sleep(3000); //wait open file
|
||||
browser.driver.sleep(3000); // wait open file
|
||||
|
||||
viewerPage.checkFileContent('1', pdfFile.firstPageText);
|
||||
viewerPage.checkThumbnailsBtnIsDisplayed();
|
||||
@@ -355,7 +357,7 @@ describe('Content Services Viewer', () => {
|
||||
it('[C268901] Should need a password when opening a protected file', () => {
|
||||
viewerPage.viewFile(protectedFile.name);
|
||||
|
||||
browser.driver.sleep(3000); //wait open file
|
||||
browser.driver.sleep(3000); // wait open file
|
||||
|
||||
viewerPage.checkPasswordDialogIsDisplayed();
|
||||
viewerPage.checkPasswordSubmitDisabledIsDisplayed();
|
||||
|
@@ -45,14 +45,16 @@ describe('Save screenshot at the end', () => {
|
||||
|
||||
let folder = await alfrescoJsApi.nodes.addNode('-my-', {
|
||||
'name': 'core',
|
||||
'relativePath': 'Buiild-screenshot/Screenshot-e2e-' + buildNumber,
|
||||
'relativePath': 'Build-screenshot/Screenshot-e2e-' + buildNumber,
|
||||
'nodeType': 'cm:folder'
|
||||
}, {}, {});
|
||||
}, {}, {
|
||||
'overwrite': true
|
||||
});
|
||||
|
||||
for (const fileName of files) {
|
||||
|
||||
let pathFile = path.join(__dirname, '../../e2e-output/screenshots', fileName);
|
||||
let file = fs.createReadStream(pathFile);
|
||||
let file: any = fs.createReadStream(pathFile);
|
||||
|
||||
await alfrescoJsApi.upload.uploadFile(
|
||||
file,
|
||||
|
@@ -45,14 +45,16 @@ describe('Save screenshot at the end', () => {
|
||||
|
||||
let folder = await alfrescoJsApi.nodes.addNode('-my-', {
|
||||
'name': 'insights',
|
||||
'relativePath': 'Buiild-screenshot/Screenshot-e2e-' + buildNumber,
|
||||
'relativePath': 'Build-screenshot/Screenshot-e2e-' + buildNumber,
|
||||
'nodeType': 'cm:folder'
|
||||
}, {}, {});
|
||||
}, {}, {
|
||||
'overwrite': true
|
||||
});
|
||||
|
||||
for (const fileName of files) {
|
||||
|
||||
let pathFile = path.join(__dirname, '../../e2e-output/screenshots', fileName);
|
||||
let file = fs.createReadStream(pathFile);
|
||||
let file: any = fs.createReadStream(pathFile);
|
||||
|
||||
await alfrescoJsApi.upload.uploadFile(
|
||||
file,
|
||||
|
@@ -15,8 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
import Util = require('../../util/util');
|
||||
import TestConfig = require('../../test.config');
|
||||
|
||||
export class CommentsPage {
|
||||
|
||||
@@ -28,7 +29,6 @@ export class CommentsPage {
|
||||
commentInput = element(by.id('comment-input'));
|
||||
addCommentButton = element(by.css("[data-automation-id='comments-input-add']"));
|
||||
|
||||
|
||||
getTotalNumberOfComments() {
|
||||
Util.waitUntilElementIsVisible(this.numberOfComments);
|
||||
return this.numberOfComments.getText();
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, browser } from 'protractor';
|
||||
import Util = require('../../util/util');
|
||||
import TestConfig = require('../../test.config');
|
||||
|
||||
export class ConfigEditorPage {
|
||||
|
||||
@@ -25,7 +25,8 @@ export class ConfigEditorPage {
|
||||
browser.driver.sleep(1000);
|
||||
Util.waitUntilElementIsVisible(textField);
|
||||
textField.sendKeys('');
|
||||
textField.clear().sendKeys(text);
|
||||
textField.clear();
|
||||
textField.sendKeys(text);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@@ -374,6 +374,7 @@ var ContentServicesPage = function () {
|
||||
for (i = 0; i < content.length; i++) {
|
||||
this.deleteContent(content[i]);
|
||||
this.checkContentIsNotDisplayed(content[i]);
|
||||
browser.driver.sleep(1000);
|
||||
};
|
||||
return this;
|
||||
};
|
||||
@@ -382,6 +383,8 @@ var ContentServicesPage = function () {
|
||||
Util.waitUntilElementIsVisible(errorSnackBar);
|
||||
var deferred = protractor.promise.defer();
|
||||
errorSnackBar.getText().then(function (text) {
|
||||
/*tslint:disable-next-line*/
|
||||
console.log(text);
|
||||
deferred.fulfill(text);
|
||||
});
|
||||
return deferred.promise;
|
||||
|
@@ -14,8 +14,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, protractor } from 'protractor';
|
||||
|
||||
import Util = require('../../../util/util');
|
||||
import TestConfig = require('../../../test.config');
|
||||
|
||||
export class HeaderPage {
|
||||
|
||||
@@ -47,7 +49,7 @@ export class HeaderPage {
|
||||
}
|
||||
|
||||
changeHeaderColor(color) {
|
||||
let headerColor = element(by.css('option[value="'+color+'"]'));
|
||||
let headerColor = element(by.css('option[value="' + color + '"]'));
|
||||
return headerColor.click();
|
||||
}
|
||||
|
||||
@@ -58,16 +60,20 @@ export class HeaderPage {
|
||||
|
||||
addTitle(title) {
|
||||
Util.waitUntilElementIsVisible(this.titleInput);
|
||||
return this.titleInput.click().sendKeys(title).sendKeys(protractor.Key.ENTER);
|
||||
this.titleInput.click();
|
||||
this.titleInput.sendKeys(title);
|
||||
this.titleInput.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
checkIconIsDisplayed(url) {
|
||||
let icon = element(by.css('img[src="'+ url +'"]'));
|
||||
let icon = element(by.css('img[src="' + url + '"]'));
|
||||
Util.waitUntilElementIsVisible(icon);
|
||||
}
|
||||
|
||||
addIcon(url) {
|
||||
Util.waitUntilElementIsVisible(this.iconInput);
|
||||
return this.iconInput.click().sendKeys(url).sendKeys(protractor.Key.ENTER);
|
||||
this.iconInput.click();
|
||||
this.iconInput.sendKeys(url);
|
||||
this.iconInput.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ var Util = require('../../../util/util');
|
||||
var ContentList = function () {
|
||||
var deleteContent = element(by.css("button[data-automation-id*='DELETE']"));
|
||||
var metadataAction = element(by.css("button[data-automation-id*='METADATA']"));
|
||||
var versionManagerAction = element(by.css("button[data-automation-id*='VERSIONS']"));
|
||||
var moveContent = element(by.css("button[data-automation-id*='MOVE']"));
|
||||
var copyContent = element(by.css("button[data-automation-id*='COPY']"));
|
||||
var downloadContent = element(by.css("button[data-automation-id*='DOWNLOAD']"));
|
||||
@@ -88,6 +89,12 @@ var ContentList = function () {
|
||||
metadataAction.click();
|
||||
};
|
||||
|
||||
this.versionManagerContent = function (content) {
|
||||
this.clickOnActionMenu(content);
|
||||
this.waitForContentOptions();
|
||||
versionManagerAction.click();
|
||||
};
|
||||
|
||||
this.moveContent = function (content) {
|
||||
this.clickOnActionMenu(content);
|
||||
moveContent.click();
|
||||
|
@@ -20,8 +20,8 @@ var Util = require('../../../util/util');
|
||||
|
||||
var UploadDialog = function () {
|
||||
|
||||
var closeButton = element.all((by.css("footer[class*='upload-dialog__actions'] button"))).first();
|
||||
var dialog = element.all(by.css("div[class*='upload-dialog']")).first();
|
||||
var closeButton = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-close"]')));
|
||||
var dialog = element(by.css("div[id='upload-dialog']"));
|
||||
var minimizedDialog = element(by.css("div[class*='upload-dialog--minimized']"));
|
||||
var uploadedStatusIcon = by.css("mat-icon[class*='status--done']");
|
||||
var cancelledStatusIcon = by.css("div[class*='status--cancelled']");
|
||||
@@ -36,7 +36,7 @@ var UploadDialog = function () {
|
||||
var canUploadConfirmationDescription = element(by.css("p[class='upload-dialog__confirmation--text']"));
|
||||
var confirmationDialogNoButton = element(by.partialButtonText("No"));
|
||||
var confirmationDialogYesButton = element(by.partialButtonText("Yes"));
|
||||
var cancelUploads = element(by.partialButtonText("Cancel uploads"));
|
||||
var cancelUploads = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-cancel-all"]')));
|
||||
|
||||
this.clickOnCloseButton = function () {
|
||||
this.checkCloseButtonIsDisplayed();
|
||||
|
@@ -23,11 +23,17 @@ var ErrorPage = function(){
|
||||
var errorPageCode = element(by.css("adf-error-content .adf-error-content-code"));
|
||||
var errorPageTitle = element(by.css("adf-error-content .adf-error-content-title"));
|
||||
var errorPageDescription = element(by.css("adf-error-content .adf-error-content-description"));
|
||||
var backButton = element(by.id("adf-return-button"));
|
||||
|
||||
this.checkErrorPage = function(){
|
||||
Util.waitUntilElementIsVisible(errorPage);
|
||||
};
|
||||
|
||||
this.clickBackButton = function(){
|
||||
Util.waitUntilElementIsVisible(backButton);
|
||||
backButton.click();
|
||||
};
|
||||
|
||||
this.checkErrorTitle = function(){
|
||||
Util.waitUntilElementIsVisible(errorPageTitle);
|
||||
};
|
||||
@@ -45,6 +51,11 @@ var ErrorPage = function(){
|
||||
return errorPageCode.getText();
|
||||
};
|
||||
|
||||
this.getErrorTitle = function() {
|
||||
Util.waitUntilElementIsVisible(errorPageTitle);
|
||||
return errorPageTitle.getText();
|
||||
};
|
||||
|
||||
this.getErrorDescription = function() {
|
||||
Util.waitUntilElementIsVisible(errorPageDescription);
|
||||
return errorPageDescription.getText();
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, protractor, browser } from 'protractor';
|
||||
|
||||
import Util = require('../../../util/util');
|
||||
import TestConfig = require('../../../test.config');
|
||||
import path = require('path');
|
||||
|
@@ -76,11 +76,11 @@ var ProcessFiltersPage = function () {
|
||||
};
|
||||
|
||||
this.checkNoContentMessage = function () {
|
||||
Util.waitUntilElementIsVisible(noContentMessage);
|
||||
return Util.waitUntilElementIsVisible(noContentMessage);
|
||||
};
|
||||
|
||||
this.selectFromProcessList = function (title) {
|
||||
var processName = element.all(by.css('div[data-automation-id="text_'+ title +'"]')).first();
|
||||
var processName = element.all(by.css('div[data-automation-id="text_' + title + '"]')).first();
|
||||
Util.waitUntilElementIsVisible(processName);
|
||||
processName.click();
|
||||
};
|
||||
@@ -94,7 +94,7 @@ var ProcessFiltersPage = function () {
|
||||
return element.all(rows).count();
|
||||
};
|
||||
|
||||
this.waitForTableBody = function (){
|
||||
this.waitForTableBody = function () {
|
||||
Util.waitUntilElementIsVisible(tableBody);
|
||||
};
|
||||
|
||||
|
@@ -125,7 +125,7 @@ var SearchResultsPage = function () {
|
||||
* @param sortOrder: 'true' to sort the list ascendant and 'false' for descendant
|
||||
*/
|
||||
this.sortByAuthor = function (sortOrder) {
|
||||
contentList.sortByAuthor(sortOrder);
|
||||
this.sortBy(sortOrder, "Author");
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -134,7 +134,7 @@ var SearchResultsPage = function () {
|
||||
* @param sortOrder: 'true' to sort the list ascendant and 'false' for descendant
|
||||
*/
|
||||
this.sortByCreated = function (sortOrder) {
|
||||
return contentList.sortByCreated(sortOrder);
|
||||
this.sortBy(sortOrder, "Created");
|
||||
};
|
||||
|
||||
/**
|
||||
|
229
e2e/pages/adf/versionManagerPage.ts
Normal file
229
e2e/pages/adf/versionManagerPage.ts
Normal file
@@ -0,0 +1,229 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Util = require('../../util/util');
|
||||
import TestConfig = require('../../test.config');
|
||||
import path = require('path');
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
|
||||
export class VersionManagePage {
|
||||
|
||||
showNewVersionButton = element(by.css('#adf-show-version-upload-button'));
|
||||
uploadNewVersionButton = element(by.css('adf-upload-version-button input[data-automation-id="upload-single-file"]'));
|
||||
uploadNewVersionContainer = element(by.css('#adf-new-version-uploader-container'));
|
||||
cancelButton = element(by.css('#adf-new-version-cancel'));
|
||||
majorRadio = element(by.css('#adf-new-version-major'));
|
||||
minorRadio = element(by.css('#adf-new-version-minor'));
|
||||
commentText = element(by.css('#adf-new-version-text-area'));
|
||||
readOnlySwitch = element(by.id('adf-version-manager-switch-readonly'));
|
||||
downloadSwitch = element(by.id('adf-version-manager-switch-download'));
|
||||
commentsSwitch = element(by.id('adf-version-manager-switch-comments'));
|
||||
|
||||
checkUploadNewVersionsButtonIsDisplayed() {
|
||||
Util.waitUntilElementIsVisible(this.showNewVersionButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
uploadNewVersionFile = function (fileLocation) {
|
||||
Util.waitUntilElementIsVisible(this.uploadNewVersionButton);
|
||||
this.uploadNewVersionButton.sendKeys(path.resolve(path.join(TestConfig.main.rootPath, fileLocation)));
|
||||
Util.waitUntilElementIsVisible(this.showNewVersionButton);
|
||||
return this;
|
||||
};
|
||||
|
||||
getFileVersionName(version) {
|
||||
let fileElement = element(by.css(`[id="adf-version-list-item-name-${version}"]`));
|
||||
Util.waitUntilElementIsVisible(fileElement);
|
||||
return fileElement.getText();
|
||||
}
|
||||
|
||||
chekFileVersionExist(version) {
|
||||
let fileVersion = element(by.css(`[id="adf-version-list-item-version-${version}"]`));
|
||||
return Util.waitUntilElementIsVisible(fileVersion);
|
||||
}
|
||||
|
||||
chekFileVersionNotExist(version) {
|
||||
let fileVersion = element(by.css(`[id="adf-version-list-item-version-${version}"]`));
|
||||
return Util.waitUntilElementIsNotVisible(fileVersion);
|
||||
}
|
||||
|
||||
getFileVersionComment(version) {
|
||||
let fileComment = element(by.css(`[id="adf-version-list-item-comment-${version}"]`));
|
||||
Util.waitUntilElementIsVisible(fileComment);
|
||||
return fileComment.getText();
|
||||
}
|
||||
|
||||
getFileVersionDate(version) {
|
||||
let fileDate = element(by.css(`[id="adf-version-list-item-date-${version}"]`));
|
||||
Util.waitUntilElementIsVisible(fileDate);
|
||||
return fileDate.getText();
|
||||
}
|
||||
|
||||
enterCommentText(text) {
|
||||
Util.waitUntilElementIsVisible(this.commentText);
|
||||
this.commentText.sendKeys('');
|
||||
this.commentText.clear();
|
||||
this.commentText.sendKeys(text);
|
||||
return this;
|
||||
}
|
||||
|
||||
clickMajorChange() {
|
||||
let radioMajor = element(by.css(`[id="adf-new-version-major"]`));
|
||||
Util.waitUntilElementIsVisible(radioMajor);
|
||||
radioMajor.click();
|
||||
}
|
||||
|
||||
clickMinorChange() {
|
||||
let radioMinor = element(by.css(`[id="adf-new-version-minor"]`));
|
||||
Util.waitUntilElementIsVisible(radioMinor);
|
||||
radioMinor.click();
|
||||
}
|
||||
|
||||
/**
|
||||
* disables download
|
||||
*/
|
||||
disableReadOnly() {
|
||||
Util.waitUntilElementIsVisible(this.readOnlySwitch);
|
||||
this.readOnlySwitch.getAttribute('class').then((check) => {
|
||||
if (check.indexOf('mat-checked') >= 0) {
|
||||
this.readOnlySwitch.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* enables download
|
||||
*/
|
||||
enableReadOnly() {
|
||||
Util.waitUntilElementIsVisible(this.readOnlySwitch);
|
||||
this.readOnlySwitch.getAttribute('class').then((check) => {
|
||||
if (check.indexOf('mat-checked') < 0) {
|
||||
this.readOnlySwitch.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* disables download
|
||||
*/
|
||||
disableDownload() {
|
||||
Util.waitUntilElementIsVisible(this.downloadSwitch);
|
||||
this.downloadSwitch.getAttribute('class').then((check) => {
|
||||
if (check.indexOf('mat-checked') >= 0) {
|
||||
this.downloadSwitch.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* enables download
|
||||
*/
|
||||
enableDownload() {
|
||||
Util.waitUntilElementIsVisible(this.downloadSwitch);
|
||||
this.downloadSwitch.getAttribute('class').then((check) => {
|
||||
if (check.indexOf('mat-checked') < 0) {
|
||||
this.downloadSwitch.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* disables comments
|
||||
*/
|
||||
disableComments() {
|
||||
Util.waitUntilElementIsVisible(this.commentsSwitch);
|
||||
this.commentsSwitch.getAttribute('class').then((check) => {
|
||||
if (check.indexOf('mat-checked') >= 0) {
|
||||
this.commentsSwitch.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* enables comments
|
||||
*/
|
||||
enableComments() {
|
||||
Util.waitUntilElementIsVisible(this.commentsSwitch);
|
||||
this.commentsSwitch.getAttribute('class').then((check) => {
|
||||
if (check.indexOf('mat-checked') < 0) {
|
||||
this.commentsSwitch.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
clickActionButton(version) {
|
||||
Util.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-menu-button-${version}"]`)));
|
||||
element(by.css(`[id="adf-version-list-action-menu-button-${version}"]`)).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
clickAcceptConfirm() {
|
||||
Util.waitUntilElementIsVisible(element(by.css(`[id="adf-confirm-accept"]`)));
|
||||
element(by.css(`[id="adf-confirm-accept"]`)).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
clickCancelConfirm() {
|
||||
Util.waitUntilElementIsVisible(element(by.css(`[id="adf-confirm-cancel"]`)));
|
||||
element(by.css(`[id="adf-confirm-cancel"]`)).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
closeActionButton() {
|
||||
browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
|
||||
return this;
|
||||
}
|
||||
|
||||
downloadFileVersion(version) {
|
||||
this.clickActionButton(version);
|
||||
let downloadButton = element(by.css(`[id="adf-version-list-action-download-${version}"]`));
|
||||
Util.waitUntilElementIsVisible(downloadButton);
|
||||
browser.driver.sleep(500);
|
||||
downloadButton.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
deleteFileVersion(version) {
|
||||
this.clickActionButton(version);
|
||||
let deleteButton = element(by.css(`[id="adf-version-list-action-delete-${version}"]`));
|
||||
Util.waitUntilElementIsVisible(deleteButton);
|
||||
browser.driver.sleep(500);
|
||||
deleteButton.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
restoreFileVersion(version) {
|
||||
this.clickActionButton(version);
|
||||
let restoreButton = element(by.css(`[id="adf-version-list-action-restore-${version}"]`));
|
||||
Util.waitUntilElementIsVisible(restoreButton);
|
||||
browser.driver.sleep(500);
|
||||
restoreButton.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
checkActionsArePresent(version) {
|
||||
Util.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-download-${version}"]`)));
|
||||
Util.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-delete-${version}"]`)));
|
||||
Util.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-restore-${version}"]`)));
|
||||
}
|
||||
|
||||
closeVersionDialog() {
|
||||
browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
|
||||
Util.waitUntilElementIsNotOnPage(this.uploadNewVersionContainer);
|
||||
}
|
||||
}
|
@@ -15,12 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import ProcessServicesPage = require('../pages/adf/process_services/processServicesPage');
|
||||
import NavigationBarPage = require('../pages/adf/navigationBarPage');
|
||||
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import Util = require('../util/util');
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
@@ -29,7 +29,6 @@ import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { ModelsActions } from '../actions/APS/models.actions';
|
||||
import AppPublish = require('../models/APS/AppPublish');
|
||||
|
||||
describe('Modify applications', () => {
|
||||
|
||||
@@ -43,7 +42,7 @@ describe('Modify applications', () => {
|
||||
let modelActions = new ModelsActions();
|
||||
let firstApp, appVersionToBeDeleted;
|
||||
|
||||
beforeAll(async(done) => {
|
||||
beforeAll(async (done) => {
|
||||
let users = new UsersActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -75,7 +74,7 @@ describe('Modify applications', () => {
|
||||
expect(processServicesPage.getDescription(app.title)).toEqual(app.description);
|
||||
});
|
||||
|
||||
it('[C260213] Should a new version of the app be displayed on dashboard when is replaced by importing another app in APS', async() => {
|
||||
it('[C260213] Should a new version of the app be displayed on dashboard when is replaced by importing another app in APS', async () => {
|
||||
navigationBarPage.clickProcessServicesButton();
|
||||
|
||||
processServicesPage.checkApsContainer();
|
||||
@@ -97,7 +96,7 @@ describe('Modify applications', () => {
|
||||
expect(processServicesPage.getDescription(app.title)).toEqual(app.description);
|
||||
});
|
||||
|
||||
it('[C260220] Should the app not be displayed on dashboard after it was deleted in APS', async() => {
|
||||
it('[C260220] Should the app not be displayed on dashboard after it was deleted in APS', async () => {
|
||||
navigationBarPage.clickProcessServicesButton();
|
||||
|
||||
processServicesPage.checkApsContainer();
|
||||
@@ -114,7 +113,7 @@ describe('Modify applications', () => {
|
||||
processServicesPage.checkAppIsNotDisplayed(app.title);
|
||||
});
|
||||
|
||||
it('[C260215] Should the penultimate version of an app be displayed on dashboard when the last version is deleted in APS', async() => {
|
||||
it('[C260215] Should the penultimate version of an app be displayed on dashboard when the last version is deleted in APS', async () => {
|
||||
navigationBarPage.clickProcessServicesButton();
|
||||
|
||||
processServicesPage.checkApsContainer();
|
||||
@@ -132,7 +131,7 @@ describe('Modify applications', () => {
|
||||
|
||||
expect(processServicesPage.getBackgroundColor(appTobeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.GREY);
|
||||
|
||||
browser.controlFlow().execute(async() => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
await modelActions.deleteVersionModel(this.alfrescoJsApi, appVersionToBeDeleted.id);
|
||||
await modelActions.deleteVersionModel(this.alfrescoJsApi, appVersionToBeDeleted.id);
|
||||
await apps.publishDeployApp(this.alfrescoJsApi, appVersionToBeDeleted.id);
|
||||
|
@@ -40,7 +40,7 @@ describe('Checklist component', () => {
|
||||
let taskPage = new TasksPage();
|
||||
|
||||
let tasks = ['no checklist created task', 'checklist number task', 'remove running checklist', 'remove completed checklist', 'hierarchy'];
|
||||
let checklists= ['cancelCheckList', 'dialogChecklist', 'addFirstChecklist', 'addSecondChecklist'];
|
||||
let checklists = ['cancelCheckList', 'dialogChecklist', 'addFirstChecklist', 'addSecondChecklist'];
|
||||
let removeChecklist = ['removeFirstRunningChecklist', 'removeSecondRunningChecklist', 'removeFirstCompletedChecklist', 'removeSecondCompletedChecklist'];
|
||||
let hierarchyChecklist = ['checklistOne', 'checklistTwo', 'checklistOneChild', 'checklistTwoChild'];
|
||||
|
||||
@@ -178,7 +178,7 @@ describe('Checklist component', () => {
|
||||
|
||||
taskPage.usingTasksListPage().selectTaskFromTasksList(tasks[4]);
|
||||
taskPage.completeTaskNoForm();
|
||||
|
||||
|
||||
taskPage.usingFiltersPage().goToFilter(CONSTANTS.TASKFILTERS.COMPL_TASKS);
|
||||
taskPage.usingTasksListPage().checkTaskIsDisplayedInTasksList(tasks[4]);
|
||||
taskPage.usingTasksListPage().checkTaskIsDisplayedInTasksList(hierarchyChecklist[0]);
|
||||
@@ -188,4 +188,3 @@ describe('Checklist component', () => {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
@@ -15,15 +15,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import ProcessServicesPage = require('../pages/adf/process_services/processServicesPage');
|
||||
import ProcessFiltersPage = require('../pages/adf/process_services/processFiltersPage.js');
|
||||
import { CommentsPage } from '../pages/adf/commentsPage';
|
||||
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import Util = require('../util/util.js');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
@@ -45,10 +44,10 @@ describe('Comment component for Processes', () => {
|
||||
hostBpm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
done();
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async(done) =>{
|
||||
beforeEach(async(done) => {
|
||||
let apps = new AppsActions();
|
||||
let users = new UsersActions();
|
||||
|
||||
@@ -85,7 +84,7 @@ describe('Comment component for Processes', () => {
|
||||
|
||||
it('[C260464] Should be able to add a comment on APS and check on ADF', () => {
|
||||
browser.controlFlow().execute(async() => {
|
||||
comment = {message: "HELLO"};
|
||||
comment = {message: 'HELLO'};
|
||||
|
||||
await this.alfrescoJsApi.activiti.commentsApi.addProcessInstanceComment(comment, processInstanceId);
|
||||
});
|
||||
@@ -100,7 +99,7 @@ describe('Comment component for Processes', () => {
|
||||
|
||||
commentsPage.checkUserIconIsDisplayed(0);
|
||||
|
||||
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments ('+ addedComment.total +')');
|
||||
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (' + addedComment.total + ')');
|
||||
expect(commentsPage.getMessage(0)).toEqual(addedComment.data[0].message);
|
||||
expect(commentsPage.getUserName(0)).toEqual(addedComment.data[0].createdBy.firstName + ' ' + addedComment.data[0].createdBy.lastName);
|
||||
expect(commentsPage.getTime(0)).toEqual('a few seconds ago');
|
||||
@@ -109,7 +108,7 @@ describe('Comment component for Processes', () => {
|
||||
|
||||
it('[C260465] Should not be able to view process comment on included task', () => {
|
||||
browser.controlFlow().execute(async() => {
|
||||
comment = {message: "GOODBYE"};
|
||||
comment = {message: 'GOODBYE'};
|
||||
|
||||
await this.alfrescoJsApi.activiti.commentsApi.addProcessInstanceComment(comment, processInstanceId);
|
||||
});
|
||||
@@ -135,7 +134,7 @@ describe('Comment component for Processes', () => {
|
||||
|
||||
let taskId = taskQuery.data[0].id;
|
||||
|
||||
taskComment = {message: "Task Comment"};
|
||||
taskComment = {message: 'Task Comment'};
|
||||
|
||||
await this.alfrescoJsApi.activiti.taskApi.addTaskComment(taskComment, taskId);
|
||||
});
|
||||
@@ -150,7 +149,7 @@ describe('Comment component for Processes', () => {
|
||||
|
||||
commentsPage.checkUserIconIsDisplayed(0);
|
||||
|
||||
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments ('+ addedTaskComment.total +')');
|
||||
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (' + addedTaskComment.total + ')');
|
||||
expect(commentsPage.getMessage(0)).toEqual(addedTaskComment.data[0].message);
|
||||
expect(commentsPage.getUserName(0)).toEqual(addedTaskComment.data[0].createdBy.firstName + ' ' + addedTaskComment.data[0].createdBy.lastName);
|
||||
expect(commentsPage.getTime(0)).toEqual('a few seconds ago');
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import ProcessServicesPage = require('../pages/adf/process_services/processServicesPage');
|
||||
import TasksPage = require('../pages/adf/process_services/tasksPage');
|
||||
@@ -24,7 +26,6 @@ import CONSTANTS = require('../util/constants');
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import Util = require('../util/util.js');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
@@ -55,7 +56,7 @@ describe('Comment component for Processes', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async(done) =>{
|
||||
beforeEach(async(done) => {
|
||||
let apps = new AppsActions();
|
||||
let users = new UsersActions();
|
||||
|
||||
@@ -114,8 +115,8 @@ describe('Comment component for Processes', () => {
|
||||
|
||||
await this.alfrescoJsApi.activiti.taskApi.involveUser(newTaskId, {email: secondUser.email});
|
||||
|
||||
let taskComment = {message: "Task Comment"};
|
||||
let secondTaskComment = {message: "Second Task Comment"};
|
||||
let taskComment = {message: 'Task Comment'};
|
||||
let secondTaskComment = {message: 'Second Task Comment'};
|
||||
|
||||
await this.alfrescoJsApi.activiti.taskApi.addTaskComment(taskComment, newTaskId);
|
||||
await this.alfrescoJsApi.activiti.taskApi.addTaskComment(secondTaskComment, newTaskId);
|
||||
@@ -130,12 +131,12 @@ describe('Comment component for Processes', () => {
|
||||
browser.controlFlow().execute(async() => {
|
||||
let totalComments = await this.alfrescoJsApi.activiti.taskApi.getTaskComments(newTaskId, {'latestFirst': true});
|
||||
|
||||
let thirdTaskComment = {message: "Third Task Comment"};
|
||||
let thirdTaskComment = {message: 'Third Task Comment'};
|
||||
|
||||
await commentsPage.checkUserIconIsDisplayed(0);
|
||||
await commentsPage.checkUserIconIsDisplayed(1);
|
||||
|
||||
await expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments ('+ totalComments.total +')');
|
||||
await expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (' + totalComments.total + ')');
|
||||
|
||||
await expect(commentsPage.getMessage(0)).toEqual(totalComments.data[0].message);
|
||||
await expect(commentsPage.getMessage(1)).toEqual(totalComments.data[1].message);
|
||||
@@ -164,7 +165,7 @@ describe('Comment component for Processes', () => {
|
||||
await commentsPage.checkUserIconIsDisplayed(1);
|
||||
await commentsPage.checkUserIconIsDisplayed(2);
|
||||
|
||||
await expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments ('+ totalComments.total +')');
|
||||
await expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (' + totalComments.total + ')');
|
||||
|
||||
await expect(commentsPage.getMessage(0)).toEqual(totalComments.data[0].message);
|
||||
await expect(commentsPage.getMessage(1)).toEqual(totalComments.data[1].message);
|
||||
|
@@ -15,14 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import ProcessServicesPage = require('../pages/adf/process_services/processServicesPage');
|
||||
import ProcessFiltersPage = require('../pages/adf/process_services/processFiltersPage.js');
|
||||
import FiltersPage = require('../pages/adf/process_services/filtersPage.js')
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import Util = require('../util/util.js');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
|
@@ -15,14 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import ProcessServicesPage = require('../pages/adf/process_services/processServicesPage');
|
||||
import ProcessFiltersPage = require('../pages/adf/process_services/processFiltersPage.js');
|
||||
import FiltersPage = require('../pages/adf/process_services/filtersPage.js')
|
||||
import FiltersPage = require('../pages/adf/process_services/filtersPage.js');
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import Util = require('../util/util.js');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
@@ -96,41 +97,29 @@ describe('Sorting for process filters', () => {
|
||||
it('[C260476] Should be able to create a filter on APS for running processes - Oldest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.running_old_first,
'icon': 'glyphicon-random',
|
||||
'filter':{'sort': 'created-asc', 'name': '', 'state': 'running'}
|
||||
'appId': null,
'name': processFilter.running_old_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-asc', 'name': '', 'state': 'running'}
|
||||
});
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
processServicesPage
|
||||
});
loginPage.loginToProcessServicesUsingUserModel(user);
processServicesPage
|
||||
.goToProcessServices()
|
||||
.goToTaskApp()
|
||||
.clickProcessButton();
|
||||
|
||||
processFiltersPage.checkFilterIsDisplayed(processFilter.running_old_first);
|
||||
|
||||
filtersPage.goToFilter(processFilter.running_old_first);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
.clickProcessButton();
processFiltersPage.checkFilterIsDisplayed(processFilter.running_old_first);
filtersPage.goToFilter(processFilter.running_old_first);
browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
"processDefinitionId":null,"appDefinitionId":null,"state":"running","sort":"created-asc"
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-asc'
|
||||
});
|
||||
expect(processesQuery.data[0].name).toEqual('Process 1');
|
||||
expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
expect(processesQuery.data[2].name).toEqual('Process 3');
|
||||
});
|
||||
});
|
||||
});
});
|
||||
|
||||
it('[C260477] Should be able to create a filter on APS for completed processes - Oldest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.completed_old_first,
'icon': 'glyphicon-random',
|
||||
'filter':{'sort': 'created-asc', 'name': '', 'state': 'completed'}
|
||||
'appId': null,
'name': processFilter.completed_old_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-asc', 'name': '', 'state': 'completed'}
|
||||
});
|
||||
|
||||
let firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -155,7 +144,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
"processDefinitionId":null,"appDefinitionId":null,"state":"completed","sort":"created-asc"
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-asc'
|
||||
});
|
||||
expect(processesQuery.data[0].name).toEqual('Process 1');
|
||||
expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
@@ -166,8 +155,8 @@ describe('Sorting for process filters', () => {
|
||||
it('[C260478] Should be able to create a filter on APS for all processes - Oldest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.all_old_first,
'icon': 'glyphicon-random',
|
||||
'filter':{'sort': 'created-asc', 'name': '', 'state': 'all'}
|
||||
'appId': null,
'name': processFilter.all_old_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-asc', 'name': '', 'state': 'all'}
|
||||
});
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -196,7 +185,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
"processDefinitionId":null,"appDefinitionId":null,"state":"all","sort":"created-asc"
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-asc'
|
||||
});
|
||||
expect(processesQuery.data[0].name).toEqual('Process 1');
|
||||
expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
@@ -210,8 +199,8 @@ describe('Sorting for process filters', () => {
|
||||
it('[C260479] Should be able to create a filter on APS for running processes - Newest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.running_new_first,
'icon': 'glyphicon-random',
|
||||
'filter':{'sort': 'created-desc', 'name': '', 'state': 'running'}
|
||||
'appId': null,
'name': processFilter.running_new_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-desc', 'name': '', 'state': 'running'}
|
||||
});
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -232,7 +221,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
"processDefinitionId":null,"appDefinitionId":null,"state":"running","sort":"created-desc"
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-desc'
|
||||
});
|
||||
expect(processesQuery.data[0].name).toEqual('Process 3');
|
||||
expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
@@ -243,8 +232,8 @@ describe('Sorting for process filters', () => {
|
||||
it('[C260480] Should be able to create a filter on APS for completed processes - Newest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.completed_new_first,
'icon': 'glyphicon-random',
|
||||
'filter':{'sort': 'created-desc', 'name': '', 'state': 'completed'}
|
||||
'appId': null,
'name': processFilter.completed_new_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-desc', 'name': '', 'state': 'completed'}
|
||||
});
|
||||
|
||||
let firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -269,7 +258,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
"processDefinitionId":null,"appDefinitionId":null,"state":"completed","sort":"created-desc"
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-desc'
|
||||
});
|
||||
expect(processesQuery.data[0].name).toEqual('Process 3');
|
||||
expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
@@ -280,8 +269,8 @@ describe('Sorting for process filters', () => {
|
||||
it('[C260481] Should be able to create a filter on APS for all processes - Newest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.all_new_first,
'icon': 'glyphicon-random',
|
||||
'filter':{'sort': 'created-desc', 'name': '', 'state': 'all'}
|
||||
'appId': null,
'name': processFilter.all_new_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-desc', 'name': '', 'state': 'all'}
|
||||
});
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -310,7 +299,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
"processDefinitionId":null,"appDefinitionId":null,"state":"all","sort":"created-desc"
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-desc'
|
||||
});
|
||||
expect(processesQuery.data[0].name).toEqual('Process 6');
|
||||
expect(processesQuery.data[1].name).toEqual('Process 5');
|
||||
@@ -321,11 +310,11 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C272815] Should be able to create a filter on APS for completed processes - Completed most recently and check on ADF', () =>{
|
||||
it('[C272815] Should be able to create a filter on APS for completed processes - Completed most recently and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.completed_most_recently,
'icon': 'glyphicon-random',
|
||||
'filter':{'sort': 'ended-asc', 'name': '', 'state': 'completed'}
|
||||
'appId': null,
'name': processFilter.completed_most_recently,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'ended-asc', 'name': '', 'state': 'completed'}
|
||||
});
|
||||
|
||||
let firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -350,7 +339,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
"processDefinitionId":null,"appDefinitionId":null,"state":"completed","sort":"ended-asc"
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-asc'
|
||||
});
|
||||
expect(processesQuery.data[0].name).toEqual('Process 2');
|
||||
expect(processesQuery.data[1].name).toEqual('Process 1');
|
||||
@@ -361,8 +350,8 @@ describe('Sorting for process filters', () => {
|
||||
it('[C272816] Should be able to create a filter on APS for completed processes - Completed least recently and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.completed_least_recently,
'icon': 'glyphicon-random',
|
||||
'filter':{'sort': 'ended-desc', 'name': '', 'state': 'completed'}
|
||||
'appId': null,
'name': processFilter.completed_least_recently,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'ended-desc', 'name': '', 'state': 'completed'}
|
||||
});
|
||||
|
||||
let firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -387,7 +376,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
"processDefinitionId":null,"appDefinitionId":null,"state":"completed","sort":"ended-desc"
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-desc'
|
||||
});
|
||||
expect(processesQuery.data[0].name).toEqual('Process 3');
|
||||
expect(processesQuery.data[1].name).toEqual('Process 1');
|
||||
|
@@ -38,9 +38,9 @@ describe('People component', () => {
|
||||
let processUserModel, assigneeUserModel, secondAssigneeUserModel;
|
||||
let app = resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
let taskPage = new TasksPage();
|
||||
let peopleTitle = "People this task is shared with ";
|
||||
let peopleTitle = 'People this task is shared with ';
|
||||
|
||||
let tasks = ['no people involved task', 'remove people task', 'can not complete task', 'multiple users', 'completed filter'];
|
||||
let tasks = ['no people involved task', 'remove people task', 'can not complete task', 'multiple users', 'completed filter'];
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let users = new UsersActions();
|
||||
@@ -177,8 +177,8 @@ describe('People component', () => {
|
||||
expect(taskPage.usingTaskDetails().getInvolvedUserEmail(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName))
|
||||
.toEqual(assigneeUserModel.email);
|
||||
expect(taskPage.usingTaskDetails().getInvolvedUserEditAction(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName))
|
||||
.toEqual("can edit");
|
||||
expect(taskPage.usingTaskDetails().getInvolvedPeopleTitle()).toEqual(peopleTitle + "(1)");
|
||||
.toEqual('can edit');
|
||||
expect(taskPage.usingTaskDetails().getInvolvedPeopleTitle()).toEqual(peopleTitle + '(1)');
|
||||
|
||||
taskPage.usingTaskDetails().clickInvolvePeopleButton()
|
||||
.typeUser(secondAssigneeUserModel.firstName + ' ' + secondAssigneeUserModel.lastName)
|
||||
@@ -190,8 +190,8 @@ describe('People component', () => {
|
||||
.toEqual(secondAssigneeUserModel.email);
|
||||
|
||||
expect(taskPage.usingTaskDetails().getInvolvedUserEditAction(secondAssigneeUserModel.firstName + ' ' + secondAssigneeUserModel.lastName))
|
||||
.toEqual("can edit");
|
||||
expect(taskPage.usingTaskDetails().getInvolvedPeopleTitle()).toEqual(peopleTitle + "(2)");
|
||||
.toEqual('can edit');
|
||||
expect(taskPage.usingTaskDetails().getInvolvedPeopleTitle()).toEqual(peopleTitle + '(2)');
|
||||
});
|
||||
|
||||
it('[C280014] Should involved user see the task in completed filters when the task is completed', () => {
|
||||
@@ -224,4 +224,3 @@ describe('People component', () => {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
@@ -22,8 +22,6 @@ import ProcessDetailsPage = require('../pages/adf/process_services/processDetail
|
||||
import { AttachmentListPage } from '../pages/adf/process_services/attachmentListPage';
|
||||
import ViewerPage = require('../pages/adf/viewerPage.js');
|
||||
|
||||
import CONSTANTS = require('../util/constants');
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import Util = require('../util/util.js');
|
||||
@@ -98,7 +96,7 @@ describe('Attachment list action menu for processes', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
xit('[C260228] Option menu functionality - Active Process', () => {
|
||||
it('[C260228] Option menu functionality - Active Process', () => {
|
||||
processServicesPage.goToProcessServices().goToApp(app.title).clickProcessButton();
|
||||
|
||||
processFiltersPage.selectFromProcessList(processName.active);
|
||||
@@ -132,7 +130,7 @@ describe('Attachment list action menu for processes', () => {
|
||||
attachmentListPage.checkFileIsRemoved(pngFile.name);
|
||||
});
|
||||
|
||||
xit('[C279886] Option menu functionality - Completed Process', () => {
|
||||
it('[C279886] Option menu functionality - Completed Process', () => {
|
||||
processServicesPage.goToProcessServices().goToApp(app.title).clickProcessButton();
|
||||
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
|
@@ -29,7 +29,6 @@ import AlfrescoApi = require('alfresco-js-api-node');
|
||||
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Process Filters Test', () => {
|
||||
|
||||
@@ -75,7 +74,7 @@ describe('Process Filters Test', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach( () => {
|
||||
beforeEach(() => {
|
||||
navigationBarPage.clickProcessServicesButton();
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.goToApp(app.title);
|
||||
|
@@ -51,7 +51,7 @@ describe('Process List - Pagination', function () {
|
||||
let paginationPage = new PaginationPage();
|
||||
let processFiltersPage = new ProcessFiltersPage();
|
||||
let processDetailsPage = new ProcessDetailsPage();
|
||||
|
||||
let deployedTestApp;
|
||||
let processUserModel;
|
||||
let app = resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
let nrOfProcesses = 20;
|
||||
@@ -73,283 +73,322 @@ describe('Process List - Pagination', function () {
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
let resultApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
|
||||
for (let i = 0; i < nrOfProcesses; i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
}
|
||||
deployedTestApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
xit('[C261042] Default pagination', function () {
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.checkNoContentMessage();
|
||||
paginationPage.checkPaginationIsNotDisplayed();
|
||||
describe('Empty processes', function () {
|
||||
|
||||
page = 1;
|
||||
totalPages = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfProcesses + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(nrOfProcesses);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
xit('[C261043] Items per page set to 15', function () {
|
||||
page = 1;
|
||||
totalPages = 2;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fifteenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + nrOfProcesses + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(nrOfProcesses - itemsPerPage.fifteenValue);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
});
|
||||
|
||||
xit('[C261044] Items per page set to 10', function () {
|
||||
page = 1;
|
||||
totalPages = 2;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + nrOfProcesses + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
});
|
||||
|
||||
it('[C261047] Items per page set to 20', function () {
|
||||
page = 1;
|
||||
totalPages = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfProcesses + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(nrOfProcesses);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
});
|
||||
|
||||
it('[C261045] 5 Items per page', function () {
|
||||
page = 1;
|
||||
totalPages = 4;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.five * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fiveValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 6-' + itemsPerPage.five * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fiveValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.five * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fiveValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + itemsPerPage.five * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fiveValue);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
});
|
||||
|
||||
it('[C261049] Page number dropdown', function () {
|
||||
page = 1;
|
||||
totalPages = 2;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
paginationPage.clickOnPageDropdown();
|
||||
expect(paginationPage.getPageDropdownOptions()).toEqual(['1', '2']);
|
||||
page = 2;
|
||||
paginationPage.clickOnPageDropdownOption('2');
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.tenValue * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
paginationPage.clickOnPageDropdown();
|
||||
expect(paginationPage.getPageDropdownOptions()).toEqual(['1', '2']);
|
||||
page = 1;
|
||||
paginationPage.clickOnPageDropdownOption('1');
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
xit('[C261048] Sorting by Name', function () {
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
processFiltersPage.sortByName(true);
|
||||
processFiltersPage.waitForTableBody();
|
||||
processFiltersPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(JSON.stringify(list) === JSON.stringify(processNames)).toEqual(true);
|
||||
it('[C261042] Should show empty content message an no pagination when no process are present', function () {
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.checkNoContentMessage();
|
||||
paginationPage.checkPaginationIsNotDisplayed();
|
||||
});
|
||||
processFiltersPage.sortByName(false);
|
||||
processFiltersPage.getAllRowsNameColumn().then(function (list) {
|
||||
processNames.reverse();
|
||||
expect(JSON.stringify(list) === JSON.stringify(processNames)).toEqual(true);
|
||||
});
|
||||
|
||||
describe('With processes Pagination', function () {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let apps = new AppsActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'BPM',
|
||||
hostBpm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
for (let i = 0; i < nrOfProcesses; i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, deployedTestApp);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C261042] Default pagination', function () {
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
|
||||
page = 1;
|
||||
totalPages = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfProcesses + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(nrOfProcesses);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('[C261043] Items per page set to 15', function () {
|
||||
page = 1;
|
||||
totalPages = 2;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fifteenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + nrOfProcesses + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(nrOfProcesses - itemsPerPage.fifteenValue);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
});
|
||||
|
||||
it('[C261044] Items per page set to 10', function () {
|
||||
page = 1;
|
||||
totalPages = 2;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue * page + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + nrOfProcesses + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
});
|
||||
|
||||
it('[C261047] Items per page set to 20', function () {
|
||||
page = 1;
|
||||
totalPages = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfProcesses + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(nrOfProcesses);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
});
|
||||
|
||||
it('[C261045] 5 Items per page', function () {
|
||||
let showing;
|
||||
page = 1;
|
||||
totalPages = 4;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
|
||||
showing = (itemsPerPage.fiveValue * page);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + showing + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fiveValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
|
||||
showing = (itemsPerPage.fiveValue * page);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 6-' + showing + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fiveValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
|
||||
showing = (itemsPerPage.fiveValue * page);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + showing + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fiveValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
|
||||
showing = (itemsPerPage.fiveValue * page);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + showing + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fiveValue);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
page = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
});
|
||||
|
||||
it('[C261049] Page number dropdown', function () {
|
||||
let showing;
|
||||
page = 1;
|
||||
totalPages = 2;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
|
||||
showing = (itemsPerPage.tenValue * page);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + showing + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
paginationPage.clickOnPageDropdown();
|
||||
expect(paginationPage.getPageDropdownOptions()).toEqual(['1', '2']);
|
||||
page = 2;
|
||||
paginationPage.clickOnPageDropdownOption('2');
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
|
||||
showing = (itemsPerPage.tenValue * page);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + showing + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsEnabled();
|
||||
|
||||
paginationPage.clickOnPageDropdown();
|
||||
expect(paginationPage.getPageDropdownOptions()).toEqual(['1', '2']);
|
||||
page = 1;
|
||||
paginationPage.clickOnPageDropdownOption('1');
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
|
||||
showing = (itemsPerPage.tenValue * page);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + showing + ' of ' + nrOfProcesses);
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
xit('[C261048] Sorting by Name', function () {
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
processFiltersPage.sortByName(true);
|
||||
processFiltersPage.waitForTableBody();
|
||||
processFiltersPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(JSON.stringify(list) === JSON.stringify(processNames)).toEqual(true);
|
||||
});
|
||||
processFiltersPage.sortByName(false);
|
||||
processFiltersPage.getAllRowsNameColumn().then(function (list) {
|
||||
processNames.reverse();
|
||||
expect(JSON.stringify(list) === JSON.stringify(processNames)).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -15,12 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by } from 'protractor';
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import ProcessServicesPage = require('../pages/adf/process_services/processServicesPage');
|
||||
import TasksPage = require('../pages/adf/process_services/tasksPage');
|
||||
import { AttachmentListPage } from '../pages/adf/process_services/attachmentListPage';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import ProcessFiltersPage = require('../pages/adf/process_services/processFiltersPage');
|
||||
|
||||
import Task = require('../models/APS/Task');
|
||||
import Tenant = require('../models/APS/Tenant');
|
||||
@@ -40,7 +41,6 @@ import { UsersActions } from '../actions/users.actions';
|
||||
|
||||
describe('Start Task - Custom App', () => {
|
||||
|
||||
let processFiltersPage = new ProcessFiltersPage();
|
||||
let TASKDATAFORMAT = 'mmm dd yyyy';
|
||||
let loginPage = new LoginPage();
|
||||
let processServicesPage = new ProcessServicesPage();
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by } from 'protractor';
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import ProcessServicesPage = require('../pages/adf/process_services/processServicesPage');
|
||||
import TasksPage = require('../pages/adf/process_services/tasksPage');
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('../pages/adf/loginPage');
|
||||
import ProcessServicesPage = require('../pages/adf/process_services/processServicesPage');
|
||||
import TasksPage = require('../pages/adf/process_services/tasksPage');
|
||||
@@ -177,7 +179,7 @@ describe('Attachment list action menu for tasks', () => {
|
||||
|
||||
it('[C260234] Should be able to attache a file on a task on APS and check on ADF', () => {
|
||||
browser.controlFlow().execute(async() => {
|
||||
let newTask = await this.alfrescoJsApi.activiti.taskApi.createNewTask({name: "SHARE KNOWLEDGE"});
|
||||
let newTask = await this.alfrescoJsApi.activiti.taskApi.createNewTask({name: 'SHARE KNOWLEDGE'});
|
||||
|
||||
let newTaskId = newTask.id;
|
||||
|
||||
|
@@ -49,7 +49,7 @@ describe('Task List Pagination', () => {
|
||||
fifteenValue: 15,
|
||||
twenty: '20',
|
||||
twentyValue: 20,
|
||||
default: '25'
|
||||
default: '20'
|
||||
};
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
@@ -45,14 +45,16 @@ describe('Save screenshot at the end', () => {
|
||||
|
||||
let folder = await alfrescoJsApi.nodes.addNode('-my-', {
|
||||
'name': 'process-services',
|
||||
'relativePath': 'Buiild-screenshot/Screenshot-e2e-' + buildNumber,
|
||||
'relativePath': 'Build-screenshot/Screenshot-e2e-' + buildNumber,
|
||||
'nodeType': 'cm:folder'
|
||||
}, {}, {});
|
||||
}, {}, {
|
||||
'overwrite': true
|
||||
});
|
||||
|
||||
for (const fileName of files) {
|
||||
|
||||
let pathFile = path.join(__dirname, '../../e2e-output/screenshots', fileName);
|
||||
let file = fs.createReadStream(pathFile);
|
||||
let file: any = fs.createReadStream(pathFile);
|
||||
|
||||
await alfrescoJsApi.upload.uploadFile(
|
||||
file,
|
||||
|
@@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import LoginPage = require('./pages/adf/loginPage');
|
||||
import ProcessServicesPage = require('./pages/adf/process_services/processServicesPage');
|
||||
import TasksPage = require('./pages/adf/process_services/tasksPage');
|
||||
@@ -23,15 +25,10 @@ import CONSTANTS = require('./util/constants');
|
||||
|
||||
import Tenant = require('./models/APS/Tenant');
|
||||
import Task = require('./models/APS/Task');
|
||||
import TaskModel = require('./models/APS/TaskModel');
|
||||
import FormModel = require('./models/APS/FormModel');
|
||||
import FileModel = require('./models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('./test.config');
|
||||
import resources = require('./util/resources');
|
||||
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UsersActions } from './actions/users.actions';
|
||||
import fs = require('fs');
|
||||
@@ -47,7 +44,6 @@ describe('Start Task - Task App', () => {
|
||||
let taskPage = new TasksPage();
|
||||
let tasks = ['Standalone task', 'Completed standalone task', 'Add a form', 'Remove form'];
|
||||
let noFormMessage = 'No forms attached';
|
||||
let taskModel;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let users = new UsersActions();
|
||||
@@ -126,7 +122,7 @@ describe('Start Task - Task App', () => {
|
||||
taskPage.usingTasksListPage().checkTaskIsDisplayedInTasksList(tasks[3]);
|
||||
expect(taskPage.usingTaskDetails().getFormName()).toEqual(app.formName);
|
||||
|
||||
browser.controlFlow().execute(async() => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
const listOfTasks = await this.alfrescoJsApi.activiti.taskApi.listTasks(new Task({ sort: 'created-desc' }));
|
||||
await this.alfrescoJsApi.activiti.taskApi.removeForm(listOfTasks.data[0].id);
|
||||
});
|
||||
|
@@ -22,21 +22,14 @@ import TasksPage = require('./pages/adf/process_services/tasksPage');
|
||||
import CONSTANTS = require('./util/constants');
|
||||
|
||||
import Tenant = require('./models/APS/Tenant');
|
||||
import Task = require('./models/APS/Task');
|
||||
import TaskModel = require('./models/APS/TaskModel');
|
||||
import FormModel = require('./models/APS/FormModel');
|
||||
import FileModel = require('./models/ACS/fileModel');
|
||||
|
||||
import TestConfig = require('./test.config');
|
||||
import resources = require('./util/resources');
|
||||
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UsersActions } from './actions/users.actions';
|
||||
import { AppsActions } from './actions/APS/apps.actions';
|
||||
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import Util = require('./util/util');
|
||||
|
||||
|
@@ -20,7 +20,7 @@ var exports = module.exports = {};
|
||||
/**
|
||||
*Rest API Response statusCodes
|
||||
*/
|
||||
exports.HTTP_RESPONSE_STATUS_CODE ={
|
||||
exports.HTTP_RESPONSE_STATUS_CODE = {
|
||||
FORBIDDEN: 403,
|
||||
OK: 200,
|
||||
BAD_REQUEST: 400,
|
||||
@@ -32,7 +32,7 @@ exports.HTTP_RESPONSE_STATUS_CODE ={
|
||||
/**
|
||||
*Rest API Response Messages
|
||||
*/
|
||||
exports.HTTP_RESPONSE_STATUS ={
|
||||
exports.HTTP_RESPONSE_STATUS = {
|
||||
OK: {
|
||||
'CODE': 200,
|
||||
'MESSAGE': 'OK'
|
||||
@@ -55,8 +55,8 @@ exports.HTTP_RESPONSE_STATUS ={
|
||||
*Rest API HTTP content types
|
||||
*/
|
||||
exports.HTTP_CONTENT_TYPE = {
|
||||
JSON : 'application/json',
|
||||
URLENCODED : 'application/x-www-form-urlencoded',
|
||||
JSON: 'application/json',
|
||||
URLENCODED: 'application/x-www-form-urlencoded',
|
||||
IMAGE_PNG: 'image/png',
|
||||
TEXT: 'text/csv'
|
||||
};
|
||||
@@ -120,3 +120,10 @@ exports.PROCESSSTATUS = {
|
||||
RUNNING: 'Running',
|
||||
COMPLETED: 'Completed'
|
||||
};
|
||||
|
||||
exports.CS_USER_ROLES = {
|
||||
CONSUMER: 'SiteConsumer',
|
||||
COLLABORATOR: 'SiteCollaborator',
|
||||
CONTRIBUTOR: 'SiteContributor',
|
||||
MANAGER: 'SiteManager'
|
||||
};
|
||||
|
@@ -182,11 +182,27 @@ exports.Files = {
|
||||
file_location: "/resources/adf/allFileTypes/a_png_file.png",
|
||||
file_name: "a_png_file.png"
|
||||
},
|
||||
PNG_B: {
|
||||
file_location: "/resources/adf/allFileTypes/b_png_file.png",
|
||||
file_name: "b_png_file.png"
|
||||
},
|
||||
PNG_C: {
|
||||
file_location: "/resources/adf/allFileTypes/c_png_file.png",
|
||||
file_name: "c_png_file.png"
|
||||
},
|
||||
PNG_D: {
|
||||
file_location: "/resources/adf/allFileTypes/d_png_file.png",
|
||||
file_name: "d_png_file.png"
|
||||
},
|
||||
PPT: {
|
||||
file_location: "/resources/adf/allFileTypes/a_ppt_file.pptx",
|
||||
file_name: "a_ppt_file.pptx",
|
||||
first_page_text: "PPTX test file"
|
||||
},
|
||||
PPT_B: {
|
||||
file_location: "/resources/adf/allFileTypes/b_ppt_file.pptx",
|
||||
file_name: "b_ppt_file.pptx"
|
||||
},
|
||||
TEST: {
|
||||
file_location: "/resources/adf/allFileTypes/testExtension.test",
|
||||
file_name: "testExtension.test"
|
||||
|
Reference in New Issue
Block a user