mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-04 23:11:47 +01:00
finish drag and drop for context list. Works even for webkit :-)
This commit is contained in:
parent
4a8fdbabc2
commit
c8ab797924
5 changed files with 14 additions and 29 deletions
|
|
@ -19,7 +19,7 @@ require 'capybara/session'
|
|||
# BUG in this version of cucumber/capybara: require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links with onclick javascript handlers without using @culerity or @javascript
|
||||
|
||||
Capybara.default_wait_time = 5
|
||||
Capybara.javascript_driver = :selenium
|
||||
Capybara.javascript_driver = :webkit
|
||||
|
||||
if Capybara.javascript_driver == :webkit
|
||||
require 'capybara/webkit'
|
||||
|
|
|
|||
|
|
@ -82,6 +82,12 @@ module TracksStepHelper
|
|||
end
|
||||
end
|
||||
|
||||
def context_list_find_index(context_name)
|
||||
div_id = "context_#{@current_user.contexts.find_by_name(context_name).id}"
|
||||
contexts = page.all("div.context").map { |x| x[:id] }
|
||||
return contexts.find_index(div_id)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
World(TracksStepHelper)
|
||||
Loading…
Add table
Add a link
Reference in a new issue