mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Disable control flow e2e ADF (#4954)
* update project script possible different JS-API * first commit no controll flow * second commit no controll flow * third commit no controll flow * 4 commit no controll flow * 5 commit no controll flow * 6 commit no controll flow * 7 commit no controll flow * 8 commit no controll flow * 9 commit no controll flow * 10 commit no controll flow * 11 commit no controll flow * 12 commit no controll flow * 13 commit no controll flow * 14 commit no controll flow * 15 commit no controll flow * 16 commit no controll flow * 17 commit no controll flow * 18 commit no controll flow * 19 commit no controll flow * 20 commit no controll flow * remove wdpromise, protractor promise and deferred promises * - fixed some incorrect “expect” calls - fixed some matchers - removed “return this;” when not needed - added a few more await-s * forgot a file * fix some failing tests * replaced driver calls with browser calls and enabled back waitForAngular * fix rightClick methods and hopefully some tests * fix settings-component * some more fixes for core and content tests * try to fix some more issues * linting * revert some changes, allowing download on headless chrome won’t work with multiple browser instances * fixes for Search tests * try to remove some wait calls * fix build * increase allScriptsTimeout and try another protractor and web driver version * improve navigation methods * some fixes for notification history and login sso * forgot a space * fix packages and enable some screenshots * navigation bar fixes * fix some test * some fixes for notification history and navigation bar use correct visibility method in attachFileWidget test * fix searching and another fix for navigation * try solve sso login * some more fixes * refactor async forEach into for..of * try fix for search tests * resolve rebabse problems * remove install * fix lint * fix core e2e * fix core e2e * fix core e2e * fix ps tests * fix some tests * fix core e2e * fix core e2e * fix core * fix some issues PS * fix core * fix core * fix some ps test * fix rebase issues * remove save * fix url regressed after rebase * fix url regressed after rebase * fix ps and core * fix lint * more parallel e2e ps * fix some ps cloud test * some cloud fix * fix lint * fix some test * remove files to be ignored * out-tsc * improve one cs test * fix candidate base app * fix ps test * remove click function * clean methods alrady present in browser action * try ugly wait * move wait * remove duplicate call * remove underscore * fix after review * fix imports * minor cosmetic fixes * fix comments test
This commit is contained in:
@@ -1,21 +1,16 @@
|
||||
const path = require('path');
|
||||
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||
const jasmineReporters = require('jasmine-reporters');
|
||||
const retry = require('protractor-retry').retry;
|
||||
const tsConfig = require('./e2e/tsconfig.e2e.json');
|
||||
const AlfrescoApi = require('@alfresco/js-api').AlfrescoApiCompatibility;
|
||||
const TestConfig = require('./e2e/test.config');
|
||||
const failFast = require('./e2e/protractor/fail-fast');
|
||||
|
||||
const { beforeAllRewrite, afterAllRewrite, beforeEachAllRewrite, afterEachAllRewrite } = require('./e2e/protractor/override-jasmine');
|
||||
const { uploadScreenshot, saveReport } = require('./e2e/protractor/save-remote');
|
||||
|
||||
const { uploadScreenshot, saveReport, cleanReportFolder } = require('./e2e/protractor/save-remote');
|
||||
const argv = require('yargs').argv;
|
||||
const fs = require('fs');
|
||||
const rimraf = require('rimraf');
|
||||
|
||||
const projectRoot = path.resolve(__dirname);
|
||||
const width = 1366;
|
||||
const height = 768;
|
||||
const width = 1366, height = 768;
|
||||
|
||||
let load_env_file = function () {
|
||||
let ENV_FILE = process.env.ENV_FILE;
|
||||
@@ -32,18 +27,17 @@ let BROWSER_RUN = !!process.env.BROWSER_RUN;
|
||||
let FOLDER = process.env.FOLDER || '';
|
||||
let SELENIUM_SERVER = process.env.SELENIUM_SERVER || '';
|
||||
let DIRECT_CONNECCT = !SELENIUM_SERVER;
|
||||
let SELENIUM_PROMISE_MANAGER = parseInt(process.env.SELENIUM_PROMISE_MANAGER);
|
||||
let MAXINSTANCES = process.env.MAXINSTANCES || 1;
|
||||
let TIMEOUT = parseInt(process.env.TIMEOUT, 10);
|
||||
let SAVE_SCREENSHOT = (process.env.SAVE_SCREENSHOT == 'true');
|
||||
let LIST_SPECS = process.env.LIST_SPECS || [];
|
||||
let LOG = process.env.LOG ? true : false;
|
||||
let LOG = !!process.env.LOG;
|
||||
let arraySpecs = [];
|
||||
|
||||
if (LOG) {
|
||||
console.log('======= PROTRACTOR CONFIGURATION ====== ');
|
||||
console.log('SAVE_SCREENSHOT : ' + SAVE_SCREENSHOT);
|
||||
console.log('BROWSER_RUN : ' + BROWSER_RUN);
|
||||
console.log('SAVE_SCREENSHOT : ' + SAVE_SCREENSHOT);
|
||||
console.log('FOLDER : ' + FOLDER);
|
||||
console.log('MAXINSTANCES : ' + MAXINSTANCES);
|
||||
console.log('LIST_SPECS : ' + LIST_SPECS);
|
||||
@@ -51,13 +45,12 @@ if (LOG) {
|
||||
}
|
||||
|
||||
let browser_options = function () {
|
||||
let args_options = [];
|
||||
let args_options = ['--incognito', `--window-size=${width},${height}`, '--disable-gpu', '--disable-web-security', '--disable-browser-side-navigation'];
|
||||
|
||||
if (BROWSER_RUN === true) {
|
||||
args_options = ['--incognito', `--window-size=${width},${height}`, '--disable-gpu', '--disable-web-security', '--disable-browser-side-navigation'];
|
||||
} else {
|
||||
args_options = ['--incognito', '--headless', `--window-size=${width},${height}`, '--disable-gpu', '--disable-web-security', '--disable-browser-side-navigation'];
|
||||
if (BROWSER_RUN !== true) {
|
||||
args_options.push('--headless') ;
|
||||
}
|
||||
|
||||
return args_options;
|
||||
};
|
||||
|
||||
@@ -140,7 +133,7 @@ exports.config = {
|
||||
*/
|
||||
seleniumAddress: SELENIUM_SERVER,
|
||||
|
||||
SELENIUM_PROMISE_MANAGER: SELENIUM_PROMISE_MANAGER,
|
||||
SELENIUM_PROMISE_MANAGER: false,
|
||||
|
||||
plugins: [{
|
||||
package: 'jasmine2-protractor-utils',
|
||||
@@ -151,15 +144,6 @@ exports.config = {
|
||||
screenshotPath: `${projectRoot}/e2e-output/screenshots/`
|
||||
}],
|
||||
|
||||
postTest(results) {
|
||||
browser.manage().logs()
|
||||
.get('browser').then(function (browserLog) {
|
||||
console.log('log: ' +
|
||||
require('util').inspect(browserLog));
|
||||
});
|
||||
retry.onCleanUp(results);
|
||||
},
|
||||
|
||||
onCleanUp(results) {
|
||||
retry.onCleanUp(results);
|
||||
},
|
||||
@@ -195,15 +179,6 @@ exports.config = {
|
||||
})
|
||||
);
|
||||
|
||||
let generatedSuiteName = Math.random().toString(36).substr(2, 5);
|
||||
let junitReporter = new jasmineReporters.JUnitXmlReporter({
|
||||
consolidateAll: true,
|
||||
savePath: `${projectRoot}/e2e-output/junit-report`,
|
||||
filePrefix: 'results.xml-' + generatedSuiteName,
|
||||
});
|
||||
jasmine.getEnv().addReporter(junitReporter);
|
||||
|
||||
|
||||
return browser.driver.executeScript(disableCSSAnimation);
|
||||
|
||||
function disableCSSAnimation() {
|
||||
@@ -225,18 +200,7 @@ exports.config = {
|
||||
|
||||
beforeLaunch: function () {
|
||||
if (SAVE_SCREENSHOT) {
|
||||
let reportsFolder = `${projectRoot}/e2e-output/junit-report/`;
|
||||
|
||||
fs.exists(reportsFolder, function (exists, error) {
|
||||
if (exists) {
|
||||
rimraf(reportsFolder, function (err) {
|
||||
});
|
||||
}
|
||||
|
||||
if (error) {
|
||||
console.error('[ERROR] fs', error);
|
||||
}
|
||||
});
|
||||
cleanReportFolder();
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user