mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +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:
@@ -23,7 +23,7 @@ or
|
||||
`./scripts/test-e2e-lib.sh -host http://myadf.example.com -f process-services-cloud`
|
||||
|
||||
### How can I run the *cloud* e2e against a *remote* env with *full chrome* ?
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh`
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh -env .env.cloud`
|
||||
```
|
||||
BROWSER_RUN=true
|
||||
FOLDER="process-services-cloud"
|
||||
@@ -34,7 +34,7 @@ or
|
||||
`./scripts/test-e2e-lib.sh -host http://myadf.example.com -f process-services-cloud -b`
|
||||
|
||||
### How can I run specific *specs* agains a *remote* env?
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh`
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh -env .env.cloud`
|
||||
```
|
||||
LIST_SPECS="process-services-cloud/apps-section-cloud.e2e.ts,process-services-cloud/task-filters-cloud.e2e.ts"
|
||||
URL_HOST_ADF="http://myadf.example.co"
|
||||
@@ -52,7 +52,7 @@ IDENTITY_USERNAME_ADF="username"
|
||||
IDENTITY_PASSWORD_ADF="password"
|
||||
```
|
||||
### How can I run the *cloud* e2e against a *local* env with *chrome headless* ?
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh -ud`
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh -ud -env .env.cloud`
|
||||
```
|
||||
FOLDER="process-services-cloud"
|
||||
URL_HOST_ADF="http://localhost:4200"
|
||||
@@ -61,7 +61,7 @@ URL_HOST_ADF="http://localhost:4200"
|
||||
or `./scripts/test-e2e-lib.sh -ud -host http://localhost:4200 -f process-services-cloud `
|
||||
|
||||
### How can I run the *cloud* e2e against a *local* env with *full chrome* ?
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh -ud`
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh -ud -env .env.cloud`
|
||||
```
|
||||
BROWSER_RUN=true
|
||||
FOLDER="process-services-cloud"
|
||||
@@ -71,7 +71,7 @@ URL_HOST_ADF="http://localhost:4200"
|
||||
or `./scripts/test-e2e-lib.sh -ud -host http://localhost:4200 -f process-services-cloud -b`
|
||||
|
||||
### How can I run specific *specs* agains a *local* env?
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh -ud`
|
||||
Add to `.env.cloud` and run `./scripts/test-e2e-lib.sh -ud -env .env.cloud`
|
||||
```
|
||||
LIST_SPECS="process-services-cloud/apps-section-cloud.e2e.ts,process-services-cloud/task-filters-cloud.e2e.ts"
|
||||
URL_HOST_ADF="http://localhost:4200"
|
||||
|
@@ -59,8 +59,7 @@ export class SettingsPage {
|
||||
goToSettingsPage() {
|
||||
browser.waitForAngularEnabled(true);
|
||||
browser.driver.get(this.settingsURL);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.providerDropdown);
|
||||
return this;
|
||||
return BrowserVisibility.waitUntilElementIsVisible(this.providerDropdown);
|
||||
}
|
||||
|
||||
setProvider(option, selected) {
|
||||
@@ -139,7 +138,7 @@ export class SettingsPage {
|
||||
}
|
||||
|
||||
async setProviderEcmSso(contentServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true, clientId?: string, logoutUr: string = '/logout') {
|
||||
this.goToSettingsPage();
|
||||
await this.goToSettingsPage();
|
||||
this.setProvider(this.ecm.option, this.ecm.text);
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(this.bpmText);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.ecmText);
|
||||
@@ -151,11 +150,11 @@ export class SettingsPage {
|
||||
this.setImplicitFlow(implicitFlow);
|
||||
this.setLogoutUrl(logoutUr);
|
||||
this.clickApply();
|
||||
browser.sleep(1000);
|
||||
await browser.sleep(1000);
|
||||
}
|
||||
|
||||
async setProviderBpmSso(processServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true) {
|
||||
this.goToSettingsPage();
|
||||
await this.goToSettingsPage();
|
||||
this.setProvider(this.bpm.option, this.bpm.text);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.bpmText);
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(this.ecmText);
|
||||
@@ -166,8 +165,8 @@ export class SettingsPage {
|
||||
this.setIdentityHost(identityHost);
|
||||
this.setSilentLogin(silentLogin);
|
||||
this.setImplicitFlow(implicitFlow);
|
||||
this.clickApply();
|
||||
browser.sleep(1000);
|
||||
await this.clickApply();
|
||||
await browser.sleep(1000);
|
||||
}
|
||||
|
||||
async setLogoutUrl(logoutUrl) {
|
||||
|
@@ -19,7 +19,7 @@ import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
const DEFAULT_ROOT_PATH = global['TestConfig'] ? global['TestConfig'].main.rootPath : __dirname;
|
||||
const DEFAULT_ROOT_PATH = browser.params.testConfig ? browser.params.testConfig.main.rootPath : __dirname;
|
||||
|
||||
export class FileBrowserUtil {
|
||||
|
||||
|
@@ -16,6 +16,19 @@
|
||||
*/
|
||||
|
||||
export interface TestConfiguration {
|
||||
|
||||
appConfig: any;
|
||||
|
||||
identityAdmin: {
|
||||
email: string,
|
||||
password: string
|
||||
};
|
||||
|
||||
identityUser: {
|
||||
email: string,
|
||||
password: string
|
||||
};
|
||||
|
||||
main: {
|
||||
timeout: number;
|
||||
rootPath: string;
|
||||
|
Reference in New Issue
Block a user