summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2016-10-06 18:10:18 +0100
committerFilipa Lacerda <filipa@gitlab.com>2016-10-06 18:10:18 +0100
commit8443cee049068d8d69633e57df5e15e6d999f073 (patch)
tree0df24efb4085457df6b72db182be927ab9a50913 /spec
parentf7303dd669765745729d947f7fc410230d17c35c (diff)
downloadgitlab-ce-8443cee049068d8d69633e57df5e15e6d999f073.tar.gz
Fixes external_url link
Adds tests for: - external_url link in environmnets list - must show deployment internal id in environments list - must show build name and id in environments list
Diffstat (limited to 'spec')
-rw-r--r--spec/features/environments_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb
index 4309a726917..d4ecccf5f12 100644
--- a/spec/features/environments_spec.rb
+++ b/spec/features/environments_spec.rb
@@ -44,6 +44,10 @@ feature 'Environments', feature: true do
scenario 'does show deployment SHA' do
expect(page).to have_link(deployment.short_sha)
end
+
+ scenario 'does show deployment internal id' do
+ expect(page).to have_content(deployment.iid)
+ end
context 'with build and manual actions' do
given(:pipeline) { create(:ci_pipeline, project: project) }
@@ -61,6 +65,20 @@ feature 'Environments', feature: true do
expect(page).to have_content(manual.name)
expect(manual.reload).to be_pending
end
+
+ scenario 'does show build name and id' do
+ expect(page).to have_link("#{build.name} (##{build.id})")
+ end
+
+ context 'with external_url' do
+ given(:environment) { create(:environment, project: project, external_url: 'https://git.gitlab.com') }
+ given(:build) { create(:ci_build, pipeline: pipeline) }
+ given(:deployment) { create(:deployment, environment: environment, deployable: build) }
+
+ scenario 'does show an external link button' do
+ expect(page).to have_selector('.btn.external-url')
+ end
+ end
end
end
end