mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-01 23:08:49 +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
|
|
@ -21,7 +21,7 @@ Feature: Manage the list of contexts
|
|||
And I should see "@boss"
|
||||
And the badge should show 3
|
||||
|
||||
Scenario: Clicking on a project takes me to the context page
|
||||
Scenario: Clicking on a context takes me to the context page
|
||||
Given I have a context called "@computer"
|
||||
When I go to the contexts page
|
||||
And I follow "@computer"
|
||||
|
|
@ -114,3 +114,4 @@ Feature: Manage the list of contexts
|
|||
Then the new context form should not be visible
|
||||
When I follow "Create a new context"
|
||||
Then the new context form should be visible
|
||||
|
||||
|
|
|
|||
|
|
@ -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