mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
fix failing selenium scenarios because of starring changes
This commit is contained in:
parent
75a9bbe7f4
commit
30c578f93a
2 changed files with 7 additions and 7 deletions
|
|
@ -93,7 +93,7 @@ end
|
|||
Then /^the pattern "([^\"]*)" should be starred$/ do |pattern_name|
|
||||
pattern = @current_user.recurring_todos.find_by_description(pattern_name)
|
||||
pattern.should_not be_nil
|
||||
xpath = "//div[@id='recurring_todo_#{pattern.id}']//img[@class='starred_todo']"
|
||||
xpath = "//div[@id='recurring_todo_#{pattern.id}']//img[@class='todo_star starred']"
|
||||
response.should have_xpath(xpath)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -180,8 +180,8 @@ When /^I star the action "([^"]*)"$/ do |action_description|
|
|||
todo = @current_user.todos.find_by_description(action_description)
|
||||
todo.should_not be_nil
|
||||
|
||||
xpath_unstarred = "//div[@id='line_todo_#{todo.id}']//img[@class='unstarred_todo']"
|
||||
xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='starred_todo']"
|
||||
xpath_unstarred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star']"
|
||||
xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star starred']"
|
||||
|
||||
selenium.is_element_present(xpath_unstarred).should be_true
|
||||
|
||||
|
|
@ -197,8 +197,8 @@ When /^I unstar the action "([^"]*)"$/ do |action_description|
|
|||
todo = @current_user.todos.find_by_description(action_description)
|
||||
todo.should_not be_nil
|
||||
|
||||
xpath_unstarred = "//div[@id='line_todo_#{todo.id}']//img[@class='unstarred_todo']"
|
||||
xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='starred_todo']"
|
||||
xpath_unstarred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star']"
|
||||
xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star starred']"
|
||||
|
||||
selenium.is_element_present(xpath_starred).should be_true
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ Then /^I should see a starred "([^"]*)"$/ do |action_description|
|
|||
todo = @current_user.todos.find_by_description(action_description)
|
||||
todo.should_not be_nil
|
||||
|
||||
xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='starred_todo']"
|
||||
xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star starred']"
|
||||
|
||||
selenium.is_element_present(xpath_starred).should be_true
|
||||
end
|
||||
|
|
@ -224,7 +224,7 @@ Then /^I should see an unstarred "([^"]*)"$/ do |action_description|
|
|||
todo = @current_user.todos.find_by_description(action_description)
|
||||
todo.should_not be_nil
|
||||
|
||||
xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='unstarred_todo']"
|
||||
xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star']"
|
||||
|
||||
wait_for :timeout => 5 do
|
||||
selenium.is_element_present(xpath_starred)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue