mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4957] Use Replace JS instead of sed to run e2e (#5160)
* use replace js * Update app-config-replace.js * update replace * update replace * fix folder
This commit is contained in:
committed by
Denys Vuika
parent
450b20eca4
commit
27fa7a4725
21
scripts/app-config-replace.js
Normal file
21
scripts/app-config-replace.js
Normal file
@@ -0,0 +1,21 @@
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
require('dotenv').config({ path: process.env.ENV_FILE });
|
||||
const fs = require('fs');
|
||||
|
||||
const PROXY_HOST_ADF = process.env.PROXY_HOST_ADF;
|
||||
const NOTIFICATION_LAST = process.env.NOTIFICATION_LAST || 8000;
|
||||
|
||||
const configPath = './demo-shell/dist/app.config.json';
|
||||
|
||||
fs.readFile(configPath, (err, appConfigString) => {
|
||||
if (err) throw err;
|
||||
let appConfig = JSON.parse(appConfigString);
|
||||
appConfig.bpmHost = PROXY_HOST_ADF;
|
||||
appConfig.ecmHost = PROXY_HOST_ADF;
|
||||
appConfig.notificationDefaultDuration = NOTIFICATION_LAST;
|
||||
|
||||
let appConfigReplacedJson = JSON.stringify(appConfig);
|
||||
fs.writeFileSync(configPath, appConfigReplacedJson);
|
||||
});
|
Reference in New Issue
Block a user