dwyl / learn-nightwatch

:last_quarter_moon_with_face: Learn how to use Nightwatch.js to easily & automatically test your web apps in *real* web browsers.
584 stars 214 forks source link

Followed Instructions 1 by 1 but no success #52

Closed Isengo1989 closed 7 years ago

Isengo1989 commented 7 years ago

MacBook Pro OS Sierra / 10.12.1 (16B2555)

I tried it first with the normal Tutorial from Nightwatch, gave me the same error. I figured at least this had to work.

Starting selenium server in parallel mode... started - PID:  1010

Started child process for: e2e/github 
Started child process for: e2e/guineaPig 
Started child process for: e2e/upload_screenshots_to_s3 
 e2e/upload_screenshots_to_s3   If you want to upload Screenshots to S3
      please set your AWS Environment Variables (see readme).
 e2e/upload_screenshots_to_s3   \n
 e2e/upload_screenshots_to_s3   [Upload Screenshots To S3] Test Suite
=========================================

  >> e2e/upload_screenshots_to_s3 finished.  

  >> e2e/github finished.  

 e2e/guineaPig   \n
 e2e/guineaPig   [Guinea Pig] Test Suite
===========================
 e2e/guineaPig   
 e2e/guineaPig   Results for:  Guinea Pig Assert Title
 e2e/guineaPig   ✖ Timed out while waiting for element <body> to be present for 15000 milliseconds.  - expected "visible" but got: "not found"
 e2e/guineaPig       at Object.module.exports.Guinea Pig Assert Title (/Users/XXXXXX/nightwatch/learn-nightwatch/test/e2e/guineaPig.js:8:8)
 e2e/guineaPig   FAILED:  1 assertions failed (21.219s)

  >> e2e/guineaPig finished.  

 _________________________________________________

 TEST FAILURE:  1 assertions failed, 0 passed. (21.613s)

 ✖ guineaPig

   - Guinea Pig Assert Title (21.219s)
   Timed out while waiting for element <body> to be present for 15000 milliseconds.  - expected "visible" but got: "not found"
       at Object.module.exports.Guinea Pig Assert Title (/Users/XXXXXX/nightwatch/learn-nightwatch/test/e2e/guineaPig.js:8:8)

npm ERR! Test failed.  See above for more details.
nelsonic commented 7 years ago

@Isengo1989 thankyou for letting us know things are not going smoothly ... are you referring to the "quick-start" or the detailed instructions?

Isengo1989 commented 7 years ago

@nelsonic thank you for the quick response. I am referring to the "quick-start".

nelsonic commented 7 years ago

@Isengo1989 ok, let me try it on a fresh machine here to see if I can replicate the issue...

nelsonic commented 7 years ago

Following "Quick Start" instructions the https://github.com/dwyl/learn-nightwatch#quick-start-5mins on a fresh machine I get:

learn-nightwatch-install

learn-nightwatch-test

So unable to replicate the failing test... 😞

Details for my (ancient) MacBookAir: nelsons-macbook-air

Node version: node-version

@Isengo1989 can you please try running the tests npm test one more time to check? (thanks)

Isengo1989 commented 7 years ago

@nelsonic sorry for the delay and thanks for the quick testing. Much appreciate it. I will test it again in a second... Wow I changed NOTHING and now it works o.O See down below.

What could´ve been the issue here? Not that I am not happy now, but I am just curios. Maybe it will help someone.

Starting selenium server in parallel mode... started - PID:  3070

Started child process for: e2e/github 
Started child process for: e2e/guineaPig 
Started child process for: e2e/upload_screenshots_to_s3 
 e2e/upload_screenshots_to_s3   If you want to upload Screenshots to S3
      please set your AWS Environment Variables (see readme).
 e2e/upload_screenshots_to_s3   \n
 e2e/upload_screenshots_to_s3   [Upload Screenshots To S3] Test Suite
=========================================

  >> e2e/upload_screenshots_to_s3 finished.  

 e2e/guineaPig   \n
 e2e/guineaPig   [Guinea Pig] Test Suite
===========================
 e2e/guineaPig   
 e2e/guineaPig   Results for:  Guinea Pig Assert Title
 e2e/guineaPig   ✔ Element <body> was visible after 101 milliseconds.
 e2e/guineaPig   ✔ Testing if the page title equals "I am a page title - Sauce Labs".
 e2e/guineaPig   OK. 2 assertions passed. (4.888s)

  >> e2e/guineaPig finished.  

 e2e/github   \n
 e2e/github   [Github] Test Suite
=======================
 e2e/github   
 e2e/github   Results for:  Demo test GitHub
 e2e/github   ✔ Element <body> was visible after 62 milliseconds.
 e2e/github   ✔ Testing if element <body> contains text: "do what you love".
 e2e/github   OK. 2 assertions passed. (7.053s)

  >> e2e/github finished.  

OK. 4  total assertions passed. (7.483s)
INFO Selenium process finished.