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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-05 12:08:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-05 12:08:43 +0300
commit26384c9a61da9922b8fa4b8351d4e42d51661b37 (patch)
treeef3decbed644db3c97dcdbb5b71d4ade77f3155d /spec/support/shared_examples/features
parent79cbe31b18159ea394c6f6e3027c1dc69bdabb75 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/features')
-rw-r--r--spec/support/shared_examples/features/snippets_shared_examples.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/support/shared_examples/features/snippets_shared_examples.rb b/spec/support/shared_examples/features/snippets_shared_examples.rb
index 5c35617bd36..1c8a9714bdf 100644
--- a/spec/support/shared_examples/features/snippets_shared_examples.rb
+++ b/spec/support/shared_examples/features/snippets_shared_examples.rb
@@ -18,3 +18,35 @@ RSpec.shared_examples 'paginated snippets' do |remote: false|
end
end
end
+
+RSpec.shared_examples 'tabs with counts' do
+ let(:tabs) { page.all('.snippet-scope-menu li') }
+
+ it 'shows a tab for All snippets and count' do
+ tab = tabs[0]
+
+ expect(tab.text).to include('All')
+ expect(tab.find('.badge').text).to eq(counts[:all])
+ end
+
+ it 'shows a tab for Private snippets and count' do
+ tab = tabs[1]
+
+ expect(tab.text).to include('Private')
+ expect(tab.find('.badge').text).to eq(counts[:private])
+ end
+
+ it 'shows a tab for Internal snippets and count' do
+ tab = tabs[2]
+
+ expect(tab.text).to include('Internal')
+ expect(tab.find('.badge').text).to eq(counts[:internal])
+ end
+
+ it 'shows a tab for Public snippets and count' do
+ tab = tabs[3]
+
+ expect(tab.text).to include('Public')
+ expect(tab.find('.badge').text).to eq(counts[:public])
+ end
+end