mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 16:28:50 +01:00
add tests for toggling visibility of collapsed contexts
This commit is contained in:
parent
30c2fb8b82
commit
cdff38995c
5 changed files with 127 additions and 5 deletions
|
|
@ -1,3 +1,17 @@
|
|||
When /^I collapse the context container of "([^"]*)"$/ do |context_name|
|
||||
context = @current_user.contexts.find_by_name(context_name)
|
||||
context.should_not be_nil
|
||||
|
||||
xpath = "//a[@id='toggle_c#{context.id}']"
|
||||
selenium.is_visible(xpath).should be_true
|
||||
|
||||
selenium.click(xpath)
|
||||
end
|
||||
|
||||
When /^I toggle all collapsed context containers$/ do
|
||||
click_link 'Toggle collapsed contexts'
|
||||
end
|
||||
|
||||
####### Context #######
|
||||
|
||||
Then /^I should not see the context "([^"]*)"$/ do |context_name|
|
||||
|
|
@ -17,6 +31,10 @@ Then /^I should not see the container for context "([^"]*)"$/ do |context_name|
|
|||
Then "I should not see the context \"#{context_name}\""
|
||||
end
|
||||
|
||||
Then /^I should not see the context container for "([^"]*)"$/ do |context_name|
|
||||
Then "I should not see the context \"#{context_name}\""
|
||||
end
|
||||
|
||||
Then /^the container for the context "([^"]*)" should not be visible$/ do |context_name|
|
||||
Then "I should not see the context \"#{context_name}\""
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue