mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-19 17:14:45 +00:00
Fix smart runner (#1570)
* [ACA-3799] add prefix filter * add smart runner * fix resolve * add some configuration for smartrunner * simplify * fix * we need to pass invertGrep in the devServerTarget because Angular overwrite it if you use the dev server
This commit is contained in:
parent
d26bbc9bff
commit
aee3afdeb8
1
.gitignore
vendored
1
.gitignore
vendored
@ -46,3 +46,4 @@ testem.log
|
|||||||
# System Files
|
# System Files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
!/.protractor-smartrunner/
|
||||||
|
@ -12,6 +12,7 @@ node_js:
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- node_modules
|
- node_modules
|
||||||
|
- .protractor-smartrunner
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
|
11
angular.json
11
angular.json
@ -266,7 +266,8 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"protractorConfig": "protractor.conf.js",
|
"protractorConfig": "protractor.conf.js",
|
||||||
"webdriverUpdate": false,
|
"webdriverUpdate": false,
|
||||||
"devServerTarget": "app:lite-serve"
|
"devServerTarget": "app:lite-serve",
|
||||||
|
"invertGrep": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
@ -294,8 +295,8 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.json",
|
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.json",
|
||||||
"project": "projects/adf-office-services-ext/ng-package.json"
|
"project": "projects/adf-office-services-ext/ng-package.json"
|
||||||
}
|
},
|
||||||
, "configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.prod.json"
|
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.prod.json"
|
||||||
}
|
}
|
||||||
@ -334,8 +335,8 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"tsConfig": "projects/aca-shared/tsconfig.lib.json",
|
"tsConfig": "projects/aca-shared/tsconfig.lib.json",
|
||||||
"project": "projects/aca-shared/ng-package.json"
|
"project": "projects/aca-shared/ng-package.json"
|
||||||
}
|
},
|
||||||
, "configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"tsConfig": "projects/aca-shared/tsconfig.lib.prod.json"
|
"tsConfig": "projects/aca-shared/tsconfig.lib.prod.json"
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ const uploadOutput = require('../utils/upload-output');
|
|||||||
|
|
||||||
const SAVE_SCREENSHOT = process.env.SAVE_SCREENSHOT === 'true';
|
const SAVE_SCREENSHOT = process.env.SAVE_SCREENSHOT === 'true';
|
||||||
|
|
||||||
async function afterLaunch(statusCode) {
|
async function afterLaunch() {
|
||||||
|
|
||||||
if (SAVE_SCREENSHOT) {
|
if (SAVE_SCREENSHOT) {
|
||||||
console.log(`Save screenshot is ${SAVE_SCREENSHOT}, trying to save screenshots.`);
|
console.log(`Save screenshot is ${SAVE_SCREENSHOT}, trying to save screenshots.`);
|
||||||
|
@ -5,14 +5,15 @@ const path = require('path');
|
|||||||
const { SpecReporter } = require('jasmine-spec-reporter');
|
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||||
const afterLaunch = require('./e2e/e2e-config/hooks/after-launch');
|
const afterLaunch = require('./e2e/e2e-config/hooks/after-launch');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
require('dotenv').config();
|
const resolve = require('path').resolve;
|
||||||
|
|
||||||
|
require('dotenv').config({ path: process.env.ENV_FILE });
|
||||||
|
|
||||||
const SmartRunner = require('protractor-smartrunner');
|
const SmartRunner = require('protractor-smartrunner');
|
||||||
const projectRoot = path.resolve(__dirname);
|
const projectRoot = path.resolve(__dirname);
|
||||||
const downloadFolder = `${projectRoot}/e2e-downloads`;
|
const downloadFolder = `${projectRoot}/e2e-downloads`;
|
||||||
const e2eFolder = path.resolve(projectRoot, 'e2e');
|
const e2eFolder = path.resolve(projectRoot, 'e2e');
|
||||||
const E2E_HOST = process.env.E2E_HOST || 'http://localhost';
|
const E2E_HOST = process.env.E2E_HOST || 'http://localhost:4200';
|
||||||
const E2E_PORT = process.env.E2E_PORT || 4200;
|
|
||||||
const BROWSER_RUN = process.env.BROWSER_RUN;
|
const BROWSER_RUN = process.env.BROWSER_RUN;
|
||||||
const width = 1366;
|
const width = 1366;
|
||||||
const height = 768;
|
const height = 768;
|
||||||
@ -129,7 +130,7 @@ exports.config = {
|
|||||||
|
|
||||||
directConnect: true,
|
directConnect: true,
|
||||||
|
|
||||||
baseUrl: `${E2E_HOST}${E2E_PORT ? `:${E2E_PORT}` : ''}`,
|
baseUrl: E2E_HOST,
|
||||||
|
|
||||||
getPageTimeout: 50000,
|
getPageTimeout: 50000,
|
||||||
|
|
||||||
@ -139,8 +140,8 @@ exports.config = {
|
|||||||
defaultTimeoutInterval: 100000,
|
defaultTimeoutInterval: 100000,
|
||||||
print: function() {},
|
print: function() {},
|
||||||
...SmartRunner.withOptionalExclusions(
|
...SmartRunner.withOptionalExclusions(
|
||||||
path.resolve(__dirname, 'e2e/protractor.excludes.json')
|
resolve(__dirname, './e2e/protractor.excludes.json'),
|
||||||
),
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -155,6 +156,10 @@ exports.config = {
|
|||||||
],
|
],
|
||||||
|
|
||||||
onPrepare() {
|
onPrepare() {
|
||||||
|
if (process.env.CI) {
|
||||||
|
SmartRunner.apply({repoHash: process.env.GIT_HASH || ''});
|
||||||
|
}
|
||||||
|
|
||||||
const tsConfigPath = path.resolve(e2eFolder, 'tsconfig.e2e.json');
|
const tsConfigPath = path.resolve(e2eFolder, 'tsconfig.e2e.json');
|
||||||
const tsConfig = require(tsConfigPath);
|
const tsConfig = require(tsConfigPath);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user