summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2016-10-17 22:10:43 +0100
committerFilipa Lacerda <filipa@gitlab.com>2016-10-17 22:10:43 +0100
commitc3cf103fee47c056c7258d2921a34cf68a02022c (patch)
treebf3f373c8e708f8cfb7426cb2819c8fe099cbe3e
parent34e19b9b8dccd7cd2e6c2bb408e75c70f3b6f3b9 (diff)
downloadgitlab-ce-c3cf103fee47c056c7258d2921a34cf68a02022c.tar.gz
Updates class name for consistency
-rw-r--r--app/assets/javascripts/merge_request_widget.js.es64
-rw-r--r--app/assets/stylesheets/pages/environments.scss4
-rw-r--r--app/assets/stylesheets/pages/merge_requests.scss2
-rw-r--r--app/views/projects/environments/_stop.html.haml4
-rw-r--r--spec/features/environments_spec.rb8
5 files changed, 11 insertions, 11 deletions
diff --git a/app/assets/javascripts/merge_request_widget.js.es6 b/app/assets/javascripts/merge_request_widget.js.es6
index 639859ab96f..3ff6851d59b 100644
--- a/app/assets/javascripts/merge_request_widget.js.es6
+++ b/app/assets/javascripts/merge_request_widget.js.es6
@@ -17,7 +17,7 @@
View on <%- external_url_formatted %>
</a>
</span>
- <span class="close-env-container js-close-env-link">
+ <span class="stop-env-container js-stop-env-link">
<a href="<%- stop_url %>" class="close-evn-link" data-method="post" rel="nofollow" data-confirm="Are you sure you want to stop this environment?">
<i class="fa fa-stop-circle-o"/>
Stop environment
@@ -213,7 +213,7 @@
if (!environment.external_url || !environment.external_url_formatted) $('.js-environment-link', $template).remove();
if (!environment.stop_url) {
- $('.js-close-env-link', $template).remove();
+ $('.js-stop-env-link', $template).remove();
}
if (environment.deployed_at && environment.deployed_at_formatted) {
diff --git a/app/assets/stylesheets/pages/environments.scss b/app/assets/stylesheets/pages/environments.scss
index 9d3492abfb5..12ee0a5dc3d 100644
--- a/app/assets/stylesheets/pages/environments.scss
+++ b/app/assets/stylesheets/pages/environments.scss
@@ -38,10 +38,10 @@
color: $gl-dark-link-color;
}
- .close-env-link {
+ .stop-env-link {
color: $table-text-gray;
- .close-env-icon {
+ .stop-env-icon {
font-size: 14px;
}
}
diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss
index f14f13494e0..e27a82ee5f1 100644
--- a/app/assets/stylesheets/pages/merge_requests.scss
+++ b/app/assets/stylesheets/pages/merge_requests.scss
@@ -184,7 +184,7 @@
float: right;
}
- .close-env-container {
+ .stop-env-container {
color: $gl-text-color;
float: right;
diff --git a/app/views/projects/environments/_stop.html.haml b/app/views/projects/environments/_stop.html.haml
index 880f8c8c62c..69848123c17 100644
--- a/app/views/projects/environments/_stop.html.haml
+++ b/app/views/projects/environments/_stop.html.haml
@@ -1,5 +1,5 @@
- if can?(current_user, :create_deployment, environment) && environment.stoppable?
.inline
= link_to stop_namespace_project_environment_path(@project.namespace, @project, environment), method: :post,
- class: 'btn close-env-link', rel: 'nofollow', data: { confirm: 'Are you sure you want to stop this environment?' } do
- = icon('stop', class: 'close-env-icon')
+ class: 'btn stop-env-link', rel: 'nofollow', data: { confirm: 'Are you sure you want to stop this environment?' } do
+ = icon('stop', class: 'stop-env-icon')
diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb
index 16c44e42f63..c4f230d2007 100644
--- a/spec/features/environments_spec.rb
+++ b/spec/features/environments_spec.rb
@@ -94,7 +94,7 @@ feature 'Environments', feature: true do
end
scenario 'does not show stop button' do
- expect(page).not_to have_selector('.close-env-link')
+ expect(page).not_to have_selector('.stop-env-link')
end
scenario 'does not show external link button' do
@@ -116,11 +116,11 @@ feature 'Environments', feature: true do
given(:deployment) { create(:deployment, environment: environment, deployable: build, on_stop: 'close_app') }
scenario 'does show stop button' do
- expect(page).to have_selector('.close-env-link')
+ expect(page).to have_selector('.stop-env-link')
end
scenario 'starts build when stop button clicked' do
- first('.close-env-link').click
+ first('.stop-env-link').click
expect(page).to have_content('close_app')
end
@@ -129,7 +129,7 @@ feature 'Environments', feature: true do
let(:role) { :reporter }
scenario 'does not show stop button' do
- expect(page).not_to have_selector('.close-env-link')
+ expect(page).not_to have_selector('.stop-env-link')
end
end
end