mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
'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:
committed by
Eugenio Romano
parent
5f1caca5da
commit
725cf22956
@@ -16,28 +16,27 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, UploadActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
import { UploadToggles } from '../../pages/adf/dialog/uploadToggles';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
|
||||
describe('Upload component', () => {
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf.url
|
||||
});
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const uploadDialog = new UploadDialog();
|
||||
const uploadToggles = new UploadToggles();
|
||||
const loginPage = new LoginPage();
|
||||
const acsUser = new AcsUserModel();
|
||||
const uploadActions = new UploadActions();
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
const firstPdfFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
|
||||
@@ -53,11 +52,6 @@ describe('Upload component', () => {
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
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);
|
||||
@@ -68,7 +62,7 @@ describe('Upload component', () => {
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
|
||||
|
||||
Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
|
||||
|
||||
|
Reference in New Issue
Block a user