These are chat archives for mojotech/pioneer

25th
Aug 2014
Jamie
@jamiebuilds
Aug 25 2014 15:16
@samccone instead of doing this.Widgets = this.Widgets || {}; at the top of each file. would it be so bad if I built on top of this.Widget?
Sam Saccone
@samccone
Aug 25 2014 15:28
nope
not bad at all
:)
@thejameskyle
Jamie
@jamiebuilds
Aug 25 2014 15:37
@samccone can you mark an entire feature file as `@working`?
Sam Saccone
@samccone
Aug 25 2014 15:38
yep
right at the top
Jamie
@jamiebuilds
Aug 25 2014 15:38
how?
oh… duh
Sam Saccone
@samccone
Aug 25 2014 15:39
heh @thejameskyle what are you adding tests for :)
Jamie
@jamiebuilds
Aug 25 2014 15:40
I’m cleaning up your tests on marionette-wires
:P
Sam Saccone
@samccone
Aug 25 2014 15:40
:|
:{
fine
Jamie
@jamiebuilds
Aug 25 2014 15:40
I’m obsessive...
Sam Saccone
@samccone
Aug 25 2014 15:41
ha thats fine
Jamie
@jamiebuilds
Aug 25 2014 15:46
@samccone do you know anything about bluebirds typeerror: circular promise resolution chain?
Sam Saccone
@samccone
Aug 25 2014 15:46
yep
you are mixing promises
:)
told ya
Jamie
@jamiebuilds
Aug 25 2014 15:47
time to switch to nightwatch
Sam Saccone
@samccone
Aug 25 2014 15:47
can i see what you are doing?
Jamie
@jamiebuilds
Aug 25 2014 15:48
return this.findAll('input').then(function(els) {
  return Promise.map(els, function(el) {
    return el.clear();
  });
}).then(function() {
  return self.submitWith(vals);
});
Sam Saccone
@samccone
Aug 25 2014 15:48
yep that would do it
Driver.Promise.all()
is what you want
Driver = require(“selenium-webdriver”);
and instead of map
use .all
and it will work
Jamie
@jamiebuilds
Aug 25 2014 15:48
.all?
Sam Saccone
@samccone
Aug 25 2014 15:49
yep .all
Jamie
@jamiebuilds
Aug 25 2014 15:49
did they misname it?
Sam Saccone
@samccone
Aug 25 2014 15:49
nope
.all waits for all the promises to be resolved
before resolving
Jamie
@jamiebuilds
Aug 25 2014 15:49
but I need to map it...
Sam Saccone
@samccone
Aug 25 2014 15:49
you need to map clears...
Jamie
@jamiebuilds
Aug 25 2014 15:50
I don’t understand what you want me to do
write code not words :P
Sam Saccone
@samccone
Aug 25 2014 15:50
hahaha
var d = require("selenium-webdriver");

return this.findAll('input').then(function(els) {
  return d.Promise.map(els, function(el) {
    return el.clear();
  });
})
here @thejameskyle
sorry
Jamie
@jamiebuilds
Aug 25 2014 15:55
its Driver.promise for unknown reasons
another Q:
Sam Saccone
@samccone
Aug 25 2014 15:56
yep
Jamie
@jamiebuilds
Aug 25 2014 15:56
Are the this.(W/T)hen steps scoped to their file at all or are the all on the same scope?
Sam Saccone
@samccone
Aug 25 2014 15:56
all on the same step scope
Jamie
@jamiebuilds
Aug 25 2014 15:56
:/
Sam Saccone
@samccone
Aug 25 2014 15:56
why?
Jamie
@jamiebuilds
Aug 25 2014 15:57
I want a way to scope it...
Sam Saccone
@samccone
Aug 25 2014 15:57
you want the same words
to mean different things haha?
Jamie
@jamiebuilds
Aug 25 2014 15:57
I don’t want to have to keep specifying the part of the app I’m talking about in order to scope it in strings
Sam Saccone
@samccone
Aug 25 2014 15:58
can you give me an example?
Jamie
@jamiebuilds
Aug 25 2014 15:59
Feature: Foo
  Background:
    When I visit the foo index page
