Skip to content
Snippets Groups Projects
Commit c3cf103f authored by Filipa Lacerda's avatar Filipa Lacerda
Browse files

Updates class name for consistency

parent 34e19b9b
No related branches found
No related tags found
No related merge requests found
Loading
@@ -17,7 +17,7 @@
Loading
@@ -17,7 +17,7 @@
View on <%- external_url_formatted %> View on <%- external_url_formatted %>
</a> </a>
</span> </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?"> <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"/> <i class="fa fa-stop-circle-o"/>
Stop environment Stop environment
Loading
@@ -213,7 +213,7 @@
Loading
@@ -213,7 +213,7 @@
if (!environment.external_url || !environment.external_url_formatted) $('.js-environment-link', $template).remove(); if (!environment.external_url || !environment.external_url_formatted) $('.js-environment-link', $template).remove();
if (!environment.stop_url) { if (!environment.stop_url) {
$('.js-close-env-link', $template).remove(); $('.js-stop-env-link', $template).remove();
} }
if (environment.deployed_at && environment.deployed_at_formatted) { if (environment.deployed_at && environment.deployed_at_formatted) {
Loading
Loading
Loading
@@ -38,10 +38,10 @@
Loading
@@ -38,10 +38,10 @@
color: $gl-dark-link-color; color: $gl-dark-link-color;
} }
.close-env-link { .stop-env-link {
color: $table-text-gray; color: $table-text-gray;
.close-env-icon { .stop-env-icon {
font-size: 14px; font-size: 14px;
} }
} }
Loading
Loading
Loading
@@ -184,7 +184,7 @@
Loading
@@ -184,7 +184,7 @@
float: right; float: right;
} }
.close-env-container { .stop-env-container {
color: $gl-text-color; color: $gl-text-color;
float: right; float: right;
Loading
Loading
- if can?(current_user, :create_deployment, environment) && environment.stoppable? - if can?(current_user, :create_deployment, environment) && environment.stoppable?
.inline .inline
= link_to stop_namespace_project_environment_path(@project.namespace, @project, environment), method: :post, = 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 class: 'btn stop-env-link', rel: 'nofollow', data: { confirm: 'Are you sure you want to stop this environment?' } do
= icon('stop', class: 'close-env-icon') = icon('stop', class: 'stop-env-icon')
Loading
@@ -94,7 +94,7 @@ feature 'Environments', feature: true do
Loading
@@ -94,7 +94,7 @@ feature 'Environments', feature: true do
end end
   
scenario 'does not show stop button' do 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
   
scenario 'does not show external link button' do scenario 'does not show external link button' do
Loading
@@ -116,11 +116,11 @@ feature 'Environments', feature: true do
Loading
@@ -116,11 +116,11 @@ feature 'Environments', feature: true do
given(:deployment) { create(:deployment, environment: environment, deployable: build, on_stop: 'close_app') } given(:deployment) { create(:deployment, environment: environment, deployable: build, on_stop: 'close_app') }
   
scenario 'does show stop button' do scenario 'does show stop button' do
expect(page).to have_selector('.close-env-link') expect(page).to have_selector('.stop-env-link')
end end
   
scenario 'starts build when stop button clicked' do 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') expect(page).to have_content('close_app')
end end
Loading
@@ -129,7 +129,7 @@ feature 'Environments', feature: true do
Loading
@@ -129,7 +129,7 @@ feature 'Environments', feature: true do
let(:role) { :reporter } let(:role) { :reporter }
   
scenario 'does not show stop button' do 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 end
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment