Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[E2E] Log demo shell not starting #6954

Merged
merged 1 commit into from
Apr 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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