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,20 +16,22 @@
|
||||
*/
|
||||
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { StringUtil, BrowserActions, NotificationHistoryPage } from '@alfresco/adf-testing';
|
||||
import { StringUtil, BrowserActions, NotificationHistoryPage, LoginPage, ErrorPage, UploadActions } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { LoginPage, ErrorPage } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { ShareDialog } from '../../pages/adf/dialog/shareDialog';
|
||||
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';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Unshare file', () => {
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf.url
|
||||
});
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const contentListPage = contentServicesPage.getDocumentList();
|
||||
@@ -38,9 +40,8 @@ describe('Unshare file', () => {
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
const shareDialog = new ShareDialog();
|
||||
const siteName = `PRIVATE-TEST-SITE-${StringUtil.generateRandomString(5)}`;
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
const uploadActions = new UploadActions();
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
let nodeBody;
|
||||
let nodeId;
|
||||
let testSite;
|
||||
@@ -69,11 +70,6 @@ describe('Unshare file', () => {
|
||||
}
|
||||
};
|
||||
|
||||
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);
|
||||
testSite = await this.alfrescoJsApi.core.sitesApi.createSite(site);
|
||||
@@ -96,7 +92,7 @@ describe('Unshare file', () => {
|
||||
await this.alfrescoJsApi.core.sharedlinksApi.addSharedLink({ nodeId: testFile1Id });
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
const pngUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, '-my-');
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
@@ -112,7 +108,7 @@ describe('Unshare file', () => {
|
||||
|
||||
describe('with permission', () => {
|
||||
afterAll(async (done) => {
|
||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, nodeId);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
done();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user