mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-01 18:40:15 +01:00
fix #742. The tests were already there for some time
This commit is contained in:
parent
2f0bfbbf47
commit
033b4daf9a
2 changed files with 10 additions and 9 deletions
|
|
@ -42,14 +42,6 @@ When /^I add a new hidden context "([^"]*)"$/ do |context_name|
|
|||
submit_new_context_form
|
||||
end
|
||||
|
||||
Then /^context "([^"]*)" should be above context "([^"]*)"$/ do |context_high, context_low|
|
||||
high_id = @current_user.contexts.find_by_name(context_high).id
|
||||
low_id = @current_user.contexts.find_by_name(context_low).id
|
||||
high_pos = selenium.get_element_position_top("//div[@id='context_#{high_id}']").to_i
|
||||
low_pos = selenium.get_element_position_top("//div[@id='context_#{low_id}']").to_i
|
||||
(high_pos < low_pos).should be_true
|
||||
end
|
||||
|
||||
When /^I drag context "([^"]*)" below context "([^"]*)"$/ do |context_drag, context_drop|
|
||||
drag_id = @current_user.contexts.find_by_name(context_drag).id
|
||||
drop_id = @current_user.contexts.find_by_name(context_drop).id
|
||||
|
|
@ -67,6 +59,14 @@ When /^I drag context "([^"]*)" below context "([^"]*)"$/ do |context_drag, cont
|
|||
selenium.mouse_up_at(drop_context_container_xpath,coord_string)
|
||||
end
|
||||
|
||||
Then /^context "([^"]*)" should be above context "([^"]*)"$/ do |context_high, context_low|
|
||||
high_id = @current_user.contexts.find_by_name(context_high).id
|
||||
low_id = @current_user.contexts.find_by_name(context_low).id
|
||||
high_pos = selenium.get_element_position_top("//div[@id='context_#{high_id}']").to_i
|
||||
low_pos = selenium.get_element_position_top("//div[@id='context_#{low_id}']").to_i
|
||||
(high_pos < low_pos).should be_true
|
||||
end
|
||||
|
||||
Then /^I should see that a context named "([^"]*)" is not present$/ do |context_name|
|
||||
Then "I should not see \"#{context_name}\""
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue