summaryrefslogtreecommitdiff
path: root/spec/features/search_spec.rb
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2016-11-07 20:36:58 +0200
committerValery Sizov <valery@gitlab.com>2016-11-08 12:03:23 +0200
commitebc44befdc773b39a171d38dc13c38cd6630828a (patch)
treeb52776fb22c732bafaf89e280a072118be2374b9 /spec/features/search_spec.rb
parent6be0c160d346c67967e541a76b6fbf6fc1ba2456 (diff)
downloadgitlab-ce-ebc44befdc773b39a171d38dc13c38cd6630828a.tar.gz
Fix broken commits search24255-search-fix
Diffstat (limited to 'spec/features/search_spec.rb')
-rw-r--r--spec/features/search_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/features/search_spec.rb b/spec/features/search_spec.rb
index 1806200c82c..caecd027aaa 100644
--- a/spec/features/search_spec.rb
+++ b/spec/features/search_spec.rb
@@ -100,6 +100,32 @@ describe "Search", feature: true do
expect(page).to have_link(snippet.title)
end
+
+ it 'finds a commit' do
+ visit namespace_project_path(project.namespace, project)
+
+ page.within '.search' do
+ fill_in 'search', with: 'add'
+ click_button 'Go'
+ end
+
+ click_link "Commits"
+
+ expect(page).to have_selector('.commit-row-description')
+ end
+
+ it 'finds a code' do
+ visit namespace_project_path(project.namespace, project)
+
+ page.within '.search' do
+ fill_in 'search', with: 'def'
+ click_button 'Go'
+ end
+
+ click_link "Code"
+
+ expect(page).to have_selector('.file-content .code')
+ end
end
describe 'Right header search field', feature: true do