mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-09 02:38:51 +01:00
start fiingx failing cucumber scenario's and some small fixes
new capybara introduces some failing scenario's
This commit is contained in:
parent
c8d2db6fc3
commit
da2bee2e53
10 changed files with 42 additions and 19 deletions
|
|
@ -86,7 +86,9 @@ When /^I edit the description of "([^"]*)" to "([^"]*)"$/ do |action_description
|
|||
todo.should_not be_nil
|
||||
|
||||
open_edit_form_for(todo)
|
||||
fill_in "todo_description", :with => new_description
|
||||
within "form.edit_todo_form" do
|
||||
fill_in "todo_description", :with => new_description
|
||||
end
|
||||
submit_edit_todo_form(todo)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,26 @@
|
|||
module TracksStepHelper
|
||||
|
||||
def wait_until(timeout = 5)
|
||||
timeout(timeout) { yield }
|
||||
end
|
||||
|
||||
def timeout(seconds = 1, error_message = nil, &block)
|
||||
start_time = Time.now
|
||||
|
||||
result = nil
|
||||
|
||||
until result
|
||||
return result if result = yield
|
||||
|
||||
delay = seconds - (Time.now - start_time)
|
||||
if delay <= 0
|
||||
raise TimeoutError, error_message || "timed out"
|
||||
end
|
||||
|
||||
sleep(0.05)
|
||||
end
|
||||
end
|
||||
|
||||
def open_edit_form_for(todo)
|
||||
within "div#line_todo_#{todo.id}" do
|
||||
find("a#icon_edit_todo_#{todo.id}").click
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Feature: Show done
|
||||
In order to see what I have completed
|
||||
As an user
|
||||
I want see my done todos
|
||||
I want to see my done todos
|
||||
|
||||
Background:
|
||||
Given the following user record
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue