diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2019-02-22 12:12:36 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-02-22 12:12:36 +0000 |
commit | 220cb4c3a73022d5fccd2f3cbb180bc87fe42512 (patch) | |
tree | 2948682b2063339ca820861cff82eec1e31404f6 /spec/features/dashboard/snippets_spec.rb | |
parent | cafc4943e04d5b342cbfa3d056d9359da0ea5c66 (diff) | |
download | gitlab-ce-220cb4c3a73022d5fccd2f3cbb180bc87fe42512.tar.gz |
Improve snippets empty state
Diffstat (limited to 'spec/features/dashboard/snippets_spec.rb')
-rw-r--r-- | spec/features/dashboard/snippets_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/features/dashboard/snippets_spec.rb b/spec/features/dashboard/snippets_spec.rb index fb4263d74c4..0e248c8732d 100644 --- a/spec/features/dashboard/snippets_spec.rb +++ b/spec/features/dashboard/snippets_spec.rb @@ -13,6 +13,21 @@ describe 'Dashboard snippets' do it_behaves_like 'paginated snippets' end + context 'when there are no project snippets', :js do + let(:project) { create(:project, :public) } + before do + sign_in(project.owner) + visit dashboard_snippets_path + end + + it 'shows the empty state when there are no snippets' do + element = page.find('.row.empty-state') + + expect(element).to have_content("Snippets are small pieces of code or notes that you want to keep.") + expect(element.find('.svg-content img')['src']).to have_content('illustrations/snippets_empty') + end + end + context 'filtering by visibility' do let(:user) { create(:user) } let!(:snippets) do |