Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-03-01 22:57:10 +0300
committerRobert Speicher <robert@gitlab.com>2016-03-01 22:57:10 +0300
commit6aa50165b0acc355925e271f07ef8e87291e0232 (patch)
treee88c0c098803027479b3e0c56e4877db42daa28d /features
parentb8f8a55b8d76f5dfcb99f09159ca22e8124cdae4 (diff)
parent4c8721b25abf460b309bbe636ecf559e4a9a339f (diff)
Merge branch 'logged-out-search' into 'master'
Logged out search Fixes #13676 See merge request !3045
Diffstat (limited to 'features')
-rw-r--r--features/search.feature22
-rw-r--r--features/steps/search.rb9
2 files changed, 31 insertions, 0 deletions
diff --git a/features/search.feature b/features/search.feature
index a9234c1a611..3cd52810e59 100644
--- a/features/search.feature
+++ b/features/search.feature
@@ -65,3 +65,25 @@ Feature: Search
And I search for "Wiki content"
And I click "Wiki" link
Then I should see "test_wiki" link in the search results
+
+ Scenario: I logout and should see project I am looking for
+ Given project "Shop" is public
+ And I logout
+ And I search for "Sho"
+ Then I should see "Shop" project link
+
+ Scenario: I logout and should see issues I am looking for
+ Given project "Shop" is public
+ And I logout
+ And project has issues
+ When I search for "Foo"
+ And I click "Issues" link
+ Then I should see "Foo" link in the search results
+ And I should not see "Bar" link in the search results
+
+ Scenario: I logout and should see project code I am looking for
+ Given project "Shop" is public
+ And I logout
+ When I visit project "Shop" page
+ And I search for "rspec" on project page
+ Then I should see code results for project "Shop"
diff --git a/features/steps/search.rb b/features/steps/search.rb
index 79273cbad9a..48ea3fa3876 100644
--- a/features/steps/search.rb
+++ b/features/steps/search.rb
@@ -18,6 +18,11 @@ class Spinach::Features::Search < Spinach::FeatureSteps
click_button "Search"
end
+ step 'I search for "rspec" on project page' do
+ fill_in "search", with: "rspec"
+ click_button "Go"
+ end
+
step 'I search for "Wiki content"' do
fill_in "dashboard_search", with: "content"
click_button "Search"
@@ -103,4 +108,8 @@ class Spinach::Features::Search < Spinach::FeatureSteps
@wiki = ::ProjectWiki.new(project, current_user)
@wiki.create_page("test_wiki", "Some Wiki content", :markdown, "first commit")
end
+
+ step 'project "Shop" is public' do
+ project.update_attributes(visibility_level: Project::PUBLIC)
+ end
end