mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
Fix cucumber drag-and-drop failures
This commit is contained in:
parent
9419e94a53
commit
24b16ea8dd
2 changed files with 3 additions and 5 deletions
|
|
@ -10,8 +10,8 @@ end
|
|||
When /^I drag "(.*)" to "(.*)"$/ do |dragged, target|
|
||||
drag_id = Todo.where(:description => dragged).first.id
|
||||
drop_id = Todo.where(:description => target).first.id
|
||||
drag_elem = page.find(:xpath, "//div[@id='line_todo_#{drag_id}']//img[@class='grip']")
|
||||
drop_elem = page.find(:xpath, "//div[@id='line_todo_#{drop_id}']")
|
||||
drag_elem = page.find("div#line_todo_#{drag_id} img.grip")
|
||||
drop_elem = page.find("div#line_todo_#{drop_id}")
|
||||
|
||||
drag_elem.drag_to(drop_elem)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -75,9 +75,7 @@ end
|
|||
Then /^I should see an active todo "([^"]*)"$/ do |todo_description|
|
||||
todo = @current_user.todos.where(:description => todo_description).first
|
||||
expect(todo).to_not be_nil
|
||||
|
||||
xpath = "//div[@id='line_todo_#{todo.id}']/img[@class='grip']"
|
||||
expect(page).to have_xpath(xpath, :visible=>true)
|
||||
expect(page).to have_css("div#line_todo_#{todo.id} img.grip", :visible=>true)
|
||||
end
|
||||
|
||||
Then /^the number of actions should be (\d+)$/ do |count|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue