get all non-wip scenarios running again for context and project

This commit is contained in:
Reinier Balt 2010-11-09 23:12:21 +01:00
parent 0e81706fee
commit d1b35090ab
7 changed files with 41 additions and 66 deletions

View file

@ -13,7 +13,6 @@ Given /^there exists a context called "([^"]*)" for user "([^"]*)"$/ do |context
Given "there exists an active context called \"#{context_name}\" for user \"#{login}\""
end
Given /^there exists a hidden context called "([^"]*)" for user "([^"]*)"$/ do |context_name, login|
user = User.find_by_login(login)
user.should_not be_nil
@ -65,46 +64,6 @@ When /^I edit the context name in place to be "([^\"]*)"$/ do |new_context_name|
click_button "OK"
end
When /^I delete the context "([^\"]*)"$/ do |context_name|
context = @current_user.contexts.find_by_name(context_name)
context.should_not be_nil
click_link "delete_context_#{context.id}"
selenium.get_confirmation.should == "Are you sure that you want to delete the context '#{context_name}'? Be aware that this will also delete all (repeating) actions in this context!"
wait_for do
!selenium.is_element_present("delete_context_#{context.id}")
end
end
When /^I edit the context to rename it to "([^\"]*)"$/ do |new_name|
click_link "edit_context_#{@context.id}"
wait_for do
selenium.is_element_present("submit_context_#{@context.id}")
end
fill_in "context_name", :with => new_name
selenium.click "submit_context_#{@context.id}",
:wait_for => :text,
:element => "flash",
:text => "Context saved"
wait_for do
selenium.is_element_present("edit_context_#{@context.id}")
end
end
When /^I add a new context "([^"]*)"$/ do |context_name|
fill_in "context[name]", :with => context_name
submit_new_context_form
end
When /^I add a new hidden context "([^"]*)"$/ do |context_name|
fill_in "context[name]", :with => context_name
check "context_hide"
submit_new_context_form
end
Then /^I should see the context name is "([^\"]*)"$/ do |context_name|
Then "I should see \"#{context_name}\""
end