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:
Eugenio Romano
2019-05-30 11:15:15 +01:00
committed by GitHub
parent 9aafb80483
commit b91a942aa1
156 changed files with 1227 additions and 715 deletions

View File

@@ -15,7 +15,6 @@
* limitations under the License.
*/
import TestConfig = require('../../test.config');
import { CreateFolderDialog } from './dialog/createFolderDialog';
import { CreateLibraryDialog } from './dialog/createLibraryDialog';
import { FormControllersPage } from '@alfresco/adf-testing';
@@ -433,16 +432,16 @@ export class ContentServicesPage {
uploadFile(fileLocation) {
this.checkUploadButton();
BrowserVisibility.waitUntilElementIsVisible(this.uploadFileButton);
this.uploadFileButton.sendKeys(path.resolve(path.join(TestConfig.main.rootPath, fileLocation)));
this.uploadFileButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
this.checkUploadButton();
return this;
}
uploadMultipleFile(files) {
BrowserVisibility.waitUntilElementIsVisible(this.uploadMultipleFileButton);
let allFiles = path.resolve(path.join(TestConfig.main.rootPath, files[0]));
let allFiles = path.resolve(path.join(browser.params.testConfig.main.rootPath, files[0]));
for (let i = 1; i < files.length; i++) {
allFiles = allFiles + '\n' + path.resolve(path.join(TestConfig.main.rootPath, files[i]));
allFiles = allFiles + '\n' + path.resolve(path.join(browser.params.testConfig.main.rootPath, files[i]));
}
this.uploadMultipleFileButton.sendKeys(allFiles);
BrowserVisibility.waitUntilElementIsVisible(this.uploadMultipleFileButton);
@@ -451,7 +450,7 @@ export class ContentServicesPage {
uploadFolder(folder) {
BrowserVisibility.waitUntilElementIsVisible(this.uploadFolderButton);
this.uploadFolderButton.sendKeys(path.resolve(path.join(TestConfig.main.rootPath, folder)));
this.uploadFolderButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, folder)));
BrowserVisibility.waitUntilElementIsVisible(this.uploadFolderButton);
return this;
}

View File

@@ -18,7 +18,6 @@
import { browser, by, element, ElementFinder } from 'protractor';
import { ProcessServicesPage } from './process-services/processServicesPage';
import { AppListCloudPage } from '@alfresco/adf-testing';
import TestConfig = require('../../test.config');
import { PeopleGroupCloudComponentPage } from './demo-shell/process-services/peopleGroupCloudComponentPage';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
@@ -141,7 +140,7 @@ export class NavigationBarPage {
}
openContentServicesFolder(folderId) {
return BrowserActions.getUrl(TestConfig.adf.url + '/files/' + folderId);
return BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + folderId);
}
chooseLanguage(language) {
@@ -208,12 +207,12 @@ export class NavigationBarPage {
}
async openViewer(nodeId) {
await BrowserActions.getUrl(TestConfig.adf.url + `/files(overlay:files/${nodeId}/view`);
await BrowserActions.getUrl(browser.params.testConfig.adf.url + `/files(overlay:files/${nodeId}/view`);
return this;
}
async goToSite(site) {
await BrowserActions.getUrl(TestConfig.adf.url + `/files/${site.entry.guid}/display/list`);
await BrowserActions.getUrl(browser.params.testConfig.adf.url + `/files/${site.entry.guid}/display/list`);
}
async scrollTo(el: ElementFinder) {

View File

@@ -17,7 +17,6 @@
import { element, by, protractor, browser } from 'protractor';
import TestConfig = require('../../../test.config');
import path = require('path');
import remote = require('selenium-webdriver/remote');
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
@@ -39,7 +38,7 @@ export class AttachmentListPage {
browser.setFileDetector(new remote.FileDetector());
BrowserVisibility.waitUntilElementIsVisible(this.attachFileButton);
return this.attachFileButton.sendKeys(path.resolve(path.join(TestConfig.main.rootPath, fileLocation)));
return this.attachFileButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
}
checkFileIsAttached(name) {

View File

@@ -15,7 +15,6 @@
* limitations under the License.
*/
import TestConfig = require('../../test.config');
import path = require('path');
import remote = require('selenium-webdriver/remote');
import { browser, by, element } from 'protractor';
@@ -50,7 +49,7 @@ export class VersionManagePage {
uploadNewVersionFile(fileLocation) {
browser.setFileDetector(new remote.FileDetector());
BrowserVisibility.waitUntilElementIsVisible(this.uploadNewVersionButton);
this.uploadNewVersionButton.sendKeys(path.resolve(path.join(TestConfig.main.rootPath, fileLocation)));
this.uploadNewVersionButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
BrowserVisibility.waitUntilElementIsVisible(this.showNewVersionButton);
return this;
}