Closed peterh32 closed 9 years ago
Hi @peterh32. Check out this section of the readme:
https://github.com/atecarlos/protractor-http-mock#directories-and-file-names
It explains how to configure the plugin with the specific name of your protractor config file.
So your particular case would be:
onPrepare: function(){ require('protractor-http-mock').config = { protractorConfig: 'protractor-conf.js' }; }
Please let me know how this goes.
This seems to break pretty epically with the new protractor 1.5
TypeError: Object #
getInstance has been deprecated for quite some time in favor of the global "browser".
And it was indeed phased out completely in the 1.5 release: https://github.com/angular/protractor/blob/master/CHANGELOG.md#breaking-changes
This should be a fairly easy fix. If I have time later today, I will implement it on my fork and make a pull request.
I won't be making a fix because @davidduffett already made one on a different fork: https://github.com/AlliterativeAnimals/protractor-http-mock/pull/1
Hi @jdgblinq and @nielssj . Sorry for the delay. I just published a fix for the "getInstance" problem. Please let me know if anything else comes up. I will be more responsive from now on.
Hey, thanks, btw. This is working great now. Sorry I didn't have a chance to take a look earlier.
No problem! Very glad to know its all working now @jdgblinq
Somewhat of a protractor newbie so forgive me if this is user error. My protractor conf filename is "protractor-conf.js". When I run tests with protractor-http-mock, it looks for the filename "protractor.conf". I can work around it by hardcoding the filename in line 34 in getMocksConfig() in init-data.js, but that's not viable long-term.
Here's how I run protractor tests: protractor --specs [path to spec js file] protractor-conf.js Note that the conf filename is the last argument. Maybe http-mock can pick up the filename from there?
Love the functionality though.