These are chat archives for mojotech/pioneer

5th
Sep 2014
Jarid Margolin
@jaridmargolin
Sep 05 2014 01:56
Grrr phantomjs has no support for history.pushState
And as a result I have some inconsistencies between chrome/phantomjs test results
And an outdated websocket spec ariya/phantomjs#11018
Jarid Margolin
@jaridmargolin
Sep 05 2014 02:02
Would be awesome to run Google Chrome tests in headless mode
Sam Saccone
@samccone
Sep 05 2014 13:23
ohhh i have spent many hours trying to do that
it is not so easy
aka after weeks of work I have never got it
Sam Saccone
@samccone
Sep 05 2014 14:06
heh
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:10
Clearly not in the scope of Pioneer. Just for curiosities sake.
Sam Saccone
@samccone
Sep 05 2014 14:11
yep i tried basically this
it is not hard on a OSX based system
but on a unix sys
it is pretty hard
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:19

@samccone how are you handling waiting for async code to execute while using pioneer?

For example when I first visit my app it runs a configure method which fetches some information from a server. After it has responded, I route to the desired page.

Sam Saccone
@samccone
Sep 05 2014 14:20
yep!
ok so not so hard at all
i use bluebird
and just return a promise from my helper step
that resolves when the request is complete
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:21
I would need something
this.driver.get('url')
  .then(wait for path to change)
  .then()
