diff --git a/features/context_list.feature b/features/context_list.feature index aad38e80..2e5d97cd 100644 --- a/features/context_list.feature +++ b/features/context_list.feature @@ -27,6 +27,8 @@ Feature: Manage the list of contexts Given I have a context called "@computer" And I have a hidden context called "@ipad" When I go to the contexts page + And I should see that the context container for active contexts is present + And I should see that the context container for hidden contexts is present When I delete the context "@computer" Then I should see that a context named "@computer" is not present And I should see that the context container for active contexts is not present diff --git a/features/step_definitions/context_list_steps.rb b/features/step_definitions/context_list_steps.rb index c0075867..9bf437ac 100644 --- a/features/step_definitions/context_list_steps.rb +++ b/features/step_definitions/context_list_steps.rb @@ -47,8 +47,11 @@ Then /^I should see that a context named "([^"]*)" is not present$/ do |context_ end Then /^I should see that the context container for (.*) contexts is not present$/ do |state| - present = selenium.is_element_present("list-contexts-#{state}'") - present.should_not be_true + selenium.is_visible("list-#{state}-contexts-container").should_not be_true +end + +Then /^I should see that the context container for (.*) contexts is present$/ do |state| + selenium.is_visible("list-#{state}-contexts-container").should be_true end Then /^I should see the context "([^"]*)" under "([^"]*)"$/ do |context_name, state|