diff options
author | the-undefined <joe@joejames.io> | 2016-11-15 10:10:43 +0300 |
---|---|---|
committer | the-undefined <joe@joejames.io> | 2016-11-16 09:52:43 +0300 |
commit | dbf5c8abfe44ce8bf4a9517a8acead961edb3e3e (patch) | |
tree | 039f405d4c0364a954b81a299b0e30184ee07623 /features/steps | |
parent | f27f9803833f72d7f62534c195539dcdef2e3ccd (diff) |
Move 'Search Snippets' Spinach feature to Rspec
This commit moves the `search_snippets.feature` Spinach test to a
Rspec feature, as part of deprecating the Spinach test suite.
- Remove Spinach discover snippets feature and steps
- Remove unused `SharedSearch` module
- Add Rspec feature scenarios
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/shared/search.rb | 11 | ||||
-rw-r--r-- | features/steps/snippet_search.rb | 55 |
2 files changed, 0 insertions, 66 deletions
diff --git a/features/steps/shared/search.rb b/features/steps/shared/search.rb deleted file mode 100644 index 6c3d601763d..00000000000 --- a/features/steps/shared/search.rb +++ /dev/null @@ -1,11 +0,0 @@ -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/snippet_search.rb b/features/steps/snippet_search.rb deleted file mode 100644 index 32e29ffad1e..00000000000 --- a/features/steps/snippet_search.rb +++ /dev/null @@ -1,55 +0,0 @@ -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 - search_snippet_titles 'snippet' - end - - step 'I search for "snippet private" in snippet titles' do - search_snippet_titles 'snippet private' - end - - step 'I search for "line seven" in snippet contents' do - search_snippet_contents 'line seven' - end - - step 'I should see "line seven" in results' do - expect(page).to have_content 'line seven' - end - - step 'I should see "line four" in results' do - expect(page).to have_content 'line four' - end - - step 'I should see "line ten" in results' do - expect(page).to have_content 'line ten' - end - - step 'I should not see "line eleven" in results' do - expect(page).not_to have_content 'line eleven' - end - - step 'I should not see "line three" in results' do - expect(page).not_to have_content 'line three' - end - - step 'I should see "Personal snippet one" in results' do - expect(page).to have_content 'Personal snippet one' - end - - step 'I should see "Personal snippet private" in results' do - expect(page).to have_content 'Personal snippet private' - end - - step 'I should not see "Personal snippet one" in results' do - expect(page).not_to have_content 'Personal snippet one' - end - - step 'I should not see "Personal snippet private" in results' do - expect(page).not_to have_content 'Personal snippet private' - end -end |