BigW Consortium Gitlab

snippet_search.rb 1.47 KB
Newer Older
1 2 3 4 5 6 7 8
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
Charles Bushong committed
9
    search_snippet_titles 'snippet'
10 11 12
  end

  step 'I search for "snippet private" in snippet titles' do
Charles Bushong committed
13
    search_snippet_titles 'snippet private'
14 15 16
  end

  step 'I search for "line seven" in snippet contents' do
Charles Bushong committed
17
    search_snippet_contents 'line seven'
18 19 20
  end

  step 'I should see "line seven" in results' do
Charles Bushong committed
21
    page.should have_content 'line seven'
22 23 24
  end

  step 'I should see "line four" in results' do
Charles Bushong committed
25
    page.should have_content 'line four'
26 27 28
  end

  step 'I should see "line ten" in results' do
Charles Bushong committed
29
    page.should have_content 'line ten'
30 31 32
  end

  step 'I should not see "line eleven" in results' do
Charles Bushong committed
33
    page.should_not have_content 'line eleven'
34 35 36
  end

  step 'I should not see "line three" in results' do
Charles Bushong committed
37
    page.should_not have_content 'line three'
38 39
  end

40
  step 'I should see "Personal snippet one" in results' do
Charles Bushong committed
41
    page.should have_content 'Personal snippet one'
42 43
  end

44
  step 'I should see "Personal snippet private" in results' do
Charles Bushong committed
45
    page.should have_content 'Personal snippet private'
46 47
  end

48
  step 'I should not see "Personal snippet one" in results' do
Charles Bushong committed
49
    page.should_not have_content 'Personal snippet one'
50 51
  end

52
  step 'I should not see "Personal snippet private" in results' do
Charles Bushong committed
53
    page.should_not have_content 'Personal snippet private'
54 55 56
  end

end