mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-06 01:08:50 +01:00
fix failing test and finish all wip scenarios
Signed-off-by: Reinier Balt <lrbalt@gmail.com>
This commit is contained in:
parent
f05826d07a
commit
3faac2514d
10 changed files with 95 additions and 17 deletions
|
|
@ -44,6 +44,23 @@ Then /^I should see "([^"]*)" in the context container for "([^"]*)"$/ do |todo_
|
|||
selenium.is_visible(xpath).should be_true
|
||||
end
|
||||
|
||||
Then /^I should not see "([^"]*)" in the context container for "([^"]*)"$/ do |todo_description, context_name|
|
||||
context = @current_user.contexts.find_by_name(context_name)
|
||||
context.should_not be_nil
|
||||
todo = @current_user.todos.find_by_description(todo_description)
|
||||
todo.should_not be_nil
|
||||
|
||||
xpath = "xpath=//div[@id=\"c#{context.id}\"]//div[@id='line_todo_#{todo.id}']"
|
||||
|
||||
if selenium.is_element_present(xpath)
|
||||
# give jquery some time to finish
|
||||
wait_for :timeout_in_seconds => 5 do
|
||||
!selenium.is_visible(xpath)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Then /^I should see "([^"]*)" in project container for "([^"]*)"$/ do |todo_description, project_name|
|
||||
todo = @current_user.todos.find_by_description(todo_description)
|
||||
todo.should_not be_nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue