summaryrefslogtreecommitdiff
path: root/spec/views/projects/tags/index.html.haml_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-19 08:27:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-19 08:27:35 +0000
commit7e9c479f7de77702622631cff2628a9c8dcbc627 (patch)
treec8f718a08e110ad7e1894510980d2155a6549197 /spec/views/projects/tags/index.html.haml_spec.rb
parente852b0ae16db4052c1c567d9efa4facc81146e88 (diff)
downloadgitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/views/projects/tags/index.html.haml_spec.rb')
-rw-r--r--spec/views/projects/tags/index.html.haml_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/views/projects/tags/index.html.haml_spec.rb b/spec/views/projects/tags/index.html.haml_spec.rb
index 4d501b82238..8cc86b75873 100644
--- a/spec/views/projects/tags/index.html.haml_spec.rb
+++ b/spec/views/projects/tags/index.html.haml_spec.rb
@@ -57,4 +57,29 @@ RSpec.describe 'projects/tags/index.html.haml' do
expect(rendered).not_to have_link(href: latest_succeeded_project_artifacts_path(project, "#{pipeline.ref}/download", job: 'test'))
end
end
+
+ context 'build stats' do
+ let(:tag) { 'v1.0.0' }
+ let(:page) { Capybara::Node::Simple.new(rendered) }
+
+ it 'shows build status or placeholder when pipelines present' do
+ create(:ci_pipeline,
+ project: project,
+ ref: tag,
+ sha: project.commit(tag).sha,
+ status: :success)
+ assign(:tag_pipeline_statuses, Ci::CommitStatusesFinder.new(project, project.repository, project.namespace.owner, tags).execute)
+
+ render
+
+ expect(page.find('.tags .content-list li', text: tag)).to have_css 'a.ci-status-icon-success'
+ expect(page.all('.tags .content-list li')).to all(have_css('svg.s24'))
+ end
+
+ it 'shows no build status or placeholder when no pipelines present' do
+ render
+
+ expect(page.all('.tags .content-list li')).not_to have_css 'svg.s24'
+ end
+ end
end