'Testing' Moved Upload Actions to shared testing package (#4616)

* 'Testing' Moved Upload Actions to shared testing package

* Updated Upload Actionswith suggested changes

* Failing tests updated

* Resolving merge conflicts

* updating latest merge conflicts

* resolved merge conflicts

* update to fix previous issues with this.

* testing changes

* fix for failed travis test

* updates to fix failing travis test

* fixes file path error

* latest fix for failing travis test

* latest fix for failing travis test

* Fixing undefined rootPath

* fixes timing issues in content-services travis test

* resolves requested changes
This commit is contained in:
Alexa Fabian
2019-06-17 15:07:25 +01:00
committed by Eugenio Romano
parent 5f1caca5da
commit 725cf22956
60 changed files with 858 additions and 1028 deletions

View File

@@ -15,18 +15,14 @@
* limitations under the License.
*/
import { LoginPage } from '@alfresco/adf-testing';
import { LoginPage, UploadActions } from '@alfresco/adf-testing';
import { ViewerPage } from '../../pages/adf/viewerPage';
import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
import { AcsUserModel } from '../../models/ACS/acsUserModel';
import { FileModel } from '../../models/ACS/fileModel';
import { browser } from 'protractor';
import resources = require('../../util/resources');
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { UploadActions } from '../../actions/ACS/upload.actions';
import { check, uncheck } from '../../util/material';
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
@@ -58,23 +54,19 @@ describe('CardView Component - properties', () => {
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
});
this.alfrescoJsApi = new AlfrescoApi({
provider: 'ECM',
hostEcm: browser.params.testConfig.adf.url
});
const uploadActions = new UploadActions(this.alfrescoJsApi);
beforeAll(async (done) => {
const uploadActions = new UploadActions();
this.alfrescoJsApi = new AlfrescoApi({
provider: 'ECM',
hostEcm: browser.params.testConfig.adf.url
});
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
const pdfUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, '-my-');
const pdfUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
Object.assign(pngFileModel, pdfUploadedFile.entry);