diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 21:09:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 21:09:39 +0300 |
commit | 00fa950a34b1c94617110b150b8b2517d5241249 (patch) | |
tree | 8f2d8683879079da8f520f7867ebd49b8beaadef /spec/features | |
parent | c36152ff8c41fad2f413f253eb7ac5c927e47c56 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/projects/snippets/create_snippet_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/snippets/search_snippets_spec.rb | 41 |
2 files changed, 2 insertions, 41 deletions
diff --git a/spec/features/projects/snippets/create_snippet_spec.rb b/spec/features/projects/snippets/create_snippet_spec.rb index 28d24073b79..b55a42e07a9 100644 --- a/spec/features/projects/snippets/create_snippet_spec.rb +++ b/spec/features/projects/snippets/create_snippet_spec.rb @@ -32,6 +32,8 @@ shared_examples_for 'snippet editor' do visit project_snippets_path(project) + # Wait for the SVG to ensure the button location doesn't shift + within('.empty-state') { find('img.js-lazy-loaded') } click_on('New snippet') wait_for_requests end diff --git a/spec/features/snippets/search_snippets_spec.rb b/spec/features/snippets/search_snippets_spec.rb index dce790e5708..691716d3576 100644 --- a/spec/features/snippets/search_snippets_spec.rb +++ b/spec/features/snippets/search_snippets_spec.rb @@ -16,45 +16,4 @@ describe 'Search Snippets' do expect(page).to have_link(public_snippet.title) expect(page).to have_link(private_snippet.title) end - - it 'User searches for snippet contents' do - create(:personal_snippet, - :public, - title: 'Many lined snippet', - content: <<-CONTENT.strip_heredoc - |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 - CONTENT - ) - - sign_in create(:user) - visit dashboard_snippets_path - submit_search('line seven') - - expect(page).to have_content('line seven') - - # 3 lines before the matched line should be visible - expect(page).to have_content('line six') - expect(page).to have_content('line five') - expect(page).to have_content('line four') - expect(page).not_to have_content('line three') - - # 3 lines after the matched line should be visible - expect(page).to have_content('line eight') - expect(page).to have_content('line nine') - expect(page).to have_content('line ten') - expect(page).not_to have_content('line eleven') - end end |