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:
authorMarkus Koller <mkoller@gitlab.com>2019-08-30 12:49:14 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-08-30 12:49:14 +0300
commit1bccd36f04f1e1c4efe9155ea9037910c42a3749 (patch)
tree5fa93f57ef35c07ee4cd9c15480404d15f0c47b3 /spec/features/search/user_searches_for_commits_spec.rb
parentb76bc2762a245c61089fae486e61c9fd83d45f95 (diff)
Improve search result labels
- Use "results" instead of "blobs", "wiki blobs", "snippet blobs" - Use "comments" instead of "notes" - Use correct pluralization - Don't add "1 - 10 of" if there's only one page
Diffstat (limited to 'spec/features/search/user_searches_for_commits_spec.rb')
-rw-r--r--spec/features/search/user_searches_for_commits_spec.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/spec/features/search/user_searches_for_commits_spec.rb b/spec/features/search/user_searches_for_commits_spec.rb
index 81c299752ea..958f12d3b84 100644
--- a/spec/features/search/user_searches_for_commits_spec.rb
+++ b/spec/features/search/user_searches_for_commits_spec.rb
@@ -16,15 +16,13 @@ describe 'User searches for commits' do
context 'when searching by SHA' do
it 'finds a commit and redirects to its page' do
- fill_in('search', with: sha)
- click_button('Search')
+ submit_search(sha)
expect(page).to have_current_path(project_commit_path(project, sha))
end
it 'finds a commit in uppercase and redirects to its page' do
- fill_in('search', with: sha.upcase)
- click_button('Search')
+ submit_search(sha.upcase)
expect(page).to have_current_path(project_commit_path(project, sha))
end
@@ -34,16 +32,14 @@ describe 'User searches for commits' do
it 'finds a commit and holds on /search page' do
create_commit('Message referencing another sha: "deadbeef"', project, user, 'master')
- fill_in('search', with: 'deadbeef')
- click_button('Search')
+ submit_search('deadbeef')
expect(page).to have_current_path('/search', ignore_query: true)
end
it 'finds multiple commits' do
- fill_in('search', with: 'See merge request')
- click_button('Search')
- click_link('Commits')
+ submit_search('See merge request')
+ select_search_scope('Commits')
expect(page).to have_selector('.commit-row-description', count: 9)
end