mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +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,21 +16,15 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, UploadActions, StringUtil } 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 { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
|
||||
describe('Info Drawer', () => {
|
||||
|
||||
@@ -38,7 +32,11 @@ describe('Info Drawer', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const uploadActions = new UploadActions();
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf.url
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
let site;
|
||||
const acsUser = new AcsUserModel();
|
||||
let pngFileUploaded;
|
||||
@@ -49,12 +47,6 @@ describe('Info Drawer', () => {
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
@@ -70,13 +62,13 @@ describe('Info Drawer', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
pngFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileInfo.location, pngFileInfo.name, site.entry.guid);
|
||||
pngFileUploaded = await uploadActions.uploadFile(pngFileInfo.location, pngFileInfo.name, site.entry.guid);
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, pngFileUploaded.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(pngFileUploaded.entry.id);
|
||||
done();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user