mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
Update e2e Tests to allow ADW builds to run on them as well (#1242)
* make ECM host flexible
This commit is contained in:
@@ -32,7 +32,6 @@ export const BROWSER_WAIT_TIMEOUT = 10000;
|
|||||||
export const USE_HASH_STRATEGY = true;
|
export const USE_HASH_STRATEGY = true;
|
||||||
|
|
||||||
// Repository configs
|
// Repository configs
|
||||||
export const REPO_API_HOST = 'http://localhost:8080';
|
|
||||||
export const REPO_API_TENANT = '-default-';
|
export const REPO_API_TENANT = '-default-';
|
||||||
|
|
||||||
// Admin details
|
// Admin details
|
||||||
|
@@ -23,8 +23,8 @@
|
|||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { browser } from 'protractor';
|
||||||
import { AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { REPO_API_HOST } from '../../../configs';
|
|
||||||
import { RepoClientAuth } from '../repo-client-models';
|
import { RepoClientAuth } from '../repo-client-models';
|
||||||
|
|
||||||
export abstract class RepoApi {
|
export abstract class RepoApi {
|
||||||
@@ -34,10 +34,7 @@ export abstract class RepoApi {
|
|||||||
private username: string = RepoClientAuth.DEFAULT_USERNAME,
|
private username: string = RepoClientAuth.DEFAULT_USERNAME,
|
||||||
private password: string = RepoClientAuth.DEFAULT_PASSWORD
|
private password: string = RepoClientAuth.DEFAULT_PASSWORD
|
||||||
) {
|
) {
|
||||||
this.alfrescoJsApi.setConfig({
|
this.alfrescoJsApi.setConfig(browser.params.config);
|
||||||
provider: 'ECM',
|
|
||||||
hostEcm: REPO_API_HOST
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apiAuth() {
|
apiAuth() {
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
"lint": "ng lint && npm run spellcheck && npm run format:check && npm run e2e.typecheck",
|
"lint": "ng lint && npm run spellcheck && npm run format:check && npm run e2e.typecheck",
|
||||||
"wd:update": "webdriver-manager update --gecko=false $VERSION_CHROME",
|
"wd:update": "webdriver-manager update --gecko=false $VERSION_CHROME",
|
||||||
"e2e.typecheck": "tsc -p ./e2e/tsconfig.e2e.typecheck.json",
|
"e2e.typecheck": "tsc -p ./e2e/tsconfig.e2e.typecheck.json",
|
||||||
"e2e": "npm run wd:update && protractor --baseUrl=http://localhost:4000 $SUITE",
|
"e2e": "npm run wd:update && protractor --baseUrl=${TEST_BASE_URL:-http://localhost:4000} $SUITE",
|
||||||
"e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200 $SUITE",
|
"e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200 $SUITE",
|
||||||
"wait:app": "wait-on http://localhost:8080 && wait-on http://localhost:4000",
|
"wait:app": "wait-on http://localhost:8080 && wait-on http://localhost:4000",
|
||||||
"start:docker": "docker-compose up -d --build && npm run wait:app",
|
"start:docker": "docker-compose up -d --build && npm run wait:app",
|
||||||
|
@@ -13,6 +13,8 @@ const downloadFolder = `${projectRoot}/e2e-downloads`;
|
|||||||
const width = 1366;
|
const width = 1366;
|
||||||
const height = 768;
|
const height = 768;
|
||||||
|
|
||||||
|
const REPO_API_HOST = process.env.REPO_API_HOST || 'http://localhost:8080';
|
||||||
|
|
||||||
function rmDir(dirPath) {
|
function rmDir(dirPath) {
|
||||||
try {
|
try {
|
||||||
var files = fs.readdirSync(dirPath);
|
var files = fs.readdirSync(dirPath);
|
||||||
@@ -28,10 +30,17 @@ function rmDir(dirPath) {
|
|||||||
fs.rmdirSync(dirPath);
|
fs.rmdirSync(dirPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const appConfig = {
|
||||||
|
ecmHost: REPO_API_HOST,
|
||||||
|
providers: 'ECM',
|
||||||
|
authType: 'BASIC'
|
||||||
|
};
|
||||||
|
|
||||||
exports.config = {
|
exports.config = {
|
||||||
allScriptsTimeout: 50000,
|
allScriptsTimeout: 50000,
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
|
config: appConfig,
|
||||||
downloadFolder: downloadFolder
|
downloadFolder: downloadFolder
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user