Commit 5af7e842 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'gt-fix-styling-for-pages-status' into 'master'

Fix styling for `app/assets/stylesheets/pages/status.scss`

Closes #59929

See merge request gitlab-org/gitlab-ce!26875
parents 86be4a6f 579fa8b8
...@@ -112,7 +112,7 @@ export default class MergeRequestStore { ...@@ -112,7 +112,7 @@ export default class MergeRequestStore {
this.ciStatus = data.ci_status; this.ciStatus = data.ci_status;
this.isPipelineFailed = this.ciStatus === 'failed' || this.ciStatus === 'canceled'; this.isPipelineFailed = this.ciStatus === 'failed' || this.ciStatus === 'canceled';
this.isPipelinePassing = this.isPipelinePassing =
this.ciStatus === 'success' || this.ciStatus === 'success_with_warnings'; this.ciStatus === 'success' || this.ciStatus === 'success-with-warnings';
this.isPipelineSkipped = this.ciStatus === 'skipped'; this.isPipelineSkipped = this.ciStatus === 'skipped';
this.pipelineDetailedStatus = pipelineStatus; this.pipelineDetailedStatus = pipelineStatus;
this.isPipelineActive = data.pipeline ? data.pipeline.active : false; this.isPipelineActive = data.pipeline ? data.pipeline.active : false;
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
} }
.ci-status-icon-pending, .ci-status-icon-pending,
.ci-status-icon-failed_with_warnings, .ci-status-icon-failed-with-warnings,
.ci-status-icon-success_with_warnings { .ci-status-icon-success-with-warnings {
svg { svg {
fill: $orange-500; fill: $orange-500;
} }
......
...@@ -785,7 +785,7 @@ ...@@ -785,7 +785,7 @@
} }
&.ci-status-icon-pending, &.ci-status-icon-pending,
&.ci-status-icon-success_with_warnings { &.ci-status-icon-success-with-warnings {
@include mini-pipeline-graph-color($white, $orange-100, $orange-200, $orange-500, $orange-600, $orange-700); @include mini-pipeline-graph-color($white, $orange-100, $orange-200, $orange-500, $orange-600, $orange-700);
} }
......
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
} }
&.ci-pending, &.ci-pending,
&.ci-failed_with_warnings, &.ci-failed-with-warnings,
&.ci-success_with_warnings { &.ci-success-with-warnings {
@include status-color($orange-100, $orange-500, $orange-700); @include status-color($orange-100, $orange-500, $orange-700);
} }
......
...@@ -16,7 +16,7 @@ module CiStatusHelper ...@@ -16,7 +16,7 @@ module CiStatusHelper
label = case status label = case status
when 'success' when 'success'
'passed' 'passed'
when 'success_with_warnings' when 'success-with-warnings'
'passed with warnings' 'passed with warnings'
when 'manual' when 'manual'
'waiting for manual action' 'waiting for manual action'
...@@ -37,7 +37,7 @@ module CiStatusHelper ...@@ -37,7 +37,7 @@ module CiStatusHelper
case status case status
when 'success' when 'success'
s_('CiStatusText|passed') s_('CiStatusText|passed')
when 'success_with_warnings' when 'success-with-warnings'
s_('CiStatusText|passed') s_('CiStatusText|passed')
when 'manual' when 'manual'
s_('CiStatusText|blocked') s_('CiStatusText|blocked')
...@@ -71,7 +71,7 @@ module CiStatusHelper ...@@ -71,7 +71,7 @@ module CiStatusHelper
case status case status
when 'success' when 'success'
'status_success' 'status_success'
when 'success_with_warnings' when 'success-with-warnings'
'status_warning' 'status_warning'
when 'failed' when 'failed'
'status_failed' 'status_failed'
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# For an example companion mocking service, see https://gitlab.com/gitlab-org/gitlab-mock-ci-service # For an example companion mocking service, see https://gitlab.com/gitlab-org/gitlab-mock-ci-service
class MockCiService < CiService class MockCiService < CiService
ALLOWED_STATES = %w[failed canceled running pending success success_with_warnings skipped not_found].freeze ALLOWED_STATES = %w[failed canceled running pending success success-with-warnings skipped not_found].freeze
prop_accessor :mock_service_url prop_accessor :mock_service_url
validates :mock_service_url, presence: true, public_url: true, if: :activated? validates :mock_service_url, presence: true, public_url: true, if: :activated?
......
...@@ -13,7 +13,7 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated ...@@ -13,7 +13,7 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
def ci_status def ci_status
if pipeline if pipeline
status = pipeline.status status = pipeline.status
status = "success_with_warnings" if pipeline.success? && pipeline.has_warnings? status = "success-with-warnings" if pipeline.success? && pipeline.has_warnings?
status || "preparing" status || "preparing"
else else
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
To set up the mock CI service server, respond to the following endpoints To set up the mock CI service server, respond to the following endpoints
- `commit_status`: `#{project.namespace.path}/#{project.path}/status/#{sha}.json` - `commit_status`: `#{project.namespace.path}/#{project.path}/status/#{sha}.json`
- Have your service return `200 { status: ['failed'|'canceled'|'running'|'pending'|'success'|'success_with_warnings'|'skipped'|'not_found'] }` - Have your service return `200 { status: ['failed'|'canceled'|'running'|'pending'|'success'|'success-with-warnings'|'skipped'|'not_found'] }`
- If the service returns a 404, it is interpreted as `pending` - If the service returns a 404, it is interpreted as `pending`
- `build_page`: `#{project.namespace.path}/#{project.path}/status/#{sha}` - `build_page`: `#{project.namespace.path}/#{project.path}/status/#{sha}`
- Just where the build is linked to, doesn't matter if implemented - Just where the build is linked to, doesn't matter if implemented
......
...@@ -14,7 +14,7 @@ module Gitlab ...@@ -14,7 +14,7 @@ module Gitlab
end end
def group def group
'failed_with_warnings' 'failed-with-warnings'
end end
def status_tooltip def status_tooltip
......
...@@ -21,7 +21,7 @@ module Gitlab ...@@ -21,7 +21,7 @@ module Gitlab
end end
def group def group
'success_with_warnings' 'success-with-warnings'
end end
def self.matches?(subject, user) def self.matches?(subject, user)
......
...@@ -678,7 +678,7 @@ export const stages = [ ...@@ -678,7 +678,7 @@ export const stages = [
icon: 'status_warning', icon: 'status_warning',
text: 'failed', text: 'failed',
label: 'failed (allowed to fail)', label: 'failed (allowed to fail)',
group: 'failed_with_warnings', group: 'failed-with-warnings',
tooltip: 'failed - (unknown failure) (allowed to fail)', tooltip: 'failed - (unknown failure) (allowed to fail)',
has_details: true, has_details: true,
details_path: '/gitlab-org/gitlab-shell/-/jobs/454', details_path: '/gitlab-org/gitlab-shell/-/jobs/454',
...@@ -710,7 +710,7 @@ export const stages = [ ...@@ -710,7 +710,7 @@ export const stages = [
icon: 'status_warning', icon: 'status_warning',
text: 'failed', text: 'failed',
label: 'failed (allowed to fail)', label: 'failed (allowed to fail)',
group: 'failed_with_warnings', group: 'failed-with-warnings',
tooltip: 'failed - (unknown failure) (allowed to fail)', tooltip: 'failed - (unknown failure) (allowed to fail)',
has_details: true, has_details: true,
details_path: '/gitlab-org/gitlab-shell/-/jobs/454', details_path: '/gitlab-org/gitlab-shell/-/jobs/454',
...@@ -738,7 +738,7 @@ export const stages = [ ...@@ -738,7 +738,7 @@ export const stages = [
icon: 'status_warning', icon: 'status_warning',
text: 'passed', text: 'passed',
label: 'passed with warnings', label: 'passed with warnings',
group: 'success_with_warnings', group: 'success-with-warnings',
tooltip: 'passed', tooltip: 'passed',
has_details: true, has_details: true,
details_path: '/gitlab-org/gitlab-shell/pipelines/27#test', details_path: '/gitlab-org/gitlab-shell/pipelines/27#test',
......
...@@ -36,8 +36,8 @@ describe('MergeRequestStore', () => { ...@@ -36,8 +36,8 @@ describe('MergeRequestStore', () => {
expect(store.isPipelinePassing).toBe(true); expect(store.isPipelinePassing).toBe(true);
}); });
it('is true when the CI status is `success_with_warnings`', () => { it('is true when the CI status is `success-with-warnings`', () => {
store.setData({ ...mockData, ci_status: 'success_with_warnings' }); store.setData({ ...mockData, ci_status: 'success-with-warnings' });
expect(store.isPipelinePassing).toBe(true); expect(store.isPipelinePassing).toBe(true);
}); });
......
...@@ -59,7 +59,7 @@ describe('CI Badge Link Component', () => { ...@@ -59,7 +59,7 @@ describe('CI Badge Link Component', () => {
success_warining: { success_warining: {
text: 'passed', text: 'passed',
label: 'passed', label: 'passed',
group: 'success_with_warnings', group: 'success-with-warnings',
icon: 'status_warning', icon: 'status_warning',
details_path: 'status/warning', details_path: 'status/warning',
}, },
......
...@@ -31,7 +31,7 @@ describe Gitlab::Ci::Status::Build::FailedAllowed do ...@@ -31,7 +31,7 @@ describe Gitlab::Ci::Status::Build::FailedAllowed do
describe '#group' do describe '#group' do
it 'returns status failed with warnings status group' do it 'returns status failed with warnings status group' do
expect(subject.group).to eq 'failed_with_warnings' expect(subject.group).to eq 'failed-with-warnings'
end end
end end
......
...@@ -20,7 +20,7 @@ describe Gitlab::Ci::Status::SuccessWarning do ...@@ -20,7 +20,7 @@ describe Gitlab::Ci::Status::SuccessWarning do
end end
describe '#group' do describe '#group' do
it { expect(subject.group).to eq 'success_with_warnings' } it { expect(subject.group).to eq 'success-with-warnings' }
end end
describe '.matches?' do describe '.matches?' do
......
...@@ -40,8 +40,8 @@ describe MergeRequestPresenter do ...@@ -40,8 +40,8 @@ describe MergeRequestPresenter do
allow(pipeline).to receive(:has_warnings?) { true } allow(pipeline).to receive(:has_warnings?) { true }
end end
it 'returns "success_with_warnings"' do it 'returns "success-with-warnings"' do
is_expected.to eq('success_with_warnings') is_expected.to eq('success-with-warnings')
end 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