summaryrefslogtreecommitdiff
path: root/spec/features/environments_spec.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-10-17 23:40:44 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-10-17 23:42:49 +0200
commitbebfceb1df03e8afa10af5aead8e657654a14f01 (patch)
tree10560da3834ab5fc0c98485d2b4f8ceae16fa8ae /spec/features/environments_spec.rb
parent5a46e22a6521af8058078e00a8e6f2252b21e8f7 (diff)
downloadgitlab-ce-bebfceb1df03e8afa10af5aead8e657654a14f01.tar.gz
Fix specs
Diffstat (limited to 'spec/features/environments_spec.rb')
-rw-r--r--spec/features/environments_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb
index 7f67ff7df92..7200e9ad4c1 100644
--- a/spec/features/environments_spec.rb
+++ b/spec/features/environments_spec.rb
@@ -18,7 +18,7 @@ feature 'Environments', feature: true do
before do
visit namespace_project_environments_path(project.namespace, project)
end
-
+
context 'shows two tabs' do
scenario 'does show Available tab with link' do
expect(page).to have_link('Available')
@@ -33,7 +33,7 @@ feature 'Environments', feature: true do
scenario 'does show no environments' do
expect(page).to have_content('You don\'t have any environments right now.')
end
-
+
scenario 'does show 0 as counter for environments in both tabs' do
expect(page.find('.js-available-environments-count').text).to eq('0')
expect(page.find('.js-stopped-environments-count').text).to eq('0')
@@ -46,7 +46,7 @@ feature 'Environments', feature: true do
scenario 'does show environment name' do
expect(page).to have_link(environment.name)
end
-
+
scenario 'does show number of opened environments in Available tab' do
expect(page.find('.js-available-environments-count').text).to eq('1')
end
@@ -67,7 +67,7 @@ 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
@@ -88,7 +88,7 @@ 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
@@ -100,12 +100,12 @@ feature 'Environments', feature: true do
scenario 'does not show external link button' do
expect(page).not_to have_css('external-url')
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_link(nil, href: environment.external_url)
end
@@ -198,7 +198,7 @@ feature 'Environments', feature: true do
expect(page).to have_content(manual.name)
expect(manual.reload).to be_pending
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) }
@@ -217,7 +217,7 @@ feature 'Environments', feature: true do
expect(page).to have_link('Stop')
end
- scenario ' scenario 'does allow to stop environment' do' do
+ scenario 'does allow to stop environment' do
click_link('Stop')
expect(page).to have_content('close_app')