Skip to content

Commit

Permalink
Angular v10 update
Browse files Browse the repository at this point in the history
  • Loading branch information
santam85 authored and paviad committed Aug 25, 2020
1 parent a9b1501 commit ff54527
Show file tree
Hide file tree
Showing 39 changed files with 14,534 additions and 11,592 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ env:

node_js: "10"


addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
chrome: stable

cache:
directories:
Expand Down
76 changes: 28 additions & 48 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"newProjectRoot": "projects",
"projects": {
"ng2-charts-demo": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"style": "sass"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
Expand All @@ -21,7 +21,8 @@
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
Expand All @@ -34,8 +35,7 @@
"scripts": [
"node_modules/prismjs/prism.js",
"node_modules/prismjs/components/prism-typescript.min.js"
],
"es5BrowserSupport": true
]
},
"configurations": {
"production": {
Expand All @@ -50,7 +50,6 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -59,6 +58,11 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
Expand Down Expand Up @@ -86,25 +90,25 @@
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"./node_modules/@angular/material/prebuilt-themes/pink-bluegrey.css",
"src/styles.scss"
],
"scripts": [],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
]
],
"styles": [
"node_modules/@angular/material/prebuilt-themes/pink-bluegrey.css",
"src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"tsconfig.app.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
Expand All @@ -113,45 +117,22 @@
}
}
},
"ng2-charts-demo-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ng2-charts-demo:serve"
},
"configurations": {
"production": {
"devServerTarget": "ng2-charts-demo:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ng2-charts": {
"projectType": "library",
"root": "projects/ng2-charts",
"sourceRoot": "projects/ng2-charts/src",
"projectType": "library",
"prefix": "ch",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ng2-charts/tsconfig.lib.json",
"project": "projects/ng2-charts/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/ng2-charts/tsconfig.lib.prod.json"
}
}
},
"test": {
Expand All @@ -175,7 +156,6 @@
}
}
}
}
},
}},
"defaultProject": "ng2-charts-demo"
}
2 changes: 1 addition & 1 deletion cypress/integration/canvas-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Charts canvas ', () => {
browser: browsers
})
.eyesCheckWindow({
sizeMode: 'selector',
target: 'region',
selector: `${component.selector} canvas`,
})
.eyesClose();
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/main-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Main Page', () => {
browser: browsers
})
.eyesCheckWindow({
sizeMode: 'selector',
target: 'region',
selector: topBarSelector,
sendDom: false,
})
Expand All @@ -38,7 +38,7 @@ describe('Charts screenshot', () => {
componentsArray.forEach(component => {
it(`${component.url}`, () => {
cy.visit(component.url);
cy.get(component.selector).find('canvas').wait(200).screenshot();
cy.get(component.selector).find('canvas').root().wait(200).screenshot();
});
});
});
10 changes: 7 additions & 3 deletions cypress/integration/screenshot-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ async function forEachAsync(array, callback) {

const testResults = eyes.open("NG2-charts", "Charts comparison", {width: 1366, height: 768}).then(async function () {
return forEachAsync(urls, async (url) => {
const image = fs.readFileSync(`./cypress/screenshots/main-test.js/Charts -- ${url}.png`);
await eyes.checkImage(image, url);
try {
const image = fs.readFileSync(`./cypress/screenshots/main-test.js/Charts screenshot -- ${url.replace('/','')}.png`);
await eyes.checkImage(image, url);
} catch (e) {
console.log(e);
}
});
}).then(function () {
return eyes.close();
});

testResults.then(function (results) {
console.log("Results: ", results);
console.log("Results: ", JSON.stringify(results));
});
File renamed without changes.
Loading

0 comments on commit ff54527

Please sign in to comment.