Commit 579fa8b8 authored by George Tsiolis's avatar George Tsiolis 🍉

Rename CI related selectors

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