2014-09-05 13:30:55 -04:00
|
|
|
class Spinach::Features::SnippetSearch < Spinach::FeatureSteps
|
|
|
|
include SharedAuthentication
|
|
|
|
include SharedPaths
|
|
|
|
include SharedSnippet
|
|
|
|
include SharedUser
|
|
|
|
include SharedSearch
|
|
|
|
|
|
|
|
step 'I search for "snippet" in snippet titles' do
|
2014-09-05 13:51:23 -04:00
|
|
|
search_snippet_titles 'snippet'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I search for "snippet private" in snippet titles' do
|
2014-09-05 13:51:23 -04:00
|
|
|
search_snippet_titles 'snippet private'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I search for "line seven" in snippet contents' do
|
2014-09-05 13:51:23 -04:00
|
|
|
search_snippet_contents 'line seven'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should see "line seven" in results' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content 'line seven'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should see "line four" in results' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content 'line four'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should see "line ten" in results' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content 'line ten'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should not see "line eleven" in results' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).not_to have_content 'line eleven'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should not see "line three" in results' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).not_to have_content 'line three'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I should see "Personal snippet one" in results' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content 'Personal snippet one'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I should see "Personal snippet private" in results' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content 'Personal snippet private'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I should not see "Personal snippet one" in results' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).not_to have_content 'Personal snippet one'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I should not see "Personal snippet private" in results' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).not_to have_content 'Personal snippet private'
|
2014-09-05 13:30:55 -04:00
|
|
|
end
|
|
|
|
end
|