My current angaular app uses Angular 6.1 and I want to cypress code coverage. All the examples I found are using Angular 8.x. As you know upgrading from Angular 6 to Angular 8 is not recommended and it might break many things. Has anyone successfully added cypress code coverage to Angular 6. Any help or suggestion on this will greatly help me.
Thanks in advance.
Now I will tell what I have tried
I am using this blog as reference blog ref and app App github . I have cloned the app from above link. App is already in Angular 8 and I have downgraded to Angular 6. But when I try to build the app, I see this error
Schema validation failed with the following errors:
Data path ".builders['cypress']" should have required property 'class'.
I have given package.json dependencies and devdependencies as reference
"dependencies": {
"@angular-devkit/build-angular": "^0.8.8",
"@angular/animations": "^6.1.7",
"@angular/cli": "^7.0.6",
"@angular/common": "^6.1.0",
"@angular/compiler": "^6.1.0",
"@angular/core": "^6.1.0",
"@angular/forms": "^6.1.0",
"@angular/platform-browser": "^6.1.0",
"@angular/platform-browser-dynamic": "^6.1.0",
"@angular/router": "^6.1.0",
"rxjs": "^6.5.3",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.14",
"@briebug/cypress-schematic": "^3.2.0",
"@cypress/code-coverage": "^1.14.0",
"@cypress/webpack-preprocessor": "4.1.3",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"cypress": "4.1.0",
"istanbul-instrumenter-loader": "^3.0.1",
"istanbul-lib-coverage": "^3.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"ngx-build-plus": "^9.0.6",
"nyc": "^15.0.0",
"source-map-support": "^0.5.19",
"ts-loader": "6.2.1",
"ts-node": "^7.0.1",
"tslint": "~5.15.0",
"typescript": "~3.5.3"
},
My overall goal is to generate code coverage using cypress. If anyone has already generated code coverage for angular 6, please do let me know.
@briebug/cypress-schematicwhich at earliest release has angular dependencies labelled v7.