coryrylan / ng-pokedex

:monkey_face: Pokedex progressive web app built with Angular
https://ng-pokedex.web.app
263 stars 127 forks source link

ng e2e fails #8

Closed grib0 closed 6 years ago

grib0 commented 7 years ago

I read your great article https://coryrylan.com/blog/introduction-to-e2e-testing-with-the-angular-cli-and-protractor and would like to test your app but ng e2e fails :


**************************************************
*                    Failures                    *
**************************************************

1) ng-pokedex App should display heading saying NG-Pokédex
  - Failed: No element found using locator: By(css selector, app-root h1)

2) ng-pokedex pokemon view should open and view a particular pokemon
  - Failed: No element found using locator: By(css selector, app-pokemon-modal h1)

3) ng-pokedex pokemon view should open and allow arrow keys to navigate between pokemon
  - Failed: No element found using locator: By(css selector, app-pokemon-modal h1)

Executed 4 of 4 specs (3 FAILED) in 4 secs.
[10:32:28] I/launcher - 0 instance(s) of WebDriver still running
[10:32:28] I/launcher - chrome #01 failed 3 test(s)
[10:32:28] I/launcher - overall: 3 failed spec(s)
[10:32:28] E/launcher - Process exited with error code 1
Rainpia commented 6 years ago

me too. I also have this problem. Please advise.

Shanfang commented 6 years ago

I cloned the repo and 1. npm install 2. ng serve 3. ng e2e. I get the same error msg.

coryrylan commented 6 years ago

Hey thanks for reading the article! I just pushed a fix the e2e tests. They are slightly different than the article but I'll update it soon.

Rainpia commented 6 years ago

As my test, seem like it is related with router. if I use router, will show error, like error that can not find element. but if i do not use router, it works. So, please, Do you think what is the problem? Thanks