bluebird
Sam Saccone
@samccone
Sep 05 2014 14:21
ohhhh you mean you actually hit the route in the browser?
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:21
In this case...
other use cases may require waiting for UI updates
Sam Saccone
@samccone
Sep 05 2014 14:21
hmm
i think i need to understand a bit more
why do you hit the url
to seed?
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:22
So nothing actually lives at the root of the application '/'
Sam Saccone
@samccone
Sep 05 2014 14:22
ok
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:22
on start it configures and attempts to route to chat
or if unauthorized it will route to /login
Sam Saccone
@samccone
Sep 05 2014 14:23
ah i see
so you want to hit /
and see where you end up?
well by default.. find does a loop
and tries several times
until it fails
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:23
Oh ok
cool
Sam Saccone
@samccone
Sep 05 2014 14:24
so a simple visit => find
should work...
but if it does not
i have some other solutions
I need to record a more advanced video i thnk
:)
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:25
And maybe I have done a poor job reviewing the documentation...
Sam Saccone
@samccone
Sep 05 2014 14:25
nah it is confusing :(
just file issues whenever you are confused
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:27
Sure thing
Ideally I would love to contribute. I'll brush up on coffeescript this weekend so that I may be of more help
Sam Saccone
@samccone
Sep 05 2014 14:31
oh that would be amazing
well I appreciate the feedback
only way this thing is going to get better
we have a bunch of people here using it on their projects
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:34
There were a few things I think would be great. I'm curious to hear if you'd be interested in implementing, if there are technical restrictions, or if it is just the matter of finding the time to do so...
I get tags, and they work, but if I want to run a full feature I need to manually set a tag on each scenario in the feature
Sam Saccone
@samccone
Sep 05 2014 14:35
oh no just at the top
of the feature file
:)
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:35
There you go. Problem #1 solved!
Sam Saccone
@samccone
Sep 05 2014 14:36
:)
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:45
Why have you chosen not to execute tests by name?
$ pioneer "Feature: Login"
$ pioneer "Scenario: Route visitor to login"
Sam Saccone
@samccone
Sep 05 2014 14:45
oh
that is a good idea
such a good idea
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:48
I understand tags as possibly a quick dev hack to temporarily group a few tests together, but they feel a little dirty to me? The feature files are purely english up until tags. I think being able to execute by name could cut down on the amount of tags needed
Sam Saccone
@samccone
Sep 05 2014 14:48
yeaaah
this is all cucumber
but luckily...
i am on core
hahahah
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:49
oh no kidding
Jarid Margolin
@jaridmargolin
Sep 05 2014 14:56
So it looks like cucumber has
cucumber features --name "Failed login"
Sam Saccone
@samccone
Sep 05 2014 14:57
oh so...
based on how we hook into cucumber
i think you can just do pioneer —name “"
:)
Jarid Margolin
@jaridmargolin
Sep 05 2014 15:02
did not work for me...
Sam Saccone
@samccone
Sep 05 2014 15:02
pooooo
Jarid Margolin
@jaridmargolin
Sep 05 2014 15:02
haha
Sam Saccone
@samccone
Sep 05 2014 15:02
ok hhahha want to file an issue?
Jarid Margolin
@jaridmargolin
Sep 05 2014 15:03
Yep. I will file. Looking first to see if it is an issue with Pioneer or cucumber-js
Sam Saccone
@samccone
Sep 05 2014 15:03
well i think it is with us
we do a pretty complex dance with the args
Jarid Margolin
@jaridmargolin
Sep 05 2014 15:03
ok
but i guess not
Jarid Margolin
@jaridmargolin
Sep 05 2014 15:13
I will file... and I will submit a PR this weekend
Sam Saccone
@samccone
Sep 05 2014 15:14
:)
:clap:
Jarid Margolin
@jaridmargolin
Sep 05 2014 15:25
Pioneer not featured on dailyjs today. Get better traffic on monday anyways
Sam Saccone
@samccone
Sep 05 2014 15:25
:(
Sam Saccone
@samccone
Sep 05 2014 17:56
nice
got in the js weekly
Jarid Margolin
@jaridmargolin
Sep 05 2014 19:37
nice little star count bump :)
Sam Saccone
@samccone
Sep 05 2014 19:40
yep :P
Jérôme Steunou
@JSteunou
Sep 05 2014 20:54
hi there
Sam Saccone
@samccone
Sep 05 2014 20:54
hey
so yes it is very easy to add your own widget methods
just like backbone
Jérôme Steunou
@JSteunou
Sep 05 2014 20:55
nice
very very nice
for instance
this is a great example repo https://github.com/mojotech/pioneer-todo-mvc
Jérôme Steunou
@JSteunou
Sep 05 2014 20:56
A co worker of mine did write some scenario in php with the selenium driver
but told me he had some issue between chrome and ff
the driver did not react the same for some action
Sam Saccone
@samccone
Sep 05 2014 20:56
yeah i could see that
Jérôme Steunou
@JSteunou
Sep 05 2014 20:56
did you experience any thing like this?
Sam Saccone
@samccone
Sep 05 2014 20:57
things work really well now tho
have not run into anything like that in a long time
Jérôme Steunou
@JSteunou
Sep 05 2014 20:57
because of the Widget wrapper, or the driver itself was updated?
ok
Sam Saccone
@samccone
Sep 05 2014 20:57
well a mix really
Jérôme Steunou
@JSteunou
Sep 05 2014 21:00
:)
gosh I'm looking forward to play with this
does this soud weird to be exited to actually work :D
Sam Saccone
@samccone
Sep 05 2014 21:00
@jaridmargolin added them to his test
suite*
and has enjoyed it
we enjoy it here
Jérôme Steunou
@JSteunou
Sep 05 2014 21:01
so you guys created this for your needs at mojotech first?
how do you came with this idea?
Sam Saccone
@samccone
Sep 05 2014 21:02
yep
out of need
Jérôme Steunou
@JSteunou
Sep 05 2014 21:03
that's nice, I like this way of doing / thinking
ho another question about the selenium driver
is it come all set ready to go when installing pioneer
I'm ready the selenium webdriver readme and it seems to need some driver specific browser dependencies
Jarid Margolin
@jaridmargolin
Sep 05 2014 21:17
You will need the chromedriver or phantomjs in your PATH
At least for now :) mojotech/pioneer#225
Jérôme Steunou
@JSteunou
Sep 05 2014 21:18
hehe
I was sure, if I though about it, you guys though about it also
but that requirement could be added to the doc ;) Or maybe I just did not see it
another thing: how run the tests with multiple browsers
or
Jérôme Steunou
@JSteunou
Sep 05 2014 21:21
yeeaahh
So just adding selenium-webdriver dependencies driver as they say
and config per project or cli pioneer
am I right?
Jarid Margolin
@jaridmargolin
Sep 05 2014 21:22
Yep
Jérôme Steunou
@JSteunou
Sep 05 2014 21:23
tests can be run over IE as well?
Jérôme Steunou
@JSteunou
Sep 05 2014 21:25
ty!
hooo there is also an iphone driver
Jérôme Steunou
@JSteunou
Sep 05 2014 21:34
ok now i'm mixing up driver, server, ...
selenium make it so confusing
anyway thanks guys, I will watch pioneer very closely!
Jarid Margolin
@jaridmargolin
Sep 05 2014 21:35
The selenium server is what actually drives the command to the browser driver
You interact with the selenium server which interacts with the browser driver
Fernando Agüero
@fjaguero
Sep 05 2014 21:42
We're using selenium-nightwatch to test our Meteor app, but it's quite a madness
I will give it a try although is not easy to test Meteor :)
Chet Harrison
@ChetHarrison
Sep 05 2014 22:03
@samccone For testing purposes what's the best way to set up and tear down a fresh instance of the M app and BB history?