diff options
Diffstat (limited to 'features/steps/shared')
-rw-r--r-- | features/steps/shared/paths.rb | 6 | ||||
-rw-r--r-- | features/steps/shared/project_tab.rb | 2 | ||||
-rw-r--r-- | features/steps/shared/search.rb | 11 | ||||
-rw-r--r-- | features/steps/shared/snippet.rb | 23 |
4 files changed, 42 insertions, 0 deletions
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 0d06383509f..276947dc060 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -269,6 +269,12 @@ module SharedPaths visit project_tree_path(@project, "6d39438") end + step 'I visit project source page for' \ + ' "6d394385cf567f80a8fd85055db1ab4c5295806f"' do + visit project_tree_path(@project, + '6d394385cf567f80a8fd85055db1ab4c5295806f') + end + step 'I visit project tags page' do visit project_tags_path(@project) end diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb index 498a173e9a5..6aa4f1b20df 100644 --- a/features/steps/shared/project_tab.rb +++ b/features/steps/shared/project_tab.rb @@ -1,3 +1,5 @@ +require_relative 'active_tab' + module SharedProjectTab include Spinach::DSL include SharedActiveTab diff --git a/features/steps/shared/search.rb b/features/steps/shared/search.rb new file mode 100644 index 00000000000..6c3d601763d --- /dev/null +++ b/features/steps/shared/search.rb @@ -0,0 +1,11 @@ +module SharedSearch + include Spinach::DSL + + def search_snippet_contents(query) + visit "/search?search=#{URI::encode(query)}&snippets=true&scope=snippet_blobs" + end + + def search_snippet_titles(query) + visit "/search?search=#{URI::encode(query)}&snippets=true&scope=snippet_titles" + end +end diff --git a/features/steps/shared/snippet.rb b/features/steps/shared/snippet.rb index 543e43196a5..c64299ae6f3 100644 --- a/features/steps/shared/snippet.rb +++ b/features/steps/shared/snippet.rb @@ -18,4 +18,27 @@ module SharedSnippet private: true, author: current_user) end + And 'I have a public many lined snippet' do + create(:personal_snippet, + title: 'Many lined snippet', + content: <<-END.gsub(/^\s+\|/, ''), + |line one + |line two + |line three + |line four + |line five + |line six + |line seven + |line eight + |line nine + |line ten + |line eleven + |line twelve + |line thirteen + |line fourteen + END + file_name: 'many_lined_snippet.rb', + private: true, + author: current_user) + end end |