Showing posts with label angular-cli. Show all posts
Showing posts with label angular-cli. Show all posts

Monday, 3 April 2017

Fix: Protractor Expected Promise string bug

Protractor/Jasmine bug in Angular:

image

Fix by using:  expect<any>

image

How to fix 'router-outlet' is not a known element

When adding routing to an AngularCLI project you need to also update the startup test with the RouterTestingModule.

Failure to do so results in the following error when running ng test:

Here is the fix (click on the image to enlarge): 

image

Source code available here:

https://github.com/stevenh77/angular-lob-app/commit/f582ecf5034af3222a686ae0e9f237f6528aefa6

Thursday, 30 March 2017

Wallaby with Angular2 CLI

To get wallaby.js working after you have generated your project with angular-cli, you'll need to do the following:

Here are examples of Wallaby running my server code (simple data api returning json data) and the Angular UI:

image

image