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
@@ -15,16 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, UploadActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
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 { DropActions } from '../../actions/drop.actions';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
|
||||
@@ -35,7 +32,11 @@ describe('Document List Component - Properties', () => {
|
||||
const navigationBar = new NavigationBarPage();
|
||||
|
||||
let subFolder, parentFolder;
|
||||
const uploadActions = new UploadActions();
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf.url
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
let acsUser = null;
|
||||
|
||||
const pngFile = new FileModel({
|
||||
@@ -43,13 +44,6 @@ describe('Document List Component - Properties', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(() => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf.url
|
||||
});
|
||||
});
|
||||
|
||||
describe('Allow drop files property', async () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
@@ -61,9 +55,9 @@ describe('Document List Component - Properties', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
parentFolder = await uploadActions.createFolder(this.alfrescoJsApi, 'parentFolder', '-my-');
|
||||
parentFolder = await uploadActions.createFolder('parentFolder', '-my-');
|
||||
|
||||
subFolder = await uploadActions.createFolder(this.alfrescoJsApi, 'subFolder', parentFolder.entry.id);
|
||||
subFolder = await uploadActions.createFolder('subFolder', parentFolder.entry.id);
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
@@ -72,8 +66,8 @@ describe('Document List Component - Properties', () => {
|
||||
|
||||
afterEach(async (done) => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, subFolder.entry.id);
|
||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, parentFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(subFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(parentFolder.entry.id);
|
||||
done();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user