2010-11-27 17:12:09 +01:00
|
|
|
Then /^I should see a message that you need a context to get feeds for contexts$/ do
|
2012-02-21 20:18:26 +01:00
|
|
|
step "I should see \"There needs to be at least one context before you can request a feed\""
|
2010-11-27 17:12:09 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Then /^I should see a message that you need a project to get feeds for projects$/ do
|
2012-02-21 20:18:26 +01:00
|
|
|
step "I should see \"There needs to be at least one project before you can request a feed\""
|
2010-11-27 17:12:09 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Then /^I should see feeds for projects$/ do
|
2014-05-16 15:42:03 -04:00
|
|
|
expect(page).to have_css("select#feed-projects option[value='#{@current_user.projects.first.id}']")
|
2010-11-27 17:12:09 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Then /^I should see feeds for contexts$/ do
|
2014-05-16 15:42:03 -04:00
|
|
|
expect(page).to have_css("select#feed-contexts option[value='#{@current_user.contexts.first.id}']")
|
2010-11-27 17:12:09 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Then /^I should see "([^"]*)" as the selected project$/ do |project_name|
|
2014-05-16 15:42:03 -04:00
|
|
|
expect(page).to have_css('select#feed-projects option[selected="selected"]')
|
2010-11-27 17:12:09 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Then /^I should see "([^"]*)" as the selected context$/ do |context_name|
|
2014-05-16 15:42:03 -04:00
|
|
|
expect(page).to have_css('select#feed-contexts option[selected="selected"]')
|
2010-11-27 17:12:09 +01:00
|
|
|
end
|
2011-01-19 10:13:56 +01:00
|
|
|
|
|
|
|
|
Then /^I should see feeds for "([^"]*)" in list of "([^"]*)"$/ do |name, list_type|
|
2011-03-08 23:28:48 +01:00
|
|
|
wait_for_ajax
|
2011-01-19 10:13:56 +01:00
|
|
|
xpath= "//div[@id='feeds-for-#{list_type}']//strong"
|
2014-05-16 15:42:03 -04:00
|
|
|
expect(name).to eq(find(:xpath, xpath).text)
|
2011-01-19 10:13:56 +01:00
|
|
|
end
|