mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[no-issue] improve e2e timeout and names apps (#4604)
* fix sso, change timeout, parallel * cange travis * split viewer test * timeot fix * move name apps in resources file * resources fix * resources fix * fix search default * fix sso test * fix test
This commit is contained in:
@@ -154,7 +154,6 @@ describe('Permissions Component', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async (done) => {
|
afterAll(async (done) => {
|
||||||
|
|
||||||
await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||||
await alfrescoJsApi.core.sitesApi.deleteSite(publicSite.entry.id);
|
await alfrescoJsApi.core.sitesApi.deleteSite(publicSite.entry.id);
|
||||||
await alfrescoJsApi.core.sitesApi.deleteSite(privateSite.entry.id);
|
await alfrescoJsApi.core.sitesApi.deleteSite(privateSite.entry.id);
|
||||||
@@ -164,7 +163,7 @@ describe('Permissions Component', function () {
|
|||||||
|
|
||||||
describe('Role Site Dropdown', function () {
|
describe('Role Site Dropdown', function () {
|
||||||
|
|
||||||
beforeEach(async (done) => {
|
it('[C277002] Should display the Role Site dropdown', () => {
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(folderOwnerUser);
|
loginPage.loginToContentServicesUsingUserModel(folderOwnerUser);
|
||||||
|
|
||||||
@@ -186,25 +185,16 @@ describe('Permissions Component', function () {
|
|||||||
permissionsPage.searchUserOrGroup(consumerUser.getId());
|
permissionsPage.searchUserOrGroup(consumerUser.getId());
|
||||||
permissionsPage.clickUserOrGroup(consumerUser.getFirstName());
|
permissionsPage.clickUserOrGroup(consumerUser.getFirstName());
|
||||||
permissionsPage.checkUserOrGroupIsAdded(consumerUser.getId());
|
permissionsPage.checkUserOrGroupIsAdded(consumerUser.getId());
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C277002] Should display the Role Site dropdown', () => {
|
|
||||||
|
|
||||||
expect(permissionsPage.getRoleCellValue(consumerUser.getId())).toEqual('SiteCollaborator');
|
expect(permissionsPage.getRoleCellValue(consumerUser.getId())).toEqual('SiteCollaborator');
|
||||||
|
|
||||||
permissionsPage.clickRoleDropdown();
|
permissionsPage.clickRoleDropdown();
|
||||||
|
|
||||||
expect(permissionsPage.getRoleDropdownOptions().count()).toBe(4);
|
expect(permissionsPage.getRoleDropdownOptions().count()).toBe(4);
|
||||||
|
|
||||||
expect(permissionsPage.getRoleDropdownOptions().get(0).getText()).toBe('SiteCollaborator');
|
expect(permissionsPage.getRoleDropdownOptions().get(0).getText()).toBe('SiteCollaborator');
|
||||||
|
|
||||||
expect(permissionsPage.getRoleDropdownOptions().get(1).getText()).toBe('SiteConsumer');
|
expect(permissionsPage.getRoleDropdownOptions().get(1).getText()).toBe('SiteConsumer');
|
||||||
|
|
||||||
expect(permissionsPage.getRoleDropdownOptions().get(2).getText()).toBe('SiteContributor');
|
expect(permissionsPage.getRoleDropdownOptions().get(2).getText()).toBe('SiteContributor');
|
||||||
|
|
||||||
expect(permissionsPage.getRoleDropdownOptions().get(3).getText()).toBe('SiteManager');
|
expect(permissionsPage.getRoleDropdownOptions().get(3).getText()).toBe('SiteManager');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -222,7 +212,6 @@ describe('Permissions Component', function () {
|
|||||||
contentList.doubleClickRow('Site' + fileModel.name);
|
contentList.doubleClickRow('Site' + fileModel.name);
|
||||||
|
|
||||||
viewerPage.checkFileIsLoaded();
|
viewerPage.checkFileIsLoaded();
|
||||||
|
|
||||||
viewerPage.clickCloseButton();
|
viewerPage.clickCloseButton();
|
||||||
|
|
||||||
contentList.waitForTableBody();
|
contentList.waitForTableBody();
|
||||||
@@ -244,7 +233,6 @@ describe('Permissions Component', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C276997] Role SiteContributor', () => {
|
it('[C276997] Role SiteContributor', () => {
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(contributorUser);
|
loginPage.loginToContentServicesUsingUserModel(contributorUser);
|
||||||
|
|
||||||
navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||||
@@ -254,7 +242,6 @@ describe('Permissions Component', function () {
|
|||||||
contentList.doubleClickRow('Site' + fileModel.name);
|
contentList.doubleClickRow('Site' + fileModel.name);
|
||||||
|
|
||||||
viewerPage.checkFileIsLoaded();
|
viewerPage.checkFileIsLoaded();
|
||||||
|
|
||||||
viewerPage.clickCloseButton();
|
viewerPage.clickCloseButton();
|
||||||
|
|
||||||
contentList.waitForTableBody();
|
contentList.waitForTableBody();
|
||||||
@@ -272,7 +259,6 @@ describe('Permissions Component', function () {
|
|||||||
contentServicesPage.uploadFile(testFileModel.location).checkContentIsDisplayed(testFileModel.name);
|
contentServicesPage.uploadFile(testFileModel.location).checkContentIsDisplayed(testFileModel.name);
|
||||||
|
|
||||||
uploadDialog.fileIsUploaded(testFileModel.name);
|
uploadDialog.fileIsUploaded(testFileModel.name);
|
||||||
|
|
||||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -288,7 +274,6 @@ describe('Permissions Component', function () {
|
|||||||
contentList.doubleClickRow('Site' + fileModel.name);
|
contentList.doubleClickRow('Site' + fileModel.name);
|
||||||
|
|
||||||
viewerPage.checkFileIsLoaded();
|
viewerPage.checkFileIsLoaded();
|
||||||
|
|
||||||
viewerPage.clickCloseButton();
|
viewerPage.clickCloseButton();
|
||||||
|
|
||||||
contentList.waitForTableBody();
|
contentList.waitForTableBody();
|
||||||
@@ -296,7 +281,6 @@ describe('Permissions Component', function () {
|
|||||||
contentServicesPage.checkDeleteIsDisabled('Site' + fileModel.name);
|
contentServicesPage.checkDeleteIsDisabled('Site' + fileModel.name);
|
||||||
|
|
||||||
browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
|
browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
|
||||||
|
|
||||||
browser.controlFlow().execute(async () => {
|
browser.controlFlow().execute(async () => {
|
||||||
|
|
||||||
contentList.checkActionMenuIsNotDisplayed();
|
contentList.checkActionMenuIsNotDisplayed();
|
||||||
@@ -304,25 +288,20 @@ describe('Permissions Component', function () {
|
|||||||
contentServicesPage.metadataContent('Site' + fileModel.name);
|
contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||||
|
|
||||||
metadataViewPage.editIconIsDisplayed();
|
metadataViewPage.editIconIsDisplayed();
|
||||||
|
|
||||||
await metadataViewPage.editIconClick();
|
await metadataViewPage.editIconClick();
|
||||||
|
|
||||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||||
|
|
||||||
metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||||
|
|
||||||
metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle');
|
metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle');
|
||||||
|
|
||||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||||
|
|
||||||
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle');
|
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle');
|
||||||
|
|
||||||
metadataViewPage.clickCloseButton();
|
metadataViewPage.clickCloseButton();
|
||||||
|
|
||||||
contentServicesPage.uploadFile(pngFileModel.location).checkContentIsDisplayed(pngFileModel.name);
|
contentServicesPage.uploadFile(pngFileModel.location).checkContentIsDisplayed(pngFileModel.name);
|
||||||
|
|
||||||
uploadDialog.fileIsUploaded(pngFileModel.name);
|
uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||||
|
|
||||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -54,8 +54,20 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
|||||||
|
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
provider: 'ECM',
|
provider: 'ECM',
|
||||||
hostEcm: TestConfig.adf.url
|
hostEcm: TestConfig.adf.url,
|
||||||
|
authType: 'OAUTH',
|
||||||
|
oauth2: {
|
||||||
|
host: TestConfig.adf.hostSso,
|
||||||
|
clientId: 'alfresco',
|
||||||
|
scope: 'openid',
|
||||||
|
secret: '',
|
||||||
|
implicitFlow: false,
|
||||||
|
silentLogin: false,
|
||||||
|
redirectUri: '/',
|
||||||
|
redirectUriLogout: '/logout'
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const downloadedPngFile = path.join(__dirname, 'downloads', pngFileModel.name);
|
const downloadedPngFile = path.join(__dirname, 'downloads', pngFileModel.name);
|
||||||
const downloadedMultipleFiles = path.join(__dirname, 'downloads', 'archive.zip');
|
const downloadedMultipleFiles = path.join(__dirname, 'downloads', 'archive.zip');
|
||||||
const folderName = StringUtil.generateRandomString(5);
|
const folderName = StringUtil.generateRandomString(5);
|
||||||
@@ -65,8 +77,6 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
|||||||
describe('SSO in ADF using ACS and AIS, implicit flow set', () => {
|
describe('SSO in ADF using ACS and AIS, implicit flow set', () => {
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
beforeAll(async (done) => {
|
||||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
|
||||||
|
|
||||||
const apiService = new ApiService('alfresco', TestConfig.adf.url, TestConfig.adf.hostSso, 'ECM');
|
const apiService = new ApiService('alfresco', TestConfig.adf.url, TestConfig.adf.hostSso, 'ECM');
|
||||||
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||||
|
|
||||||
@@ -79,7 +89,6 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
|||||||
folder = await uploadActions.createFolder(this.alfrescoJsApi, folderName, '-my-');
|
folder = await uploadActions.createFolder(this.alfrescoJsApi, folderName, '-my-');
|
||||||
|
|
||||||
pdfUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, firstPdfFileModel.location, firstPdfFileModel.name, folder.entry.id);
|
pdfUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, firstPdfFileModel.location, firstPdfFileModel.name, folder.entry.id);
|
||||||
|
|
||||||
pngUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, folder.entry.id);
|
pngUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, folder.entry.id);
|
||||||
|
|
||||||
silentLogin = false;
|
silentLogin = false;
|
||||||
|
106
e2e/core/viewer/file-extensions/viewer-arcive.component.e2e.ts
Normal file
106
e2e/core/viewer/file-extensions/viewer-arcive.component.e2e.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 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 TestConfig = require('../../test.config');
|
||||||
|
|
||||||
|
import { LoginPage } from '@alfresco/adf-testing';
|
||||||
|
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||||
|
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||||
|
|
||||||
|
import CONSTANTS = require('../../util/constants');
|
||||||
|
import resources = require('../../util/resources');
|
||||||
|
import { StringUtil } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
|
import { FolderModel } from '../../models/ACS/folderModel';
|
||||||
|
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||||
|
|
||||||
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||||
|
|
||||||
|
describe('Viewer', () => {
|
||||||
|
|
||||||
|
const viewerPage = new ViewerPage();
|
||||||
|
const loginPage = new LoginPage();
|
||||||
|
const contentServicesPage = new ContentServicesPage();
|
||||||
|
const uploadActions = new UploadActions();
|
||||||
|
let site;
|
||||||
|
const acsUser = new AcsUserModel();
|
||||||
|
|
||||||
|
const archiveFolderInfo = new FolderModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.ARCHIVE_FOLDER.folder_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.ARCHIVE_FOLDER.folder_location
|
||||||
|
});
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||||
|
title: StringUtil.generateRandomString(8),
|
||||||
|
visibility: 'PUBLIC'
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||||
|
id: acsUser.id,
|
||||||
|
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Archive Folder Uploaded', () => {
|
||||||
|
let uploadedArchives;
|
||||||
|
let archiveFolderUploaded;
|
||||||
|
|
||||||
|
beforeAll(async (done) => {
|
||||||
|
archiveFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, archiveFolderInfo.name, '-my-');
|
||||||
|
|
||||||
|
uploadedArchives = await uploadActions.uploadFolder(this.alfrescoJsApi, archiveFolderInfo.location, archiveFolderUploaded.entry.id);
|
||||||
|
|
||||||
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
contentServicesPage.goToDocumentList();
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async (done) => {
|
||||||
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, archiveFolderUploaded.entry.id);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C260517] Should be possible to open any Archive file', () => {
|
||||||
|
contentServicesPage.doubleClickRow('archive');
|
||||||
|
|
||||||
|
uploadedArchives.forEach((currentFile) => {
|
||||||
|
if (currentFile.entry.name !== '.DS_Store') {
|
||||||
|
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||||
|
viewerPage.checkFileIsLoaded();
|
||||||
|
viewerPage.clickCloseButton();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
132
e2e/core/viewer/file-extensions/viewer-component.e2e.ts
Normal file
132
e2e/core/viewer/file-extensions/viewer-component.e2e.ts
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 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 TestConfig = require('../../../test.config');
|
||||||
|
|
||||||
|
import { LoginPage } from '@alfresco/adf-testing';
|
||||||
|
import { ViewerPage } from '../../../pages/adf/viewerPage';
|
||||||
|
import { ContentServicesPage } from '../../../pages/adf/contentServicesPage';
|
||||||
|
|
||||||
|
import CONSTANTS = require('../../../util/constants');
|
||||||
|
import resources = require('../../../util/resources');
|
||||||
|
import { StringUtil } from '@alfresco/adf-testing';
|
||||||
|
import { FileModel } from '../../..//models/ACS/fileModel';
|
||||||
|
|
||||||
|
import { FolderModel } from '../../../models/ACS/folderModel';
|
||||||
|
import { AcsUserModel } from '../../../models/ACS/acsUserModel';
|
||||||
|
|
||||||
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
import { UploadActions } from '../../../actions/ACS/upload.actions';
|
||||||
|
import { NavigationBarPage } from '../../..//pages/adf/navigationBarPage';
|
||||||
|
|
||||||
|
|
||||||
|
describe('Viewer', () => {
|
||||||
|
|
||||||
|
const viewerPage = new ViewerPage();
|
||||||
|
const navigationBarPage = new NavigationBarPage();
|
||||||
|
const loginPage = new LoginPage();
|
||||||
|
const contentServicesPage = new ContentServicesPage();
|
||||||
|
const uploadActions = new UploadActions();
|
||||||
|
let site;
|
||||||
|
const acsUser = new AcsUserModel();
|
||||||
|
let pngFileUploaded;
|
||||||
|
|
||||||
|
const pngFileInfo = new FileModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||||
|
});
|
||||||
|
|
||||||
|
const otherFolderInfo = new FolderModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.OTHER_FOLDER.folder_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.OTHER_FOLDER.folder_location
|
||||||
|
});
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||||
|
title: StringUtil.generateRandomString(8),
|
||||||
|
visibility: 'PUBLIC'
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||||
|
id: acsUser.id,
|
||||||
|
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
|
|
||||||
|
pngFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileInfo.location, pngFileInfo.name, site.entry.guid);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C272813] Should be redirected to site when opening and closing a file in a site', () => {
|
||||||
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
|
||||||
|
navigationBarPage.goToSite(site);
|
||||||
|
contentServicesPage.checkAcsContainer();
|
||||||
|
|
||||||
|
viewerPage.viewFile(pngFileUploaded.entry.name);
|
||||||
|
|
||||||
|
viewerPage.checkImgViewerIsDisplayed();
|
||||||
|
|
||||||
|
viewerPage.clickCloseButton();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Other Folder Uploaded', () => {
|
||||||
|
|
||||||
|
let uploadedOthers;
|
||||||
|
let otherFolderUploaded;
|
||||||
|
|
||||||
|
beforeAll(async (done) => {
|
||||||
|
otherFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, otherFolderInfo.name, '-my-');
|
||||||
|
|
||||||
|
uploadedOthers = await uploadActions.uploadFolder(this.alfrescoJsApi, otherFolderInfo.location, otherFolderUploaded.entry.id);
|
||||||
|
|
||||||
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
contentServicesPage.goToDocumentList();
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async (done) => {
|
||||||
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, otherFolderUploaded.entry.id);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C280012] Should be possible to open any other Document supported extension', () => {
|
||||||
|
contentServicesPage.doubleClickRow('other');
|
||||||
|
|
||||||
|
uploadedOthers.forEach((currentFile) => {
|
||||||
|
if (currentFile.entry.name !== '.DS_Store') {
|
||||||
|
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||||
|
viewerPage.checkFileIsLoaded();
|
||||||
|
viewerPage.clickCloseButton();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
107
e2e/core/viewer/file-extensions/viewer-excel.component.e2e.ts
Normal file
107
e2e/core/viewer/file-extensions/viewer-excel.component.e2e.ts
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 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 TestConfig = require('../../../test.config');
|
||||||
|
|
||||||
|
import { LoginPage } from '@alfresco/adf-testing';
|
||||||
|
import { ViewerPage } from '../../../pages/adf/viewerPage';
|
||||||
|
import { ContentServicesPage } from '../../../pages/adf/contentServicesPage';
|
||||||
|
|
||||||
|
import CONSTANTS = require('../../../util/constants');
|
||||||
|
import resources = require('../../../util/resources');
|
||||||
|
import { StringUtil } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
|
import { FolderModel } from '../../../models/ACS/folderModel';
|
||||||
|
import { AcsUserModel } from '../../../models/ACS/acsUserModel';
|
||||||
|
|
||||||
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
import { UploadActions } from '../../../actions/ACS/upload.actions';
|
||||||
|
|
||||||
|
describe('Viewer', () => {
|
||||||
|
|
||||||
|
const viewerPage = new ViewerPage();
|
||||||
|
const loginPage = new LoginPage();
|
||||||
|
const contentServicesPage = new ContentServicesPage();
|
||||||
|
const uploadActions = new UploadActions();
|
||||||
|
let site;
|
||||||
|
const acsUser = new AcsUserModel();
|
||||||
|
|
||||||
|
const excelFolderInfo = new FolderModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.EXCEL_FOLDER.folder_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.EXCEL_FOLDER.folder_location
|
||||||
|
});
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||||
|
title: StringUtil.generateRandomString(8),
|
||||||
|
visibility: 'PUBLIC'
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||||
|
id: acsUser.id,
|
||||||
|
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
describe('Excel Folder Uploaded', () => {
|
||||||
|
|
||||||
|
let uploadedExcels;
|
||||||
|
let excelFolderUploaded;
|
||||||
|
|
||||||
|
beforeAll(async (done) => {
|
||||||
|
excelFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, excelFolderInfo.name, '-my-');
|
||||||
|
|
||||||
|
uploadedExcels = await uploadActions.uploadFolder(this.alfrescoJsApi, excelFolderInfo.location, excelFolderUploaded.entry.id);
|
||||||
|
|
||||||
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
contentServicesPage.goToDocumentList();
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async (done) => {
|
||||||
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, excelFolderUploaded.entry.id);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C280008] Should be possible to open any Excel file', () => {
|
||||||
|
contentServicesPage.doubleClickRow('excel');
|
||||||
|
|
||||||
|
uploadedExcels.forEach((currentFile) => {
|
||||||
|
if (currentFile.entry.name !== '.DS_Store') {
|
||||||
|
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||||
|
viewerPage.checkFileIsLoaded();
|
||||||
|
viewerPage.clickCloseButton();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
127
e2e/core/viewer/file-extensions/viewer-image.component.e2e.ts
Normal file
127
e2e/core/viewer/file-extensions/viewer-image.component.e2e.ts
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 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 TestConfig = require('../../../test.config');
|
||||||
|
|
||||||
|
import { LoginPage } from '@alfresco/adf-testing';
|
||||||
|
import { ViewerPage } from '../../../pages/adf/viewerPage';
|
||||||
|
import { ContentServicesPage } from '../../../pages/adf/contentServicesPage';
|
||||||
|
|
||||||
|
import CONSTANTS = require('../../../util/constants');
|
||||||
|
import resources = require('../../../util/resources');
|
||||||
|
import { StringUtil } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
|
import { FolderModel } from '../../../models/ACS/folderModel';
|
||||||
|
import { AcsUserModel } from '../../../models/ACS/acsUserModel';
|
||||||
|
|
||||||
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
import { UploadActions } from '../../../actions/ACS/upload.actions';
|
||||||
|
|
||||||
|
describe('Viewer', () => {
|
||||||
|
|
||||||
|
const viewerPage = new ViewerPage();
|
||||||
|
const loginPage = new LoginPage();
|
||||||
|
const contentServicesPage = new ContentServicesPage();
|
||||||
|
const uploadActions = new UploadActions();
|
||||||
|
let site;
|
||||||
|
const acsUser = new AcsUserModel();
|
||||||
|
|
||||||
|
const imgFolderInfo = new FolderModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.IMG_FOLDER.folder_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.IMG_FOLDER.folder_location
|
||||||
|
});
|
||||||
|
|
||||||
|
const imgRenditionFolderInfo = new FolderModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.IMG_RENDITION_FOLDER.folder_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.IMG_RENDITION_FOLDER.folder_location
|
||||||
|
});
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||||
|
title: StringUtil.generateRandomString(8),
|
||||||
|
visibility: 'PUBLIC'
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||||
|
id: acsUser.id,
|
||||||
|
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Image Folder Uploaded', () => {
|
||||||
|
|
||||||
|
let uploadedImages, uploadedImgRenditionFolderInfo;
|
||||||
|
let imgFolderUploaded, imgFolderRenditionUploaded;
|
||||||
|
|
||||||
|
beforeAll(async (done) => {
|
||||||
|
imgFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, imgFolderInfo.name, '-my-');
|
||||||
|
|
||||||
|
uploadedImages = await uploadActions.uploadFolder(this.alfrescoJsApi, imgFolderInfo.location, imgFolderUploaded.entry.id);
|
||||||
|
|
||||||
|
imgFolderRenditionUploaded = await uploadActions.createFolder(this.alfrescoJsApi, imgRenditionFolderInfo.name, imgFolderUploaded.entry.id);
|
||||||
|
|
||||||
|
uploadedImgRenditionFolderInfo = await uploadActions.uploadFolder(this.alfrescoJsApi, imgRenditionFolderInfo.location, imgFolderRenditionUploaded.entry.id);
|
||||||
|
|
||||||
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
contentServicesPage.goToDocumentList();
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async (done) => {
|
||||||
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, imgFolderUploaded.entry.id);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C279966] Should be possible to open any Image supported extension', () => {
|
||||||
|
contentServicesPage.doubleClickRow('images');
|
||||||
|
|
||||||
|
uploadedImages.forEach((currentFile) => {
|
||||||
|
if (currentFile.entry.name !== '.DS_Store') {
|
||||||
|
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||||
|
viewerPage.checkImgViewerIsDisplayed();
|
||||||
|
viewerPage.clickCloseButton();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
contentServicesPage.doubleClickRow('images-rendition');
|
||||||
|
|
||||||
|
uploadedImgRenditionFolderInfo.forEach((currentFile) => {
|
||||||
|
if (currentFile.entry.name !== '.DS_Store') {
|
||||||
|
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||||
|
viewerPage.checkFileIsLoaded();
|
||||||
|
viewerPage.clickCloseButton();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
@@ -0,0 +1,108 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 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 TestConfig = require('../../../test.config');
|
||||||
|
|
||||||
|
import { LoginPage } from '@alfresco/adf-testing';
|
||||||
|
import { ViewerPage } from '../../../pages/adf/viewerPage';
|
||||||
|
import { ContentServicesPage } from '../../../pages/adf/contentServicesPage';
|
||||||
|
|
||||||
|
import CONSTANTS = require('../../../util/constants');
|
||||||
|
import resources = require('../../../util/resources');
|
||||||
|
import { StringUtil } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
|
import { FolderModel } from '../../../models/ACS/folderModel';
|
||||||
|
import { AcsUserModel } from '../../../models/ACS/acsUserModel';
|
||||||
|
|
||||||
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
import { UploadActions } from '../../../actions/ACS/upload.actions';
|
||||||
|
|
||||||
|
describe('Viewer', () => {
|
||||||
|
|
||||||
|
const viewerPage = new ViewerPage();
|
||||||
|
const loginPage = new LoginPage();
|
||||||
|
const contentServicesPage = new ContentServicesPage();
|
||||||
|
const uploadActions = new UploadActions();
|
||||||
|
let site;
|
||||||
|
const acsUser = new AcsUserModel();
|
||||||
|
|
||||||
|
const pptFolderInfo = new FolderModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.PPT_FOLDER.folder_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.PPT_FOLDER.folder_location
|
||||||
|
});
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||||
|
title: StringUtil.generateRandomString(8),
|
||||||
|
visibility: 'PUBLIC'
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||||
|
id: acsUser.id,
|
||||||
|
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('PowerPoint Folder Uploaded', () => {
|
||||||
|
|
||||||
|
let uploadedPpt;
|
||||||
|
let pptFolderUploaded;
|
||||||
|
|
||||||
|
beforeAll(async (done) => {
|
||||||
|
pptFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, pptFolderInfo.name, '-my-');
|
||||||
|
|
||||||
|
uploadedPpt = await uploadActions.uploadFolder(this.alfrescoJsApi, pptFolderInfo.location, pptFolderUploaded.entry.id);
|
||||||
|
|
||||||
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
contentServicesPage.goToDocumentList();
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async (done) => {
|
||||||
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, pptFolderUploaded.entry.id);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C280009] Should be possible to open any PowerPoint file', () => {
|
||||||
|
contentServicesPage.doubleClickRow('ppt');
|
||||||
|
|
||||||
|
uploadedPpt.forEach((currentFile) => {
|
||||||
|
if (currentFile.entry.name !== '.DS_Store') {
|
||||||
|
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||||
|
viewerPage.checkFileIsLoaded();
|
||||||
|
viewerPage.clickCloseButton();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
109
e2e/core/viewer/file-extensions/viewer-text.component.e2e.ts
Normal file
109
e2e/core/viewer/file-extensions/viewer-text.component.e2e.ts
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 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 TestConfig = require('../../../test.config');
|
||||||
|
|
||||||
|
import { LoginPage } from '@alfresco/adf-testing';
|
||||||
|
import { ViewerPage } from '../../../pages/adf/viewerPage';
|
||||||
|
import { ContentServicesPage } from '../../../pages/adf/contentServicesPage';
|
||||||
|
|
||||||
|
import CONSTANTS = require('../../../util/constants');
|
||||||
|
import resources = require('../../../util/resources');
|
||||||
|
import { StringUtil } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
|
import { FolderModel } from '../../../models/ACS/folderModel';
|
||||||
|
import { AcsUserModel } from '../../../models/ACS/acsUserModel';
|
||||||
|
|
||||||
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
import { UploadActions } from '../../../actions/ACS/upload.actions';
|
||||||
|
|
||||||
|
describe('Viewer', () => {
|
||||||
|
|
||||||
|
const viewerPage = new ViewerPage();
|
||||||
|
const loginPage = new LoginPage();
|
||||||
|
const contentServicesPage = new ContentServicesPage();
|
||||||
|
const uploadActions = new UploadActions();
|
||||||
|
let site;
|
||||||
|
const acsUser = new AcsUserModel();
|
||||||
|
|
||||||
|
const textFolderInfo = new FolderModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_location
|
||||||
|
});
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||||
|
title: StringUtil.generateRandomString(8),
|
||||||
|
visibility: 'PUBLIC'
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||||
|
id: acsUser.id,
|
||||||
|
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Text Folder Uploaded', () => {
|
||||||
|
|
||||||
|
let uploadedTexts;
|
||||||
|
let textFolderUploaded;
|
||||||
|
|
||||||
|
beforeAll(async (done) => {
|
||||||
|
textFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, textFolderInfo.name, '-my-');
|
||||||
|
|
||||||
|
uploadedTexts = await uploadActions.uploadFolder(this.alfrescoJsApi, textFolderInfo.location, textFolderUploaded.entry.id);
|
||||||
|
|
||||||
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
contentServicesPage.goToDocumentList();
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async (done) => {
|
||||||
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, textFolderUploaded.entry.id);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C280010] Should be possible to open any Text file', () => {
|
||||||
|
contentServicesPage.doubleClickRow('text');
|
||||||
|
|
||||||
|
uploadedTexts.forEach((currentFile) => {
|
||||||
|
if (currentFile.entry.name !== '.DS_Store') {
|
||||||
|
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||||
|
viewerPage.checkFileIsLoaded();
|
||||||
|
viewerPage.clickCloseButton();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
108
e2e/core/viewer/file-extensions/viewer-word.component.e2e.ts
Normal file
108
e2e/core/viewer/file-extensions/viewer-word.component.e2e.ts
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 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 TestConfig = require('../../../test.config');
|
||||||
|
|
||||||
|
import { LoginPage } from '@alfresco/adf-testing';
|
||||||
|
import { ViewerPage } from '../../../pages/adf/viewerPage';
|
||||||
|
import { ContentServicesPage } from '../../../pages/adf/contentServicesPage';
|
||||||
|
|
||||||
|
import CONSTANTS = require('../../../util/constants');
|
||||||
|
import resources = require('../../../util/resources');
|
||||||
|
import { StringUtil } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
|
import { FolderModel } from '../../../models/ACS/folderModel';
|
||||||
|
import { AcsUserModel } from '../../../models/ACS/acsUserModel';
|
||||||
|
|
||||||
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
import { UploadActions } from '../../../actions/ACS/upload.actions';
|
||||||
|
|
||||||
|
describe('Viewer', () => {
|
||||||
|
|
||||||
|
const viewerPage = new ViewerPage();
|
||||||
|
const loginPage = new LoginPage();
|
||||||
|
const contentServicesPage = new ContentServicesPage();
|
||||||
|
const uploadActions = new UploadActions();
|
||||||
|
let site;
|
||||||
|
const acsUser = new AcsUserModel();
|
||||||
|
|
||||||
|
const wordFolderInfo = new FolderModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.WORD_FOLDER.folder_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.WORD_FOLDER.folder_location
|
||||||
|
});
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||||
|
title: StringUtil.generateRandomString(8),
|
||||||
|
visibility: 'PUBLIC'
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||||
|
id: acsUser.id,
|
||||||
|
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Word Folder Uploaded', () => {
|
||||||
|
|
||||||
|
let uploadedWords;
|
||||||
|
let wordFolderUploaded;
|
||||||
|
|
||||||
|
beforeAll(async (done) => {
|
||||||
|
wordFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, wordFolderInfo.name, '-my-');
|
||||||
|
|
||||||
|
uploadedWords = await uploadActions.uploadFolder(this.alfrescoJsApi, wordFolderInfo.location, wordFolderUploaded.entry.id);
|
||||||
|
|
||||||
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
contentServicesPage.goToDocumentList();
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async (done) => {
|
||||||
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, wordFolderUploaded.entry.id);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C280011] Should be possible to open any Word file', () => {
|
||||||
|
contentServicesPage.doubleClickRow('word');
|
||||||
|
|
||||||
|
uploadedWords.forEach((currentFile) => {
|
||||||
|
if (currentFile.entry.name !== '.DS_Store') {
|
||||||
|
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||||
|
viewerPage.checkFileIsLoaded();
|
||||||
|
viewerPage.clickCloseButton();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
@@ -1,389 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright 2019 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 TestConfig = require('../../test.config');
|
|
||||||
|
|
||||||
import { LoginPage } from '@alfresco/adf-testing';
|
|
||||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
|
||||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
|
||||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
|
||||||
|
|
||||||
import CONSTANTS = require('../../util/constants');
|
|
||||||
import resources = require('../../util/resources');
|
|
||||||
import { StringUtil } from '@alfresco/adf-testing';
|
|
||||||
|
|
||||||
import { FileModel } from '../../models/ACS/fileModel';
|
|
||||||
import { FolderModel } from '../../models/ACS/folderModel';
|
|
||||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
|
||||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
|
||||||
|
|
||||||
describe('Viewer', () => {
|
|
||||||
|
|
||||||
const viewerPage = new ViewerPage();
|
|
||||||
const navigationBarPage = new NavigationBarPage();
|
|
||||||
const loginPage = new LoginPage();
|
|
||||||
const contentServicesPage = new ContentServicesPage();
|
|
||||||
const uploadActions = new UploadActions();
|
|
||||||
let site;
|
|
||||||
const acsUser = new AcsUserModel();
|
|
||||||
let pngFileUploaded;
|
|
||||||
|
|
||||||
const pngFileInfo = new FileModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
|
||||||
});
|
|
||||||
|
|
||||||
const archiveFolderInfo = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.ARCHIVE_FOLDER.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.ARCHIVE_FOLDER.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
const excelFolderInfo = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.EXCEL_FOLDER.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.EXCEL_FOLDER.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
const otherFolderInfo = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.OTHER_FOLDER.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.OTHER_FOLDER.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
const pptFolderInfo = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.PPT_FOLDER.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.PPT_FOLDER.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
const textFolderInfo = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
const wordFolderInfo = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.WORD_FOLDER.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.WORD_FOLDER.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
const imgFolderInfo = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.IMG_FOLDER.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.IMG_FOLDER.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
const imgRenditionFolderInfo = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.IMG_RENDITION_FOLDER.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.IMG_RENDITION_FOLDER.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
|
||||||
title: StringUtil.generateRandomString(8),
|
|
||||||
visibility: 'PUBLIC'
|
|
||||||
});
|
|
||||||
|
|
||||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
|
||||||
id: acsUser.id,
|
|
||||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
|
||||||
});
|
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
|
||||||
|
|
||||||
pngFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileInfo.location, pngFileInfo.name, site.entry.guid);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C272813] Should be redirected to site when opening and closing a file in a site', () => {
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
|
||||||
|
|
||||||
navigationBarPage.goToSite(site);
|
|
||||||
contentServicesPage.checkAcsContainer();
|
|
||||||
|
|
||||||
viewerPage.viewFile(pngFileUploaded.entry.name);
|
|
||||||
|
|
||||||
viewerPage.checkImgViewerIsDisplayed();
|
|
||||||
|
|
||||||
viewerPage.clickCloseButton();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Archive Folder Uploaded', () => {
|
|
||||||
let uploadedArchives;
|
|
||||||
let archiveFolderUploaded;
|
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
|
||||||
archiveFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, archiveFolderInfo.name, '-my-');
|
|
||||||
|
|
||||||
uploadedArchives = await uploadActions.uploadFolder(this.alfrescoJsApi, archiveFolderInfo.location, archiveFolderUploaded.entry.id);
|
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
|
||||||
contentServicesPage.goToDocumentList();
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async (done) => {
|
|
||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, archiveFolderUploaded.entry.id);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C260517] Should be possible to open any Archive file', () => {
|
|
||||||
contentServicesPage.doubleClickRow('archive');
|
|
||||||
|
|
||||||
uploadedArchives.forEach((currentFile) => {
|
|
||||||
if (currentFile.entry.name !== '.DS_Store') {
|
|
||||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
|
||||||
viewerPage.checkFileIsLoaded();
|
|
||||||
viewerPage.clickCloseButton();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Excel Folder Uploaded', () => {
|
|
||||||
|
|
||||||
let uploadedExcels;
|
|
||||||
let excelFolderUploaded;
|
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
|
||||||
excelFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, excelFolderInfo.name, '-my-');
|
|
||||||
|
|
||||||
uploadedExcels = await uploadActions.uploadFolder(this.alfrescoJsApi, excelFolderInfo.location, excelFolderUploaded.entry.id);
|
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
|
||||||
contentServicesPage.goToDocumentList();
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async (done) => {
|
|
||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, excelFolderUploaded.entry.id);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C280008] Should be possible to open any Excel file', () => {
|
|
||||||
contentServicesPage.doubleClickRow('excel');
|
|
||||||
|
|
||||||
uploadedExcels.forEach((currentFile) => {
|
|
||||||
if (currentFile.entry.name !== '.DS_Store') {
|
|
||||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
|
||||||
viewerPage.checkFileIsLoaded();
|
|
||||||
viewerPage.clickCloseButton();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('PowerPoint Folder Uploaded', () => {
|
|
||||||
|
|
||||||
let uploadedPpt;
|
|
||||||
let pptFolderUploaded;
|
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
|
||||||
pptFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, pptFolderInfo.name, '-my-');
|
|
||||||
|
|
||||||
uploadedPpt = await uploadActions.uploadFolder(this.alfrescoJsApi, pptFolderInfo.location, pptFolderUploaded.entry.id);
|
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
|
||||||
contentServicesPage.goToDocumentList();
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async (done) => {
|
|
||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, pptFolderUploaded.entry.id);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C280009] Should be possible to open any PowerPoint file', () => {
|
|
||||||
contentServicesPage.doubleClickRow('ppt');
|
|
||||||
|
|
||||||
uploadedPpt.forEach((currentFile) => {
|
|
||||||
if (currentFile.entry.name !== '.DS_Store') {
|
|
||||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
|
||||||
viewerPage.checkFileIsLoaded();
|
|
||||||
viewerPage.clickCloseButton();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Text Folder Uploaded', () => {
|
|
||||||
|
|
||||||
let uploadedTexts;
|
|
||||||
let textFolderUploaded;
|
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
|
||||||
textFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, textFolderInfo.name, '-my-');
|
|
||||||
|
|
||||||
uploadedTexts = await uploadActions.uploadFolder(this.alfrescoJsApi, textFolderInfo.location, textFolderUploaded.entry.id);
|
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
|
||||||
contentServicesPage.goToDocumentList();
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async (done) => {
|
|
||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, textFolderUploaded.entry.id);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C280010] Should be possible to open any Text file', () => {
|
|
||||||
contentServicesPage.doubleClickRow('text');
|
|
||||||
|
|
||||||
uploadedTexts.forEach((currentFile) => {
|
|
||||||
if (currentFile.entry.name !== '.DS_Store') {
|
|
||||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
|
||||||
viewerPage.checkFileIsLoaded();
|
|
||||||
viewerPage.clickCloseButton();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Word Folder Uploaded', () => {
|
|
||||||
|
|
||||||
let uploadedWords;
|
|
||||||
let wordFolderUploaded;
|
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
|
||||||
wordFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, wordFolderInfo.name, '-my-');
|
|
||||||
|
|
||||||
uploadedWords = await uploadActions.uploadFolder(this.alfrescoJsApi, wordFolderInfo.location, wordFolderUploaded.entry.id);
|
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
|
||||||
contentServicesPage.goToDocumentList();
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async (done) => {
|
|
||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, wordFolderUploaded.entry.id);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C280011] Should be possible to open any Word file', () => {
|
|
||||||
contentServicesPage.doubleClickRow('word');
|
|
||||||
|
|
||||||
uploadedWords.forEach((currentFile) => {
|
|
||||||
if (currentFile.entry.name !== '.DS_Store') {
|
|
||||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
|
||||||
viewerPage.checkFileIsLoaded();
|
|
||||||
viewerPage.clickCloseButton();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Other Folder Uploaded', () => {
|
|
||||||
|
|
||||||
let uploadedOthers;
|
|
||||||
let otherFolderUploaded;
|
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
|
||||||
otherFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, otherFolderInfo.name, '-my-');
|
|
||||||
|
|
||||||
uploadedOthers = await uploadActions.uploadFolder(this.alfrescoJsApi, otherFolderInfo.location, otherFolderUploaded.entry.id);
|
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
|
||||||
contentServicesPage.goToDocumentList();
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async (done) => {
|
|
||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, otherFolderUploaded.entry.id);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C280012] Should be possible to open any other Document supported extension', () => {
|
|
||||||
contentServicesPage.doubleClickRow('other');
|
|
||||||
|
|
||||||
uploadedOthers.forEach((currentFile) => {
|
|
||||||
if (currentFile.entry.name !== '.DS_Store') {
|
|
||||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
|
||||||
viewerPage.checkFileIsLoaded();
|
|
||||||
viewerPage.clickCloseButton();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Image Folder Uploaded', () => {
|
|
||||||
|
|
||||||
let uploadedImages, uploadedImgRenditionFolderInfo;
|
|
||||||
let imgFolderUploaded, imgFolderRenditionUploaded;
|
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
|
||||||
imgFolderUploaded = await uploadActions.createFolder(this.alfrescoJsApi, imgFolderInfo.name, '-my-');
|
|
||||||
|
|
||||||
uploadedImages = await uploadActions.uploadFolder(this.alfrescoJsApi, imgFolderInfo.location, imgFolderUploaded.entry.id);
|
|
||||||
|
|
||||||
imgFolderRenditionUploaded = await uploadActions.createFolder(this.alfrescoJsApi, imgRenditionFolderInfo.name, imgFolderUploaded.entry.id);
|
|
||||||
|
|
||||||
uploadedImgRenditionFolderInfo = await uploadActions.uploadFolder(this.alfrescoJsApi, imgRenditionFolderInfo.location, imgFolderRenditionUploaded.entry.id);
|
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
|
||||||
contentServicesPage.goToDocumentList();
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async (done) => {
|
|
||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, imgFolderUploaded.entry.id);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C279966] Should be possible to open any Image supported extension', () => {
|
|
||||||
contentServicesPage.doubleClickRow('images');
|
|
||||||
|
|
||||||
uploadedImages.forEach((currentFile) => {
|
|
||||||
if (currentFile.entry.name !== '.DS_Store') {
|
|
||||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
|
||||||
viewerPage.checkImgViewerIsDisplayed();
|
|
||||||
viewerPage.clickCloseButton();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
contentServicesPage.doubleClickRow('images-rendition');
|
|
||||||
|
|
||||||
uploadedImgRenditionFolderInfo.forEach((currentFile) => {
|
|
||||||
if (currentFile.entry.name !== '.DS_Store') {
|
|
||||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
|
||||||
viewerPage.checkFileIsLoaded();
|
|
||||||
viewerPage.clickCloseButton();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
@@ -20,6 +20,7 @@ import { AppListCloudPage } from '@alfresco/adf-testing';
|
|||||||
import TestConfig = require('../test.config');
|
import TestConfig = require('../test.config');
|
||||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Applications list', () => {
|
describe('Applications list', () => {
|
||||||
|
|
||||||
@@ -27,7 +28,7 @@ describe('Applications list', () => {
|
|||||||
const loginSSOPage = new LoginSSOPage();
|
const loginSSOPage = new LoginSSOPage();
|
||||||
const navigationBarPage = new NavigationBarPage();
|
const navigationBarPage = new NavigationBarPage();
|
||||||
const appListCloudPage = new AppListCloudPage();
|
const appListCloudPage = new AppListCloudPage();
|
||||||
const appName = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
|
|
||||||
it('[C289910] Should the app be displayed on dashboard when is deployed on APS', () => {
|
it('[C289910] Should the app be displayed on dashboard when is deployed on APS', () => {
|
||||||
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity);
|
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity);
|
||||||
@@ -35,8 +36,8 @@ describe('Applications list', () => {
|
|||||||
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||||
appListCloudPage.checkApsContainer();
|
appListCloudPage.checkApsContainer();
|
||||||
appListCloudPage.checkAppIsDisplayed(appName);
|
appListCloudPage.checkAppIsDisplayed(simpleApp);
|
||||||
appListCloudPage.goToApp(appName);
|
appListCloudPage.goToApp(simpleApp);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -23,6 +23,7 @@ import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tas
|
|||||||
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
|
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
|
||||||
import { AppListCloudPage } from '@alfresco/adf-testing';
|
import { AppListCloudPage } from '@alfresco/adf-testing';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Edit process filters cloud', () => {
|
describe('Edit process filters cloud', () => {
|
||||||
|
|
||||||
@@ -35,7 +36,7 @@ describe('Edit process filters cloud', () => {
|
|||||||
const processCloudDemoPage = new ProcessCloudDemoPage();
|
const processCloudDemoPage = new ProcessCloudDemoPage();
|
||||||
|
|
||||||
let silentLogin;
|
let silentLogin;
|
||||||
const simpleApp = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
silentLogin = false;
|
silentLogin = false;
|
||||||
|
@@ -22,6 +22,7 @@ import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
|||||||
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Edit task filters cloud', () => {
|
describe('Edit task filters cloud', () => {
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ describe('Edit task filters cloud', () => {
|
|||||||
let tasksService: TasksService;
|
let tasksService: TasksService;
|
||||||
|
|
||||||
let silentLogin;
|
let silentLogin;
|
||||||
const simpleApp = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
const completedTaskName = StringUtil.generateRandomString(), assignedTaskName = StringUtil.generateRandomString();
|
const completedTaskName = StringUtil.generateRandomString(), assignedTaskName = StringUtil.generateRandomString();
|
||||||
let assignedTask;
|
let assignedTask;
|
||||||
|
|
||||||
|
@@ -24,6 +24,7 @@ import { GroupCloudComponentPage, PeopleCloudComponentPage } from '@alfresco/adf
|
|||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { LoginSSOPage, IdentityService, GroupIdentityService, RolesService, ApiService } from '@alfresco/adf-testing';
|
import { LoginSSOPage, IdentityService, GroupIdentityService, RolesService, ApiService } from '@alfresco/adf-testing';
|
||||||
import CONSTANTS = require('../util/constants');
|
import CONSTANTS = require('../util/constants');
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('People Groups Cloud Component', () => {
|
describe('People Groups Cloud Component', () => {
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ describe('People Groups Cloud Component', () => {
|
|||||||
identityService = new IdentityService(apiService);
|
identityService = new IdentityService(apiService);
|
||||||
rolesService = new RolesService(apiService);
|
rolesService = new RolesService(apiService);
|
||||||
groupIdentityService = new GroupIdentityService(apiService);
|
groupIdentityService = new GroupIdentityService(apiService);
|
||||||
clientId = await groupIdentityService.getClientIdByApplicationName('simple-app');
|
clientId = await groupIdentityService.getClientIdByApplicationName(resources.ACTIVITI7_APPS.SIMPLE_APP);
|
||||||
groupActiviti = await groupIdentityService.createIdentityGroup();
|
groupActiviti = await groupIdentityService.createIdentityGroup();
|
||||||
clientActivitiAdminRoleId = await rolesService.getClientRoleIdByRoleName(groupActiviti.id, clientId, CONSTANTS.ROLES.ACTIVITI_ADMIN);
|
clientActivitiAdminRoleId = await rolesService.getClientRoleIdByRoleName(groupActiviti.id, clientId, CONSTANTS.ROLES.ACTIVITI_ADMIN);
|
||||||
clientActivitiUserRoleId = await rolesService.getClientRoleIdByRoleName(groupActiviti.id, clientId, CONSTANTS.ROLES.ACTIVITI_USER);
|
clientActivitiUserRoleId = await rolesService.getClientRoleIdByRoleName(groupActiviti.id, clientId, CONSTANTS.ROLES.ACTIVITI_USER);
|
||||||
@@ -269,7 +270,7 @@ describe('People Groups Cloud Component', () => {
|
|||||||
it('[C305041] Should filter the People Single Selection with the Application name filter', () => {
|
it('[C305041] Should filter the People Single Selection with the Application name filter', () => {
|
||||||
peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
|
peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
|
||||||
peopleGroupCloudComponentPage.clickPeopleFilerByApp();
|
peopleGroupCloudComponentPage.clickPeopleFilerByApp();
|
||||||
peopleGroupCloudComponentPage.enterPeopleAppName('simple-app');
|
peopleGroupCloudComponentPage.enterPeopleAppName(resources.ACTIVITI7_APPS.SIMPLE_APP);
|
||||||
peopleCloudComponent.searchAssignee(`${activitiUser.firstName}`);
|
peopleCloudComponent.searchAssignee(`${activitiUser.firstName}`);
|
||||||
peopleCloudComponent.checkUserIsDisplayed(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
|
peopleCloudComponent.checkUserIsDisplayed(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
|
||||||
peopleCloudComponent.selectAssigneeFromList(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
|
peopleCloudComponent.selectAssigneeFromList(`${activitiUser.firstName}` + ' ' + `${activitiUser.lastName}`);
|
||||||
@@ -280,7 +281,7 @@ describe('People Groups Cloud Component', () => {
|
|||||||
it('[C305041] Should filter the People Multiple Selection with the Application name filter', () => {
|
it('[C305041] Should filter the People Multiple Selection with the Application name filter', () => {
|
||||||
peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
|
peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
|
||||||
peopleGroupCloudComponentPage.clickPeopleFilerByApp();
|
peopleGroupCloudComponentPage.clickPeopleFilerByApp();
|
||||||
peopleGroupCloudComponentPage.enterPeopleAppName('simple-app');
|
peopleGroupCloudComponentPage.enterPeopleAppName(resources.ACTIVITI7_APPS.SIMPLE_APP);
|
||||||
peopleCloudComponent.searchAssignee(`${apsUser.firstName}`);
|
peopleCloudComponent.searchAssignee(`${apsUser.firstName}`);
|
||||||
peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
|
peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
|
||||||
peopleCloudComponent.selectAssigneeFromList(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
|
peopleCloudComponent.selectAssigneeFromList(`${apsUser.firstName}` + ' ' + `${apsUser.lastName}`);
|
||||||
@@ -298,7 +299,7 @@ describe('People Groups Cloud Component', () => {
|
|||||||
it('[C305041] Should filter the Groups Single Selection with the Application name filter', () => {
|
it('[C305041] Should filter the Groups Single Selection with the Application name filter', () => {
|
||||||
peopleGroupCloudComponentPage.clickGroupCloudSingleSelection();
|
peopleGroupCloudComponentPage.clickGroupCloudSingleSelection();
|
||||||
peopleGroupCloudComponentPage.clickGroupFilerByApp();
|
peopleGroupCloudComponentPage.clickGroupFilerByApp();
|
||||||
peopleGroupCloudComponentPage.enterGroupAppName('simple-app');
|
peopleGroupCloudComponentPage.enterGroupAppName(resources.ACTIVITI7_APPS.SIMPLE_APP);
|
||||||
groupCloudComponentPage.searchGroups(`${groupActiviti.name}`);
|
groupCloudComponentPage.searchGroups(`${groupActiviti.name}`);
|
||||||
groupCloudComponentPage.checkGroupIsDisplayed(`${groupActiviti.name}`);
|
groupCloudComponentPage.checkGroupIsDisplayed(`${groupActiviti.name}`);
|
||||||
groupCloudComponentPage.selectGroupFromList(`${groupActiviti.name}`);
|
groupCloudComponentPage.selectGroupFromList(`${groupActiviti.name}`);
|
||||||
@@ -308,7 +309,7 @@ describe('People Groups Cloud Component', () => {
|
|||||||
it('[C305041] Should filter the Groups Multiple Selection with the Application name filter', () => {
|
it('[C305041] Should filter the Groups Multiple Selection with the Application name filter', () => {
|
||||||
peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
|
peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
|
||||||
peopleGroupCloudComponentPage.clickGroupFilerByApp();
|
peopleGroupCloudComponentPage.clickGroupFilerByApp();
|
||||||
peopleGroupCloudComponentPage.enterGroupAppName('simple-app');
|
peopleGroupCloudComponentPage.enterGroupAppName(resources.ACTIVITI7_APPS.SIMPLE_APP);
|
||||||
groupCloudComponentPage.searchGroups(`${groupAps.name}`);
|
groupCloudComponentPage.searchGroups(`${groupAps.name}`);
|
||||||
groupCloudComponentPage.checkGroupIsDisplayed(`${groupAps.name}`);
|
groupCloudComponentPage.checkGroupIsDisplayed(`${groupAps.name}`);
|
||||||
groupCloudComponentPage.selectGroupFromList(`${groupAps.name}`);
|
groupCloudComponentPage.selectGroupFromList(`${groupAps.name}`);
|
||||||
|
@@ -24,6 +24,7 @@ import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/p
|
|||||||
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||||
import { AppListCloudPage } from '@alfresco/adf-testing';
|
import { AppListCloudPage } from '@alfresco/adf-testing';
|
||||||
import { ConfigEditorPage } from '../pages/adf/configEditorPage';
|
import { ConfigEditorPage } from '../pages/adf/configEditorPage';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
import { browser, protractor } from 'protractor';
|
import { browser, protractor } from 'protractor';
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ describe('Process list cloud', () => {
|
|||||||
|
|
||||||
let silentLogin;
|
let silentLogin;
|
||||||
let completedProcess, runningProcessInstance, switchProcessInstance, noOfApps;
|
let completedProcess, runningProcessInstance, switchProcessInstance, noOfApps;
|
||||||
const simpleApp = 'candidateuserapp';
|
const candidateuserapp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
silentLogin = false;
|
silentLogin = false;
|
||||||
@@ -85,25 +86,25 @@ describe('Process list cloud', () => {
|
|||||||
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||||
|
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
|
const processDefinition = await processDefinitionService.getProcessDefinitions(candidateuserapp);
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
|
await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
|
||||||
runningProcessInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
|
runningProcessInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
|
||||||
switchProcessInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
|
switchProcessInstance = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
|
||||||
|
|
||||||
completedProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
|
completedProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
|
||||||
queryService = new QueryService(apiService);
|
queryService = new QueryService(apiService);
|
||||||
|
|
||||||
const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, simpleApp);
|
const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, candidateuserapp);
|
||||||
tasksService = new TasksService(apiService);
|
tasksService = new TasksService(apiService);
|
||||||
const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp);
|
const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateuserapp);
|
||||||
await tasksService.completeTask(claimedTask.entry.id, simpleApp);
|
await tasksService.completeTask(claimedTask.entry.id, candidateuserapp);
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach((done) => {
|
beforeEach((done) => {
|
||||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||||
appListCloudComponent.checkApsContainer();
|
appListCloudComponent.checkApsContainer();
|
||||||
appListCloudComponent.goToApp(simpleApp);
|
appListCloudComponent.goToApp(candidateuserapp);
|
||||||
tasksCloudDemoPage.taskListCloudComponent().checkTaskListIsLoaded();
|
tasksCloudDemoPage.taskListCloudComponent().checkTaskListIsLoaded();
|
||||||
processCloudDemoPage.clickOnProcessFilters();
|
processCloudDemoPage.clickOnProcessFilters();
|
||||||
done();
|
done();
|
||||||
@@ -172,7 +173,7 @@ describe('Process list cloud', () => {
|
|||||||
expect(processCloudDemoPage.editProcessFilterCloudComponent().checkAppNamesAreUnique()).toBe(true);
|
expect(processCloudDemoPage.editProcessFilterCloudComponent().checkAppNamesAreUnique()).toBe(true);
|
||||||
browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
|
browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
|
||||||
processCloudDemoPage.editProcessFilterCloudComponent().setStatusFilterDropDown('RUNNING')
|
processCloudDemoPage.editProcessFilterCloudComponent().setStatusFilterDropDown('RUNNING')
|
||||||
.setAppNameDropDown(simpleApp).setProcessInstanceId(runningProcessInstance.entry.id);
|
.setAppNameDropDown(candidateuserapp).setProcessInstanceId(runningProcessInstance.entry.id);
|
||||||
|
|
||||||
processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedById(runningProcessInstance.entry.id);
|
processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedById(runningProcessInstance.entry.id);
|
||||||
expect(processCloudDemoPage.editProcessFilterCloudComponent().getNumberOfAppNameOptions()).toBe(noOfApps);
|
expect(processCloudDemoPage.editProcessFilterCloudComponent().getNumberOfAppNameOptions()).toBe(noOfApps);
|
||||||
@@ -187,7 +188,7 @@ describe('Process list cloud', () => {
|
|||||||
expect(processCloudDemoPage.editProcessFilterCloudComponent().getProcessInstanceId()).toEqual(runningProcessInstance.entry.id);
|
expect(processCloudDemoPage.editProcessFilterCloudComponent().getProcessInstanceId()).toEqual(runningProcessInstance.entry.id);
|
||||||
|
|
||||||
processCloudDemoPage.editProcessFilterCloudComponent().setStatusFilterDropDown('RUNNING')
|
processCloudDemoPage.editProcessFilterCloudComponent().setStatusFilterDropDown('RUNNING')
|
||||||
.setAppNameDropDown(simpleApp).setProcessInstanceId(switchProcessInstance.entry.id);
|
.setAppNameDropDown(candidateuserapp).setProcessInstanceId(switchProcessInstance.entry.id);
|
||||||
|
|
||||||
processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedById(switchProcessInstance.entry.id);
|
processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedById(switchProcessInstance.entry.id);
|
||||||
processCloudDemoPage.editProcessFilterCloudComponent().clickSaveAsButton();
|
processCloudDemoPage.editProcessFilterCloudComponent().clickSaveAsButton();
|
||||||
|
@@ -24,6 +24,7 @@ import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tas
|
|||||||
import { AppListCloudPage } from '@alfresco/adf-testing';
|
import { AppListCloudPage } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Process filters cloud', () => {
|
describe('Process filters cloud', () => {
|
||||||
|
|
||||||
@@ -42,7 +43,7 @@ describe('Process filters cloud', () => {
|
|||||||
|
|
||||||
let silentLogin;
|
let silentLogin;
|
||||||
let runningProcess, completedProcess;
|
let runningProcess, completedProcess;
|
||||||
const simpleApp = 'candidateuserapp';
|
const simpleApp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP;
|
||||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
@@ -27,12 +27,14 @@ import { ProcessHeaderCloudPage } from '@alfresco/adf-testing';
|
|||||||
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
|
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Process Header cloud component', () => {
|
describe('Process Header cloud component', () => {
|
||||||
|
|
||||||
describe('Process Header cloud component', () => {
|
describe('Process Header cloud component', () => {
|
||||||
|
|
||||||
const simpleApp = 'simple-app', subProcessApp = 'subprocess-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
|
const subProcessApp = resources.ACTIVITI7_APPS.SUB_PROCESS_APP;
|
||||||
const formatDate = 'DD-MM-YYYY';
|
const formatDate = 'DD-MM-YYYY';
|
||||||
|
|
||||||
const processHeaderCloudPage = new ProcessHeaderCloudPage();
|
const processHeaderCloudPage = new ProcessHeaderCloudPage();
|
||||||
|
@@ -25,6 +25,7 @@ import { ConfigEditorPage } from '../pages/adf/configEditorPage';
|
|||||||
import { ProcessListCloudConfiguration } from './processListCloud.config';
|
import { ProcessListCloudConfiguration } from './processListCloud.config';
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Process list cloud', () => {
|
describe('Process list cloud', () => {
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ describe('Process list cloud', () => {
|
|||||||
let processInstancesService: ProcessInstancesService;
|
let processInstancesService: ProcessInstancesService;
|
||||||
|
|
||||||
let silentLogin;
|
let silentLogin;
|
||||||
const simpleApp = 'candidateuserapp';
|
const candidateuserapp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP;
|
||||||
let jsonFile;
|
let jsonFile;
|
||||||
let runningProcess;
|
let runningProcess;
|
||||||
|
|
||||||
@@ -55,9 +56,9 @@ describe('Process list cloud', () => {
|
|||||||
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||||
|
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
|
const processDefinition = await processDefinitionService.getProcessDefinitions(candidateuserapp);
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
runningProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
|
runningProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ describe('Process list cloud', () => {
|
|||||||
|
|
||||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||||
appListCloudComponent.checkApsContainer();
|
appListCloudComponent.checkApsContainer();
|
||||||
appListCloudComponent.goToApp(simpleApp);
|
appListCloudComponent.goToApp(candidateuserapp);
|
||||||
processCloudDemoPage.clickOnProcessFilters();
|
processCloudDemoPage.clickOnProcessFilters();
|
||||||
processCloudDemoPage.runningProcessesFilter().checkProcessFilterIsDisplayed();
|
processCloudDemoPage.runningProcessesFilter().checkProcessFilterIsDisplayed();
|
||||||
processCloudDemoPage.runningProcessesFilter().clickProcessFilter();
|
processCloudDemoPage.runningProcessesFilter().clickProcessFilter();
|
||||||
|
@@ -22,6 +22,7 @@ import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
|||||||
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
|
import { ProcessCloudDemoPage } from '../pages/adf/demo-shell/process-services/processCloudDemoPage';
|
||||||
import { StringUtil } from '@alfresco/adf-testing';
|
import { StringUtil } from '@alfresco/adf-testing';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Start Process', () => {
|
describe('Start Process', () => {
|
||||||
|
|
||||||
@@ -38,7 +39,7 @@ describe('Start Process', () => {
|
|||||||
const requiredError = 'Process Name is required', requiredProcessError = 'Process Definition is required';
|
const requiredError = 'Process Name is required', requiredProcessError = 'Process Definition is required';
|
||||||
const processDefinition = 'processwithvariables';
|
const processDefinition = 'processwithvariables';
|
||||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||||
const appName = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
let silentLogin;
|
let silentLogin;
|
||||||
|
|
||||||
beforeAll((done) => {
|
beforeAll((done) => {
|
||||||
@@ -58,8 +59,8 @@ describe('Start Process', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C291857] Should be possible to cancel a process', () => {
|
it('[C291857] Should be possible to cancel a process', () => {
|
||||||
appListCloudComponent.checkAppIsDisplayed(appName);
|
appListCloudComponent.checkAppIsDisplayed(simpleApp);
|
||||||
appListCloudComponent.goToApp(appName);
|
appListCloudComponent.goToApp(simpleApp);
|
||||||
processCloudDemoPage.openNewProcessForm();
|
processCloudDemoPage.openNewProcessForm();
|
||||||
startProcessPage.clearField(startProcessPage.processNameInput);
|
startProcessPage.clearField(startProcessPage.processNameInput);
|
||||||
startProcessPage.blur(startProcessPage.processNameInput);
|
startProcessPage.blur(startProcessPage.processNameInput);
|
||||||
@@ -69,7 +70,7 @@ describe('Start Process', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C291842] Should be displayed an error message if process name exceed 255 characters', () => {
|
it('[C291842] Should be displayed an error message if process name exceed 255 characters', () => {
|
||||||
appListCloudComponent.goToApp(appName);
|
appListCloudComponent.goToApp(simpleApp);
|
||||||
processCloudDemoPage.openNewProcessForm();
|
processCloudDemoPage.openNewProcessForm();
|
||||||
startProcessPage.enterProcessName(processName255Characters);
|
startProcessPage.enterProcessName(processName255Characters);
|
||||||
startProcessPage.checkStartProcessButtonIsEnabled();
|
startProcessPage.checkStartProcessButtonIsEnabled();
|
||||||
@@ -81,8 +82,8 @@ describe('Start Process', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C291860] Should be able to start a process', () => {
|
it('[C291860] Should be able to start a process', () => {
|
||||||
appListCloudComponent.checkAppIsDisplayed(appName);
|
appListCloudComponent.checkAppIsDisplayed(simpleApp);
|
||||||
appListCloudComponent.goToApp(appName);
|
appListCloudComponent.goToApp(simpleApp);
|
||||||
processCloudDemoPage.openNewProcessForm();
|
processCloudDemoPage.openNewProcessForm();
|
||||||
|
|
||||||
startProcessPage.clearField(startProcessPage.processNameInput);
|
startProcessPage.clearField(startProcessPage.processNameInput);
|
||||||
@@ -98,8 +99,8 @@ describe('Start Process', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C291860] Should be able to start a process with variables', () => {
|
it('[C291860] Should be able to start a process with variables', () => {
|
||||||
appListCloudComponent.checkAppIsDisplayed(appName);
|
appListCloudComponent.checkAppIsDisplayed(simpleApp);
|
||||||
appListCloudComponent.goToApp(appName);
|
appListCloudComponent.goToApp(simpleApp);
|
||||||
processCloudDemoPage.openNewProcessForm();
|
processCloudDemoPage.openNewProcessForm();
|
||||||
|
|
||||||
startProcessPage.clearField(startProcessPage.processNameInput);
|
startProcessPage.clearField(startProcessPage.processNameInput);
|
||||||
|
@@ -24,6 +24,7 @@ import {
|
|||||||
} from '@alfresco/adf-testing';
|
} from '@alfresco/adf-testing';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { TaskDetailsCloudDemoPage } from '../pages/adf/demo-shell/process-services/taskDetailsCloudDemoPage';
|
import { TaskDetailsCloudDemoPage } from '../pages/adf/demo-shell/process-services/taskDetailsCloudDemoPage';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Start Task', () => {
|
describe('Start Task', () => {
|
||||||
|
|
||||||
@@ -45,7 +46,8 @@ describe('Start Task', () => {
|
|||||||
const requiredError = 'Field required';
|
const requiredError = 'Field required';
|
||||||
const dateValidationError = 'Date format DD/MM/YYYY';
|
const dateValidationError = 'Date format DD/MM/YYYY';
|
||||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||||
const appName = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
|
|
||||||
let silentLogin, activitiUser;
|
let silentLogin, activitiUser;
|
||||||
let tasksService: TasksService;
|
let tasksService: TasksService;
|
||||||
let identityService: IdentityService;
|
let identityService: IdentityService;
|
||||||
@@ -68,8 +70,8 @@ describe('Start Task', () => {
|
|||||||
afterAll(async (done) => {
|
afterAll(async (done) => {
|
||||||
const tasks = [ standaloneTaskName, unassignedTaskName, reassignTaskName ];
|
const tasks = [ standaloneTaskName, unassignedTaskName, reassignTaskName ];
|
||||||
for (let i = 0; i < tasks.length; i++) {
|
for (let i = 0; i < tasks.length; i++) {
|
||||||
const taskId = await tasksService.getTaskId(tasks[i], appName);
|
const taskId = await tasksService.getTaskId(tasks[i], simpleApp);
|
||||||
await tasksService.deleteTask(taskId, appName);
|
await tasksService.deleteTask(taskId, simpleApp);
|
||||||
}
|
}
|
||||||
await identityService.deleteIdentityUser(activitiUser.idIdentityService);
|
await identityService.deleteIdentityUser(activitiUser.idIdentityService);
|
||||||
done();
|
done();
|
||||||
@@ -78,8 +80,8 @@ describe('Start Task', () => {
|
|||||||
beforeEach((done) => {
|
beforeEach((done) => {
|
||||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||||
appListCloudComponent.checkApsContainer();
|
appListCloudComponent.checkApsContainer();
|
||||||
appListCloudComponent.checkAppIsDisplayed(appName);
|
appListCloudComponent.checkAppIsDisplayed(simpleApp);
|
||||||
appListCloudComponent.goToApp(appName);
|
appListCloudComponent.goToApp(simpleApp);
|
||||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
|
tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
@@ -21,6 +21,7 @@ import { LoginSSOPage, TasksService, ApiService, SettingsPage, AppListCloudPage,
|
|||||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||||
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Task filters cloud', () => {
|
describe('Task filters cloud', () => {
|
||||||
|
|
||||||
@@ -35,7 +36,7 @@ describe('Task filters cloud', () => {
|
|||||||
|
|
||||||
let silentLogin;
|
let silentLogin;
|
||||||
const newTask = StringUtil.generateRandomString(5), completedTask = StringUtil.generateRandomString(5);
|
const newTask = StringUtil.generateRandomString(5), completedTask = StringUtil.generateRandomString(5);
|
||||||
const simpleApp = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
silentLogin = false;
|
silentLogin = false;
|
||||||
|
@@ -25,13 +25,14 @@ import { LoginSSOPage, SettingsPage, AppListCloudPage, TaskHeaderCloudPage, Task
|
|||||||
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { TaskDetailsCloudDemoPage } from '../pages/adf/demo-shell/process-services/taskDetailsCloudDemoPage';
|
import { TaskDetailsCloudDemoPage } from '../pages/adf/demo-shell/process-services/taskDetailsCloudDemoPage';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Task Header cloud component', () => {
|
describe('Task Header cloud component', () => {
|
||||||
|
|
||||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||||
const basicCreatedTaskName = StringUtil.generateRandomString(), completedTaskName = StringUtil.generateRandomString();
|
const basicCreatedTaskName = StringUtil.generateRandomString(), completedTaskName = StringUtil.generateRandomString();
|
||||||
let basicCreatedTask, basicCreatedDate, completedTask, completedCreatedDate, subTask, subTaskCreatedDate;
|
let basicCreatedTask, basicCreatedDate, completedTask, completedCreatedDate, subTask, subTaskCreatedDate;
|
||||||
const simpleApp = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
const priority = 30, description = 'descriptionTask', formatDate = 'DD-MM-YYYY';
|
const priority = 30, description = 'descriptionTask', formatDate = 'DD-MM-YYYY';
|
||||||
|
|
||||||
const taskHeaderCloudPage = new TaskHeaderCloudPage();
|
const taskHeaderCloudPage = new TaskHeaderCloudPage();
|
||||||
|
@@ -31,6 +31,7 @@ import { DateUtil } from '../util/dateUtil';
|
|||||||
|
|
||||||
import { NotificationPage } from '../pages/adf/notificationPage';
|
import { NotificationPage } from '../pages/adf/notificationPage';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Edit task filters and task list properties', () => {
|
describe('Edit task filters and task list properties', () => {
|
||||||
|
|
||||||
@@ -49,8 +50,9 @@ describe('Edit task filters and task list properties', () => {
|
|||||||
const notificationPage = new NotificationPage();
|
const notificationPage = new NotificationPage();
|
||||||
|
|
||||||
let silentLogin;
|
let silentLogin;
|
||||||
const simpleApp = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
const candidateUserApp = 'candidateuserapp';
|
const candidateUserApp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP;
|
||||||
|
|
||||||
const noTasksFoundMessage = 'No Tasks Found';
|
const noTasksFoundMessage = 'No Tasks Found';
|
||||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||||
let createdTask, notAssigned, notDisplayedTask, processDefinition, processInstance, priorityTask, subTask;
|
let createdTask, notAssigned, notDisplayedTask, processDefinition, processInstance, priorityTask, subTask;
|
||||||
|
@@ -23,6 +23,7 @@ import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tas
|
|||||||
import { AppListCloudPage } from '@alfresco/adf-testing';
|
import { AppListCloudPage } from '@alfresco/adf-testing';
|
||||||
import { StringUtil } from '@alfresco/adf-testing';
|
import { StringUtil } from '@alfresco/adf-testing';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Task list cloud - selection', () => {
|
describe('Task list cloud - selection', () => {
|
||||||
|
|
||||||
@@ -36,7 +37,7 @@ describe('Task list cloud - selection', () => {
|
|||||||
let tasksService: TasksService;
|
let tasksService: TasksService;
|
||||||
|
|
||||||
let silentLogin;
|
let silentLogin;
|
||||||
const simpleApp = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||||
const noOfTasks = 3;
|
const noOfTasks = 3;
|
||||||
let response;
|
let response;
|
||||||
|
@@ -23,6 +23,7 @@ import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tas
|
|||||||
import { AppListCloudPage } from '@alfresco/adf-testing';
|
import { AppListCloudPage } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
import resources = require('../util/resources');
|
||||||
|
|
||||||
describe('Task filters cloud', () => {
|
describe('Task filters cloud', () => {
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ describe('Task filters cloud', () => {
|
|||||||
let silentLogin;
|
let silentLogin;
|
||||||
const createdTaskName = StringUtil.generateRandomString(), completedTaskName = StringUtil.generateRandomString(),
|
const createdTaskName = StringUtil.generateRandomString(), completedTaskName = StringUtil.generateRandomString(),
|
||||||
assignedTaskName = StringUtil.generateRandomString(), deletedTaskName = StringUtil.generateRandomString();
|
assignedTaskName = StringUtil.generateRandomString(), deletedTaskName = StringUtil.generateRandomString();
|
||||||
const simpleApp = 'simple-app';
|
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP;
|
||||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||||
let assignedTask, deletedTask, suspendedTasks;
|
let assignedTask, deletedTask, suspendedTasks;
|
||||||
const orderByNameAndPriority = ['cCreatedTask', 'dCreatedTask', 'eCreatedTask'];
|
const orderByNameAndPriority = ['cCreatedTask', 'dCreatedTask', 'eCreatedTask'];
|
||||||
|
@@ -116,7 +116,7 @@ describe('Attachment list action menu for processes', () => {
|
|||||||
|
|
||||||
viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
||||||
viewerPage.clickCloseButton();
|
viewerPage.clickCloseButton();
|
||||||
browser.sleep(20000);
|
browser.sleep(10000);
|
||||||
processFiltersPage.clickRunningFilterButton();
|
processFiltersPage.clickRunningFilterButton();
|
||||||
processFiltersPage.selectFromProcessList(processName.active);
|
processFiltersPage.selectFromProcessList(processName.active);
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ describe('Attachment list action menu for processes', () => {
|
|||||||
attachmentListPage.clickAttachFileButton(pngFile.location);
|
attachmentListPage.clickAttachFileButton(pngFile.location);
|
||||||
|
|
||||||
processDetailsPage.clickCancelProcessButton();
|
processDetailsPage.clickCancelProcessButton();
|
||||||
browser.sleep(20000);
|
browser.sleep(10000);
|
||||||
processFiltersPage.clickCompletedFilterButton();
|
processFiltersPage.clickCompletedFilterButton();
|
||||||
|
|
||||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||||
|
@@ -269,12 +269,13 @@ describe('Search Sorting Picker', () => {
|
|||||||
configEditor.clickSearchConfiguration();
|
configEditor.clickSearchConfiguration();
|
||||||
configEditor.clickClearButton();
|
configEditor.clickClearButton();
|
||||||
jsonFile.sorting.options.push({
|
jsonFile.sorting.options.push({
|
||||||
'key': 'Modified Date',
|
'key': 'createdByUser',
|
||||||
'label': 'Modified Date',
|
'label': 'Author',
|
||||||
'type': 'FIELD',
|
'type': 'FIELD',
|
||||||
'field': 'cm:modified',
|
'field': 'cm:creator',
|
||||||
'ascending': true
|
'ascending': true
|
||||||
});
|
});
|
||||||
|
|
||||||
configEditor.enterBigConfigurationText(JSON.stringify(jsonFile));
|
configEditor.enterBigConfigurationText(JSON.stringify(jsonFile));
|
||||||
configEditor.clickSaveButton();
|
configEditor.clickSaveButton();
|
||||||
|
|
||||||
@@ -283,16 +284,6 @@ describe('Search Sorting Picker', () => {
|
|||||||
.enterTextAndPressEnter(search);
|
.enterTextAndPressEnter(search);
|
||||||
|
|
||||||
searchSortingPicker.checkSortingSelectorIsDisplayed();
|
searchSortingPicker.checkSortingSelectorIsDisplayed();
|
||||||
browser.controlFlow().execute(async () => {
|
expect(searchResults.checkListIsOrderedByAuthorAsc()).toBe(true);
|
||||||
const idList = await contentServices.getElementsDisplayedId();
|
|
||||||
const numberOfElements = await contentServices.numberOfResultsDisplayed();
|
|
||||||
|
|
||||||
const nodeList = await nodeActions.getNodesDisplayed(this.alfrescoJsApi, idList, numberOfElements);
|
|
||||||
const modifiedDateList = [];
|
|
||||||
for (let i = 0; i < nodeList.length; i++) {
|
|
||||||
modifiedDateList.push(new Date(nodeList[i].entry.modifiedAt));
|
|
||||||
}
|
|
||||||
expect(contentServices.checkElementsDateSortedAsc(modifiedDateList)).toBe(true);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -108,7 +108,7 @@ describe('Search Filters', () => {
|
|||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
|
||||||
await browser.driver.sleep(30000); // wait search index previous file/folder uploaded
|
await browser.driver.sleep(15000); // wait search index previous file/folder uploaded
|
||||||
|
|
||||||
searchDialog.checkSearchIconIsVisible();
|
searchDialog.checkSearchIconIsVisible();
|
||||||
searchDialog.clickOnSearchIcon();
|
searchDialog.clickOnSearchIcon();
|
||||||
|
@@ -81,7 +81,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
|||||||
|
|
||||||
txtFileSite = await uploadActions.uploadFile(this.alfrescoJsApi, txtFileInfo.location, txtFileInfo.name, site.entry.guid);
|
txtFileSite = await uploadActions.uploadFile(this.alfrescoJsApi, txtFileInfo.location, txtFileInfo.name, site.entry.guid);
|
||||||
|
|
||||||
await browser.driver.sleep(30000);
|
await browser.driver.sleep(15000);
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
|||||||
|
|
||||||
jpgFile = await uploadActions.uploadFile(this.alfrescoJsApi, jpgFileInfo.location, jpgFileInfo.name, site.entry.guid);
|
jpgFile = await uploadActions.uploadFile(this.alfrescoJsApi, jpgFileInfo.location, jpgFileInfo.name, site.entry.guid);
|
||||||
|
|
||||||
await browser.driver.sleep(30000);
|
await browser.driver.sleep(15000);
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(userUploadingImg);
|
loginPage.loginToContentServicesUsingUserModel(userUploadingImg);
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
txtFile = await uploadActions.uploadFile(this.alfrescoJsApi, txtFileInfo.location, txtFileInfo.name, '-my-');
|
txtFile = await uploadActions.uploadFile(this.alfrescoJsApi, txtFileInfo.location, txtFileInfo.name, '-my-');
|
||||||
await browser.driver.sleep(30000);
|
await browser.driver.sleep(15000);
|
||||||
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
|
||||||
|
@@ -512,3 +512,9 @@ exports.Files = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.ACTIVITI7_APPS = {
|
||||||
|
CANDIDATE_USER_APP : "candidateuserapp",
|
||||||
|
SIMPLE_APP : "simple-app",
|
||||||
|
SUB_PROCESS_APP : "subprocess-app"
|
||||||
|
};
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
var Bundler = require('scss-bundle').Bundler;
|
var Bundler = require('scss-bundle').Bundler;
|
||||||
var writeFileSync = require('fs-extra').writeFileSync;
|
var writeFileSync = require('fs-extra').writeFileSync;
|
||||||
var mkdirpSync = require('fs-extra').mkdirpSync;
|
|
||||||
|
|
||||||
new Bundler().Bundle('./lib/process-services-cloud/src/lib/styles/_index.scss', '**/*.scss').then(result => {
|
new Bundler().Bundle('./lib/process-services-cloud/src/lib/styles/_index.scss', '**/*.scss').then(result => {
|
||||||
writeFileSync('./lib/dist/process-services-cloud/_theming.scss', result.bundledContent);
|
writeFileSync('./lib/dist/process-services-cloud/_theming.scss', result.bundledContent);
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import { ApiService } from '../api.service';
|
import { ApiService } from '../api.service';
|
||||||
import { UserModel } from '../../models/user.model';
|
import { UserModel } from '../../models/user.model';
|
||||||
|
import { PersonBodyCreate } from '@alfresco/js-api';
|
||||||
|
|
||||||
export class IdentityService {
|
export class IdentityService {
|
||||||
|
|
||||||
@@ -37,7 +38,14 @@ export class IdentityService {
|
|||||||
|
|
||||||
async createIdentityUserAndSyncECMBPM(user: UserModel) {
|
async createIdentityUserAndSyncECMBPM(user: UserModel) {
|
||||||
if (this.api.config.provider === 'ECM' || this.api.config.provider === 'ALL') {
|
if (this.api.config.provider === 'ECM' || this.api.config.provider === 'ALL') {
|
||||||
await this.api.apiService.core.peopleApi.addPerson(user);
|
const createUser: PersonBodyCreate = <PersonBodyCreate> {
|
||||||
|
firstName: user.firstName,
|
||||||
|
lastName: user.lastName,
|
||||||
|
password: user.password,
|
||||||
|
email: user.email,
|
||||||
|
id: user.email
|
||||||
|
};
|
||||||
|
await this.api.apiService.core.peopleApi.addPerson(createUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.api.config.provider === 'BPM' || this.api.config.provider === 'ALL') {
|
if (this.api.config.provider === 'BPM' || this.api.config.provider === 'ALL') {
|
||||||
|
23
package-lock.json
generated
23
package-lock.json
generated
@@ -9534,6 +9534,21 @@
|
|||||||
"integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=",
|
"integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"jasmine-fail-fast": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jasmine-fail-fast/-/jasmine-fail-fast-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-5dguaimiX2YsZA5MMnDC+acTh+c=",
|
||||||
|
"requires": {
|
||||||
|
"lodash": "3.10.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"lodash": {
|
||||||
|
"version": "3.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.0.tgz",
|
||||||
|
"integrity": "sha1-k9UcZygopEFqEq9XIguoqHN+L7s="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"jasmine-reporters": {
|
"jasmine-reporters": {
|
||||||
"version": "2.3.2",
|
"version": "2.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/jasmine-reporters/-/jasmine-reporters-2.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/jasmine-reporters/-/jasmine-reporters-2.3.2.tgz",
|
||||||
@@ -13943,6 +13958,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"protractor-fail-fast": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/protractor-fail-fast/-/protractor-fail-fast-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-OjuIFmY7hm5R/Msmioyg3aBevySpmpIgtm2TGUvMEqTzviPk/Fqd1HYmMjIQ+NzFMzrK+93LJa4civDvw1+hEg==",
|
||||||
|
"requires": {
|
||||||
|
"jasmine-fail-fast": "~2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"protractor-html-reporter-2": {
|
"protractor-html-reporter-2": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/protractor-html-reporter-2/-/protractor-html-reporter-2-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/protractor-html-reporter-2/-/protractor-html-reporter-2-1.0.4.tgz",
|
||||||
|
@@ -187,9 +187,11 @@ exports.config = {
|
|||||||
|
|
||||||
framework: 'jasmine2',
|
framework: 'jasmine2',
|
||||||
|
|
||||||
|
getPageTimeout: 60000,
|
||||||
|
|
||||||
jasmineNodeOpts: {
|
jasmineNodeOpts: {
|
||||||
showColors: true,
|
showColors: true,
|
||||||
defaultTimeoutInterval: 90000,
|
defaultTimeoutInterval: 60000,
|
||||||
print: function () {
|
print: function () {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user