02:52
mrchrisadams joined
05:22
ashley_moran joined
07:07
xanderbeedle joined
07:08
<xanderbeedle>
Hi everyone, simple question - what's a good way to run an 'edit page' feature?
07:08
<xanderbeedle>
I'm checking that I'm on the show page, and following the edit link
07:09
<xanderbeedle>
but then I get involved with various IDs and things like that
07:09
<xanderbeedle>
and I'm not sure how to integrate that in
07:13
<ashley_moran>
xanderbeedle: what do you mean by "various ids"?
07:13
<xanderbeedle>
Well, i can't just go to an edit page, to create a path that works I need to specify a page id
07:14
<xanderbeedle>
and if that page is being created as a 'Given' step, can I pass back the ID from there?
07:14
<ashley_moran>
xanderbeedle: i see what you mean now, there are various options
07:14
<xanderbeedle>
Do you see what I mean? When dealing with specific items, the steps need to pass information around to each other
07:14
<xanderbeedle>
or am I doing that wrong?
07:15
<ashley_moran>
you can name the item in such a way that you can navigate back to it, eg "Given a blog post 'my post'"...
07:15
<ashley_moran>
you could do "When I visit the post 'my post'"
07:15
<ashley_moran>
and have the step click links
07:16
<ashley_moran>
another way would be to scrape the url of the created resource and store it in an instance variable in a step
07:16
<ashley_moran>
the Given step could eg store `@post_urls['my post'] = ...`
07:17
<ashley_moran>
or store the id
07:17
<ashley_moran>
or you could access the database and use routing to generate the route
07:17
<xanderbeedle>
may try that
07:17
<xanderbeedle>
is a pastie of my scenario, to explain with some code
07:18
<ashley_moran>
i don't understand your comment there though
07:18
<ashley_moran>
first you do...
07:18
<ashley_moran>
When I follow "Edit this question"
07:18
<ashley_moran>
but you say "This is where I am unsure how to navigate properly to the page?" after you've navigated there
07:18
<xanderbeedle>
Not navigate sorry, but check that I am on that correct page
07:21
<ashley_moran>
do you mean in the case where you want to extend it to "Then I should be on the question_edit page for question 'q1'" ?
07:21
<ashley_moran>
i usually do that with content, rather than URLs, eg check for "Edit question" and "q1"
07:21
<xanderbeedle>
fair enough, thanks
07:22
<xanderbeedle>
just trying to work out the 'golden path'
11:32
ashley_moran joined
12:33
xanderbeedle joined
12:33
<xanderbeedle>
Hi again
12:34
<xanderbeedle>
While I understand exceptions should obviously be handled away from the user, how do you catch them in cucumber?
12:42
<xanderbeedle>
the problem seems to be a case of the exception being generated 1 step before my 'should raise_error' check
12:42
<xanderbeedle>
is there a good way to handle this?
12:55
<dgs>
can you catch it in the step it's being raised in ?
14:09
<mef_>
any way I can run cucumber in some sort of verbose mode? it seems to be freezing while connecting to spork and I'm not sure why
14:10
<mef_>
and I have to kill -9 it :/
16:51
anathematic_ joined
20:53
superguenter joined
21:07
superguenter joined
21:12
superguenter joined