migrate feedlist, user password, loggin in, manage users, mobile_* and notes manage

This commit is contained in:
Reinier Balt 2012-02-21 20:18:26 +01:00
parent d8b5c7d0d2
commit d528a87cee
10 changed files with 88 additions and 63 deletions

View file

@ -1,37 +1,29 @@
Then /^I should see a message that you need a context to get feeds for contexts$/ do
Then "I should see \"There needs to be at least one context before you can request a feed\""
step "I should see \"There needs to be at least one context before you can request a feed\""
end
Then /^I should see a message that you need a project to get feeds for projects$/ do
Then "I should see \"There needs to be at least one project before you can request a feed\""
step "I should see \"There needs to be at least one project before you can request a feed\""
end
Then /^I should see feeds for projects$/ do
within 'select[id="feed-projects"]' do |scope|
scope.should have_selector("option[value=\"#{@current_user.projects.first.id}\"]")
end
page.should have_css("select#feed-projects option[value='#{@current_user.projects.first.id}']")
end
Then /^I should see feeds for contexts$/ do
within 'select[id="feed-contexts"]' do |scope|
scope.should have_selector("option[value=\"#{@current_user.contexts.first.id}\"]")
end
page.should have_css("select#feed-contexts option[value='#{@current_user.contexts.first.id}']")
end
Then /^I should see "([^"]*)" as the selected project$/ do |project_name|
within 'select[id="feed-projects"]' do |scope|
scope.should have_selector("option[selected=\"selected\"]", :content => project_name)
end
page.should have_css 'select#feed-projects option[selected="selected"]'
end
Then /^I should see "([^"]*)" as the selected context$/ do |context_name|
within 'select[id="feed-contexts"]' do |scope|
scope.should have_selector("option[selected=\"selected\"]", :content => context_name)
end
page.should have_css 'select#feed-contexts option[selected="selected"]'
end
Then /^I should see feeds for "([^"]*)" in list of "([^"]*)"$/ do |name, list_type|
wait_for_ajax
xpath= "//div[@id='feeds-for-#{list_type}']//strong"
name.should == response.selenium.get_text("xpath=#{xpath}")
name.should == find(:xpath, xpath).text
end