mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
Multiple option env file (#4788)
* multi configuration file enabling * improve ignore * update i18n tool dep * update webbpack bundle analyzer version * fix ps cloud test wait setting * fix script content * remove use of testconfig for browser options * convert protractor to ts * download browser util fix
This commit is contained in:
@@ -17,12 +17,12 @@
|
||||
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import TestConfig = require('../../test.config');
|
||||
import { browser } from 'protractor';
|
||||
|
||||
export class UploadActions {
|
||||
|
||||
async uploadFile(alfrescoJsApi, fileLocation, fileName, parentFolderId) {
|
||||
const pathFile = path.join(TestConfig.main.rootPath + fileLocation);
|
||||
const pathFile = path.join(browser.params.testConfig.main.rootPath + fileLocation);
|
||||
const file = fs.createReadStream(pathFile);
|
||||
|
||||
return alfrescoJsApi.upload.uploadFile(
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import TestConfig = require('../../test.config');
|
||||
import AppPublish = require('../../models/APS/AppPublish');
|
||||
import remote = require('selenium-webdriver/remote');
|
||||
import { browser } from 'protractor';
|
||||
@@ -63,7 +62,7 @@ export class AppsActions {
|
||||
async importApp(alfrescoJsApi, appFileLocation) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
const pathFile = path.join(TestConfig.main.rootPath + appFileLocation);
|
||||
const pathFile = path.join(browser.params.testConfig.main.rootPath + appFileLocation);
|
||||
const file = fs.createReadStream(pathFile);
|
||||
|
||||
return await alfrescoJsApi.activiti.appsApi.importAppDefinition(file);
|
||||
@@ -82,7 +81,7 @@ export class AppsActions {
|
||||
async importNewVersionAppDefinitionPublishDeployApp(alfrescoJsApi, appFileLocation, modelId) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
const pathFile = path.join(TestConfig.main.rootPath + appFileLocation);
|
||||
const pathFile = path.join(browser.params.testConfig.main.rootPath + appFileLocation);
|
||||
const file = fs.createReadStream(pathFile);
|
||||
|
||||
const appCreated = await alfrescoJsApi.activiti.appsApi.importNewAppDefinition(modelId, file);
|
||||
|
||||
@@ -15,11 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import TestConfig = require('../test.config');
|
||||
import { browser } from 'protractor';
|
||||
import remote = require('selenium-webdriver/remote');
|
||||
|
||||
const JS_BIND_INPUT = function (target) {
|
||||
@@ -81,7 +79,7 @@ export class DropActions {
|
||||
dropFile(dropArea, filePath) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
const absolutePath = path.resolve(path.join(TestConfig.main.rootPath, filePath));
|
||||
const absolutePath = path.resolve(path.join(browser.params.testConfig.main.rootPath, filePath));
|
||||
|
||||
fs.accessSync(absolutePath, fs.constants.F_OK);
|
||||
return dropArea.getWebElement().then((element) => {
|
||||
@@ -95,7 +93,7 @@ export class DropActions {
|
||||
dropFolder(dropArea, folderPath) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
const absolutePath = path.resolve(path.join(TestConfig.main.rootPath, folderPath));
|
||||
const absolutePath = path.resolve(path.join(browser.params.testConfig.main.rootPath, folderPath));
|
||||
fs.accessSync(absolutePath, fs.constants.F_OK);
|
||||
|
||||
return dropArea.getWebElement().then((element) => {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
import { Tenant } from '../models/APS/tenant';
|
||||
import { User } from '../models/APS/user';
|
||||
import TestConfig = require('../test.config');
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import remote = require('selenium-webdriver/remote');
|
||||
@@ -69,7 +68,7 @@ export class UsersActions {
|
||||
async changeProfilePictureAps(alfrescoJsApi, fileLocation) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
const pathFile = path.join(TestConfig.main.rootPath + fileLocation);
|
||||
const pathFile = path.join(browser.params.testConfig.main.rootPath + fileLocation);
|
||||
const file = fs.createReadStream(pathFile);
|
||||
|
||||
return alfrescoJsApi.activiti.profileApi.uploadProfilePicture(file);
|
||||
|
||||
Reference in New Issue
Block a user