Closed Foxandxss closed 10 years ago
The thing is, that running protractor by hand (not using the lineman command) it still cries about the require (in this case of jasmine-given
and I am not sure why.
Using lineman grunt spec-e2e
works just fine.
Is that command adding dependencies to our e2e tests that is not possible with "vanilla protractor"?
Precisely. Vanilla protractor gives you no opportunity to require stuff like coffee script. Which means that suite must be run via lineman grunt
On Wed, Oct 9, 2013 at 11:20 AM, Foxandxss notifications@github.com wrote:
The thing is, that running protractor by hand (not using the lineman command) it still cries about the require (in this case of
jasmine-given
and I am not sure why. Usinglineman grunt spec-e2e
works just fine.Is that command adding dependencies to our e2e tests that is not possible with "vanilla protractor"?
Reply to this email directly or view it on GitHub: https://github.com/testdouble/lineman-angular-template/pull/17#issuecomment-25979855
I see the need. That sucks.
If my test needs to use moment, which is not available in a protractor test. That means that I cannot require it?
You ought to be able to drop it into spec-e2e/helpers which will be loaded before your specs.
On Oct 9, 2013, at 12:28 PM, Foxandxss notifications@github.com wrote:
I see the need. That sucks.
If my test needs to use moment, which is not available in a protractor test. That means that I cannot require it?
— Reply to this email directly or view it on GitHub.
Which doesn't seem to work. Should I need to import it somehow? And why does that work? I don't see how is that pre-loaded.
Short answer: if you're trying to load something before protractor itself gets loaded, you need to do it in a task like I did so I could wedge in CoffeeScript. If you need to load in any code and it's fine that protractor gets loaded first, then a helper file ought to be enough.
What are you trying to require?
On Wed, Oct 9, 2013 at 1:03 PM, Foxandxss notifications@github.com wrote:
Which doesn't seem to work. Should I need to import it somehow? And why does that work? I don't see how is that pre-loaded.
— Reply to this email directly or view it on GitHubhttps://github.com/testdouble/lineman-angular-template/pull/17#issuecomment-25988869 .
I am noob with Protractor and I have a string in my scope created with momentjs so I need to recreate that string (I can't put it by hand) with momentjs but it is not available on my spec files.
Those requires are not needed anymore :+1:
Closes #16