Skip to content

Commit

Permalink
log demo shell not starting (#6954)
Browse files Browse the repository at this point in the history
  • Loading branch information
eromano committed Apr 27, 2021
1 parent 431f273 commit 4e94216
Showing 1 changed file with 38 additions and 31 deletions.
69 changes: 38 additions & 31 deletions e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,42 +255,49 @@ exports.config = {

// @ts-ignore
await browser.get(`${HOST}/#/settings`);
await LocalStorageUtil.clearStorage();
// @ts-ignore
await LocalStorageUtil.setStorageItem('ecmHost', browser.params.testConfig.appConfig.ecmHost);
// @ts-ignore
await LocalStorageUtil.setStorageItem('bpmHost', browser.params.testConfig.appConfig.bpmHost);
// @ts-ignore
await LocalStorageUtil.setStorageItem('providers', browser.params.testConfig.appConfig.provider);
await LocalStorageUtil.setStorageItem('baseShareUrl', `${HOST}/#`);

// @ts-ignore
await LocalStorageUtil.setStorageItem('authType', browser.params.testConfig.appConfig.authType);

// @ts-ignore
if (browser.params.testConfig.appConfig.authType === 'OAUTH') {
if (typeof LocalStorageUtil.clearStorage === "function") {
await LocalStorageUtil.clearStorage();
// @ts-ignore
await LocalStorageUtil.setStorageItem('ecmHost', browser.params.testConfig.appConfig.ecmHost);
// @ts-ignore
await LocalStorageUtil.setStorageItem('bpmHost', browser.params.testConfig.appConfig.bpmHost);
// @ts-ignore
await LocalStorageUtil.setStorageItem('providers', browser.params.testConfig.appConfig.provider);
await LocalStorageUtil.setStorageItem('baseShareUrl', `${HOST}/#`);

// @ts-ignore
await LocalStorageUtil.setStorageItem('identityHost', browser.params.testConfig.appConfig.identityHost);
await LocalStorageUtil.setStorageItem('authType', browser.params.testConfig.appConfig.authType);

// @ts-ignore
await LocalStorageUtil.setStorageItem('oauth2', JSON.stringify(browser.params.testConfig.appConfig.oauth2));
}
if (browser.params.testConfig.appConfig.authType === 'OAUTH') {

// @ts-ignore
await LocalStorageUtil.setStorageItem('identityHost', browser.params.testConfig.appConfig.identityHost);
// @ts-ignore
await LocalStorageUtil.setStorageItem('oauth2', JSON.stringify(browser.params.testConfig.appConfig.oauth2));
}

await LocalStorageUtil.apiReset();

function disableCSSAnimation() {
const css = '* {' +
'-webkit-transition-duration: 0s !important;' +
'transition-duration: 0s !important;' +
'-webkit-animation-duration: 0s !important;' +
'animation-duration: 0s !important;' +
'}';
const head = document.head || document.getElementsByTagName('head')[0];
const style = document.createElement('style');

style.type = 'text/css';
style.appendChild(document.createTextNode(css));
head.appendChild(style);
}

await LocalStorageUtil.apiReset();

function disableCSSAnimation() {
const css = '* {' +
'-webkit-transition-duration: 0s !important;' +
'transition-duration: 0s !important;' +
'-webkit-animation-duration: 0s !important;' +
'animation-duration: 0s !important;' +
'}';
const head = document.head || document.getElementsByTagName('head')[0];
const style = document.createElement('style');

style.type = 'text/css';
style.appendChild(document.createTextNode(css));
head.appendChild(style);
} else {
Logger.error(`====== Demo shell not able to start ======`);
process.exit();
}

},
Expand Down

0 comments on commit 4e94216

Please sign in to comment.