Feature: Bar
  Background:
    When I visit the bar index page

vs

Feature: Foo
  Background:
    When I visit the index page
Feature: Bar
  Background:
    When I visit the index page
Sam Saccone
@samccone
Aug 25 2014 16:01
yeah :|
that is cucumber
index page is prob a bad way to say it tho
when i view the color overview
when i view the book overview
Jamie
@jamiebuilds
Aug 25 2014 16:02
except I dont call it that anywhere...
Sam Saccone
@samccone
Aug 25 2014 16:02
well what does a user think of it as
Jamie
@jamiebuilds
Aug 25 2014 16:02
its not a dashboard… its an index page
Sam Saccone
@samccone
Aug 25 2014 16:02
to a programmer it is
Jamie
@jamiebuilds
Aug 25 2014 16:02
boo
Sam Saccone
@samccone
Aug 25 2014 16:02
but a human would never call it that
know what i mean?
Josh
@joshtombs
Aug 25 2014 16:03
sam != human
Jamie
@jamiebuilds
Aug 25 2014 16:03
I’m better than those other people
the point is we use a naming system as an organization, so everyone will call it the foo index page and everyone will know what we’re talking about. then the tests call it something else? a user isnt ever reading our tests
Sam Saccone
@samccone
Aug 25 2014 16:06
so 5 months from now
are you going to know what foo index is?
you will know what color overview means
because it is in human
that is the rational behind naming things something that your mom can understand
Jamie
@jamiebuilds
Aug 25 2014 16:07
I will always know what foo index is. so will the design team. so will the QA team. so will product owners
Sam Saccone
@samccone
Aug 25 2014 16:07
ok
then call it that
Jamie
@jamiebuilds
Aug 25 2014 16:07
lol
Sam Saccone
@samccone
Aug 25 2014 16:07
will new dev tom know?
will someone going back to fix something
in 2 years?
that is really what they are for
the value is in the long term readability
Jamie
@jamiebuilds
Aug 25 2014 16:08
He’ll have read the docs
Sam Saccone
@samccone
Aug 25 2014 16:08
docs get out of line with implementation
tests are pretty hard to get out of line
Jamie
@jamiebuilds
Aug 25 2014 16:08
docs aren’t implementation specific
naming systems will do that
Jamie
@jamiebuilds
Aug 25 2014 16:14
the point is...
I don’t want to write foo whatever and bar whatever everytime
and thats not possible
so okay
Sam Saccone
@samccone
Aug 25 2014 16:50
:crying_cat_face:
Jamie
@jamiebuilds
Aug 25 2014 17:41

@samccone can stuff like this be merged:

Scenario: Prompted while destroying a color
  When I destroy a color
  Then I should be warned

Scenario: Destroying a color
  When I destroy a color
  And I confirm the destruction
  Then the color should be gone

into

Scenario: Destroying a color
  When I destroy a color
  Then I should be warned
  When I confirm the destruction
  Then the color should be gone
Sam Saccone
@samccone
Aug 25 2014 17:42
yep
that next when
should be an and
Jamie
@jamiebuilds
Aug 25 2014 17:42
better yet can I nest them?
Scenario: Destroying a color
  When I destroy a color
  Then I should be warned

  Scenario:
    When I cancel the destruction
    Then I should stay on the show page

  Scenario:
    When I confirm the destruction
    Then the color should be gone
ahh okay
Sam Saccone
@samccone
Aug 25 2014 17:43
neg
Jamie
@jamiebuilds
Aug 25 2014 17:43
:(
Sam Saccone
@samccone
Aug 25 2014 17:43
that is what feature / background is for :)
Jamie
@jamiebuilds
Aug 25 2014 17:44
Cannnn that be nested?
Sam Saccone
@samccone
Aug 25 2014 17:44