nchaulet / httpbackend

Http backend mock module for protractor
MIT License
28 stars 10 forks source link

Tests failing due to dependency issues in npm3 #14

Open chrisuehlinger opened 8 years ago

chrisuehlinger commented 8 years ago

Hey there! I've been using httpbackend at work with my automated protractor tests, and I've been very pleased with it, but we've started having problems recently as a result of dependency issues. After sorting through which dependency caused the issue, I was able to create a reduced test case that demonstrated the problem, here are the steps to reproduce:

OS: Windows 7 (although this may happen on Mac OS X too, I haven't tested) Node Version: 4.2.2 NPM Version: 3.3.12

  1. Go to https://angularjs.org/ and create the 2 files described in the tutorial.
  2. In the project directory, run npm install http-backend protractor
  3. Run the tests using the version of protractor that was installed, like so: ./node_modules/.bin/protractor ./config.js
  4. You should see the following error message, followed by a stack trace that lads to \node_modules\selenium-webdriver\lib\webdriver\promise.js:112:9:
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Started
F

Failures:
1) angularjs homepage todo list should add a todo
  Message:
    Failed: Unimplemented function: "then"

I think this may have to do with some of the dependencies that your project is relying on, which seem to include an old version of protractor.

I'm also getting errors when performing installs with npm3, which indicate that grunt-connect relies on grunt as a peerDependency. Looking through your package.json, it looks like you may be able to move the grunt and mocha related dependencies into devDependencies and make the most recent version of protractor into a peerDependency.

If you'd like, I can do this myself and submit a Pull Request.

Thanks for all the hard work! -Chris

nchaulet commented 8 years ago

Do you have the time to do the pull request ? Or I will try to do this this week end

chrisuehlinger commented 8 years ago

Sure, I’ll give it a shot

On Nov 6, 2015, at 5:04 PM, Nicolas Chaulet notifications@github.com wrote:

Do you have the time to do the pull request ? Or I will try to do this this week end

— Reply to this email directly or view it on GitHub https://github.com/nchaulet/httpbackend/issues/14#issuecomment-154556224.

nchaulet commented 8 years ago

Thanks