culerity icon indicating copy to clipboard operation
culerity copied to clipboard

step 'When I follow "[link]"' finds wrong link, with celerity -v=0.7.7 and above

Open bratke opened this issue 15 years ago • 4 comments

background: -culerity -v=0.2.10 -jruby -v=1.5.0 -ruby -v=ruby 1.8.7 (2009-06-12 patchlevel 174) -rails -v=2.3.5

behaviour: -the step does not fail it just finds wrong link -if I add a "puts _link.absolute_url" to the step the problem becomes obvious

workaround: -using celerity -v=0.7.6

is somebody able to reproduce this?

Regards

bratke avatar May 29 '10 13:05 bratke

can you enlighten me on what happened when "the problem became obvious"?

langalex avatar May 29 '10 13:05 langalex

Scenario: Check in Given I am logged in as "guenter" And I am on the page of location "location1" When I follow "Check-In" Then I should see "eingecheckt"

'When I follow "Check-In"' runs successfully in both cases, 'Then I should see "eingecheckt" fails if using celerity -v=0.7.7 and above

http://de.culerity/locations/location1_street_1_berlin/check_in is the output of "puts _link.absolute_url" in case -v=0.7.6, which triggers the correct action

http://de.culerity/users/guenter/home is the output of "puts _link.absolute_url" in case -v=0.7.9, which triggers the wrong action -> the next step fails

bratke avatar May 29 '10 13:05 bratke

ok, and now the html/js. are you using any javascript to manipulate that link?

langalex avatar May 29 '10 15:05 langalex

in detail:

the show.html of locations-controller gets page cached

somewhere in it there is a div class="location_action_fields_right"> /div>

and js-tag which looks like this: <% javascript_tag do %> $.getScript('<%= user_info_location_path(@location) %>'); <% end %>

this triggers the user_info(.rjs) -action which loads the check-in-link dynamically

page.replace_html '.location_action_fields_right', :partial => 'location_checkin_button'

it does look like a button, thatswhy it is not named link :)

but i also got this effect in another controller where no page-caching is used.

bratke avatar May 29 '10 17:05 bratke