Commit c3cf103f authored by Filipa Lacerda's avatar Filipa Lacerda

Updates class name for consistency

parent 34e19b9b
......@@ -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) {
......
......@@ -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;
}
}
......
......@@ -184,7 +184,7 @@
float: right;
}
.close-env-container {
.stop-env-container {
color: $gl-text-color;
float: right;
......
- 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')
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment