These are chat archives for mojotech/pioneer

2nd
Sep 2014
Jarid Margolin
@jaridmargolin
Sep 02 2014 19:17
In what browser are Pioneer tests run?
Sam Saccone
@samccone
Sep 02 2014 19:17
firefox, chrome, safari, ie, iphone, ipad, opera
:)
Jarid Margolin
@jaridmargolin
Sep 02 2014 19:18
thanks! will take a look
Sam Saccone
@samccone
Sep 02 2014 19:18
np np
Sam Saccone
@samccone
Sep 02 2014 19:25
ah bad link
Sam Saccone
@samccone
Sep 02 2014 19:27
good spot @jaridmargolin
Jarid Margolin
@jaridmargolin
Sep 02 2014 19:35
possible to run scaffold while using grunt-pioneer?
pioneer does not exist in ./node_modules/.bin
it exists in ./node_modules/grunt-pioneer/node_modules/.bin
but when I attempted to run it looks like it is unable to process paths correctly
Sam Saccone
@samccone
Sep 02 2014 19:37
oh yeah… grunt-pioneer
dont use that
it was made like .4 releases ago
sorry about that :P
Jarid Margolin
@jaridmargolin
Sep 02 2014 19:39
No big deal. Our unit tests are being run from grunt so I thought I would also add integration tests there. Not a deal breaker or anything though.
Sam Saccone
@samccone
Sep 02 2014 19:40
yeah we will update it so it works again
Jarid Margolin
@jaridmargolin
Sep 02 2014 19:45
So it looks like I will be able to get up and running with Pioneer, but I have 0 experience with cucumber. And my tests are usually more TDD than BDD. I'm sure I could do some digging, but any reading/video resources you could forward me to better understand the philosophy behind Pioneer?
Sam Saccone
@samccone
Sep 02 2014 19:45
sure
Jarid Margolin
@jaridmargolin
Sep 02 2014 19:47
looks good. appreciate it
Sam Saccone
@samccone
Sep 02 2014 19:47
np np
let me know if you have ANY questions :)
the actual step implementation should remind you of marionette
Jarid Margolin
@jaridmargolin
Sep 02 2014 19:53
Yep, I noticed. And previously I had only used chai's assert api. So I will have to do a little research on the BDD style
Pioneer looks great though!
Sam Saccone
@samccone
Sep 02 2014 19:55
yay!
bdd is pretty powerful
those blog posts will explain it quite well
Jarid Margolin
@jaridmargolin
Sep 02 2014 21:26
Is there a preferred way to write reusable steps?
Sam Saccone
@samccone
Sep 02 2014 21:32
hmm
depends on your needs
Jarid Margolin
@jaridmargolin
Sep 02 2014 21:36
I imagine I would do something similar to the example in pt 3 where a role is create for the user
Sam Saccone
@samccone
Sep 02 2014 21:37
ah yes
Jarid Margolin
@jaridmargolin
Sep 02 2014 21:37
and then steps for navigation are added in the role
Sam Saccone
@samccone
Sep 02 2014 21:37
typically i make methods on my widgets
to perform complex series of actions
Jarid Margolin
@jaridmargolin
Sep 02 2014 21:38
Ok and that makes sense.
a good example
this is a good reference repo https://github.com/mojotech/pioneer-todo-mvc
Jarid Margolin
@jaridmargolin
Sep 02 2014 21:39
Which is good per widget, but I imagine there will be many times where multiple widget actions are chained together
Login/ViewList/SelectListOption
etc...
Sam Saccone
@samccone
Sep 02 2014 21:43
yep!
this is how i handle it
@createEdit = ->
  findUser()
  .then (user) =>
    insert("Edit", {
      user: {
        __type: "Pointer"
        className: "_User"
        objectId: user.objectId
      }
    })
  .then (edit) =>
    insert("EditImage", {
      Edit: {
        __type: "Pointer",
        className: "Edit",
        objectId: edit.objectId
      }
    })
    .then -> edit
something like this
in a util file
:)
then i just call createEdit().then -> ,,,
works great
since “this"
is shared
you can leverage it
ok be back in 40 min or so
:)