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
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
!/.protractor-smartrunner/
|
||||
|
@ -12,6 +12,7 @@ node_js:
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
- .protractor-smartrunner
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
15
angular.json
15
angular.json
@ -266,7 +266,8 @@
|
||||
"options": {
|
||||
"protractorConfig": "protractor.conf.js",
|
||||
"webdriverUpdate": false,
|
||||
"devServerTarget": "app:lite-serve"
|
||||
"devServerTarget": "app:lite-serve",
|
||||
"invertGrep": true
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
@ -294,13 +295,13 @@
|
||||
"options": {
|
||||
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.json",
|
||||
"project": "projects/adf-office-services-ext/ng-package.json"
|
||||
}
|
||||
, "configurations": {
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.prod.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
@ -334,13 +335,13 @@
|
||||
"options": {
|
||||
"tsConfig": "projects/aca-shared/tsconfig.lib.json",
|
||||
"project": "projects/aca-shared/ng-package.json"
|
||||
}
|
||||
, "configurations": {
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"tsConfig": "projects/aca-shared/tsconfig.lib.prod.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
|
@ -2,7 +2,7 @@ const uploadOutput = require('../utils/upload-output');
|
||||
|
||||
const SAVE_SCREENSHOT = process.env.SAVE_SCREENSHOT === 'true';
|
||||
|
||||
async function afterLaunch(statusCode) {
|
||||
async function afterLaunch() {
|
||||
|
||||
if (SAVE_SCREENSHOT) {
|
||||
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 afterLaunch = require('./e2e/e2e-config/hooks/after-launch');
|
||||
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 projectRoot = path.resolve(__dirname);
|
||||
const downloadFolder = `${projectRoot}/e2e-downloads`;
|
||||
const e2eFolder = path.resolve(projectRoot, 'e2e');
|
||||
const E2E_HOST = process.env.E2E_HOST || 'http://localhost';
|
||||
const E2E_PORT = process.env.E2E_PORT || 4200;
|
||||
const E2E_HOST = process.env.E2E_HOST || 'http://localhost:4200';
|
||||
const BROWSER_RUN = process.env.BROWSER_RUN;
|
||||
const width = 1366;
|
||||
const height = 768;
|
||||
@ -129,7 +130,7 @@ exports.config = {
|
||||
|
||||
directConnect: true,
|
||||
|
||||
baseUrl: `${E2E_HOST}${E2E_PORT ? `:${E2E_PORT}` : ''}`,
|
||||
baseUrl: E2E_HOST,
|
||||
|
||||
getPageTimeout: 50000,
|
||||
|
||||
@ -139,8 +140,8 @@ exports.config = {
|
||||
defaultTimeoutInterval: 100000,
|
||||
print: function() {},
|
||||
...SmartRunner.withOptionalExclusions(
|
||||
path.resolve(__dirname, 'e2e/protractor.excludes.json')
|
||||
),
|
||||
resolve(__dirname, './e2e/protractor.excludes.json'),
|
||||
)
|
||||
},
|
||||
|
||||
plugins: [
|
||||
@ -155,6 +156,10 @@ exports.config = {
|
||||
],
|
||||
|
||||
onPrepare() {
|
||||
if (process.env.CI) {
|
||||
SmartRunner.apply({repoHash: process.env.GIT_HASH || ''});
|
||||
}
|
||||
|
||||
const tsConfigPath = path.resolve(e2eFolder, 'tsconfig.e2e.json');
|
||||
const tsConfig = require(tsConfigPath);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user