Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
898e67f1
Commit
898e67f1
authored
Oct 13, 2020
by
Laura Montemayor
Committed by
Shinya Maeda
Oct 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds status to jobs, stages, and groups
* Adds the specs * Adds schema and docs
parent
ac0af237
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
198 additions
and
41 deletions
+198
-41
app/graphql/types/ci/detailed_status_type.rb
app/graphql/types/ci/detailed_status_type.rb
+9
-9
app/graphql/types/ci/group_type.rb
app/graphql/types/ci/group_type.rb
+3
-0
app/graphql/types/ci/job_type.rb
app/graphql/types/ci/job_type.rb
+3
-0
app/graphql/types/ci/stage_type.rb
app/graphql/types/ci/stage_type.rb
+3
-0
changelogs/unreleased/lm-add-status-graphql.yml
changelogs/unreleased/lm-add-status-graphql.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+24
-9
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+53
-15
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+11
-8
lib/gitlab/ci/status/canceled.rb
lib/gitlab/ci/status/canceled.rb
+4
-0
lib/gitlab/ci/status/created.rb
lib/gitlab/ci/status/created.rb
+4
-0
lib/gitlab/ci/status/failed.rb
lib/gitlab/ci/status/failed.rb
+4
-0
lib/gitlab/ci/status/manual.rb
lib/gitlab/ci/status/manual.rb
+4
-0
lib/gitlab/ci/status/pending.rb
lib/gitlab/ci/status/pending.rb
+4
-0
lib/gitlab/ci/status/preparing.rb
lib/gitlab/ci/status/preparing.rb
+4
-0
lib/gitlab/ci/status/running.rb
lib/gitlab/ci/status/running.rb
+4
-0
lib/gitlab/ci/status/scheduled.rb
lib/gitlab/ci/status/scheduled.rb
+4
-0
lib/gitlab/ci/status/skipped.rb
lib/gitlab/ci/status/skipped.rb
+4
-0
lib/gitlab/ci/status/success.rb
lib/gitlab/ci/status/success.rb
+4
-0
lib/gitlab/ci/status/waiting_for_resource.rb
lib/gitlab/ci/status/waiting_for_resource.rb
+4
-0
spec/graphql/types/ci/group_type_spec.rb
spec/graphql/types/ci/group_type_spec.rb
+1
-0
spec/graphql/types/ci/job_type_spec.rb
spec/graphql/types/ci/job_type_spec.rb
+1
-0
spec/graphql/types/ci/stage_type_spec.rb
spec/graphql/types/ci/stage_type_spec.rb
+1
-0
spec/lib/gitlab/ci/status/canceled_spec.rb
spec/lib/gitlab/ci/status/canceled_spec.rb
+4
-0
spec/lib/gitlab/ci/status/created_spec.rb
spec/lib/gitlab/ci/status/created_spec.rb
+4
-0
spec/lib/gitlab/ci/status/failed_spec.rb
spec/lib/gitlab/ci/status/failed_spec.rb
+4
-0
spec/lib/gitlab/ci/status/pending_spec.rb
spec/lib/gitlab/ci/status/pending_spec.rb
+4
-0
spec/lib/gitlab/ci/status/preparing_spec.rb
spec/lib/gitlab/ci/status/preparing_spec.rb
+4
-0
spec/lib/gitlab/ci/status/running_spec.rb
spec/lib/gitlab/ci/status/running_spec.rb
+4
-0
spec/lib/gitlab/ci/status/scheduled_spec.rb
spec/lib/gitlab/ci/status/scheduled_spec.rb
+4
-0
spec/lib/gitlab/ci/status/skipped_spec.rb
spec/lib/gitlab/ci/status/skipped_spec.rb
+4
-0
spec/lib/gitlab/ci/status/success_spec.rb
spec/lib/gitlab/ci/status/success_spec.rb
+4
-0
spec/lib/gitlab/ci/status/waiting_for_resource_spec.rb
spec/lib/gitlab/ci/status/waiting_for_resource_spec.rb
+4
-0
No files found.
app/graphql/types/ci/detailed_status_type.rb
View file @
898e67f1
...
@@ -7,22 +7,22 @@ module Types
...
@@ -7,22 +7,22 @@ module Types
graphql_name
'DetailedStatus'
graphql_name
'DetailedStatus'
field
:group
,
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:group
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Group of the
pipeline
status'
description:
'Group of the status'
field
:icon
,
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:icon
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Icon of the
pipeline
status'
description:
'Icon of the status'
field
:favicon
,
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:favicon
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Favicon of the
pipeline
status'
description:
'Favicon of the status'
field
:details_path
,
GraphQL
::
STRING_TYPE
,
null:
fals
e
,
field
:details_path
,
GraphQL
::
STRING_TYPE
,
null:
tru
e
,
description:
'Path of the details for the
pipeline
status'
description:
'Path of the details for the status'
field
:has_details
,
GraphQL
::
BOOLEAN_TYPE
,
null:
false
,
field
:has_details
,
GraphQL
::
BOOLEAN_TYPE
,
null:
false
,
description:
'Indicates if the
pipeline
status has further details'
,
description:
'Indicates if the status has further details'
,
method: :has_details?
method: :has_details?
field
:label
,
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:label
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Label of the
pipeline
status'
description:
'Label of the status'
field
:text
,
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:text
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Text of the
pipeline
status'
description:
'Text of the status'
field
:tooltip
,
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:tooltip
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Tooltip associated with the
pipeline
status'
,
description:
'Tooltip associated with the status'
,
method: :status_tooltip
method: :status_tooltip
field
:action
,
Types
::
Ci
::
StatusActionType
,
null:
true
,
field
:action
,
Types
::
Ci
::
StatusActionType
,
null:
true
,
description:
'Action information for the status. This includes method, button title, icon, path, and title'
,
description:
'Action information for the status. This includes method, button title, icon, path, and title'
,
...
...
app/graphql/types/ci/group_type.rb
View file @
898e67f1
...
@@ -12,6 +12,9 @@ module Types
...
@@ -12,6 +12,9 @@ module Types
description:
'Size of the group'
description:
'Size of the group'
field
:jobs
,
Ci
::
JobType
.
connection_type
,
null:
true
,
field
:jobs
,
Ci
::
JobType
.
connection_type
,
null:
true
,
description:
'Jobs in group'
description:
'Jobs in group'
field
:detailed_status
,
Types
::
Ci
::
DetailedStatusType
,
null:
true
,
description:
'Detailed status of the group'
,
resolve:
->
(
obj
,
_args
,
ctx
)
{
obj
.
detailed_status
(
ctx
[
:current_user
])
}
end
end
end
end
end
end
app/graphql/types/ci/job_type.rb
View file @
898e67f1
...
@@ -10,6 +10,9 @@ module Types
...
@@ -10,6 +10,9 @@ module Types
description:
'Name of the job'
description:
'Name of the job'
field
:needs
,
JobType
.
connection_type
,
null:
true
,
field
:needs
,
JobType
.
connection_type
,
null:
true
,
description:
'Builds that must complete before the jobs run'
description:
'Builds that must complete before the jobs run'
field
:detailed_status
,
Types
::
Ci
::
DetailedStatusType
,
null:
true
,
description:
'Detailed status of the job'
,
resolve:
->
(
obj
,
_args
,
ctx
)
{
obj
.
detailed_status
(
ctx
[
:current_user
])
}
end
end
end
end
end
end
app/graphql/types/ci/stage_type.rb
View file @
898e67f1
...
@@ -10,6 +10,9 @@ module Types
...
@@ -10,6 +10,9 @@ module Types
description:
'Name of the stage'
description:
'Name of the stage'
field
:groups
,
Ci
::
GroupType
.
connection_type
,
null:
true
,
field
:groups
,
Ci
::
GroupType
.
connection_type
,
null:
true
,
description:
'Group of jobs for the stage'
description:
'Group of jobs for the stage'
field
:detailed_status
,
Types
::
Ci
::
DetailedStatusType
,
null:
true
,
description:
'Detailed status of the stage'
,
resolve:
->
(
obj
,
_args
,
ctx
)
{
obj
.
detailed_status
(
ctx
[
:current_user
])
}
end
end
end
end
end
end
changelogs/unreleased/lm-add-status-graphql.yml
0 → 100644
View file @
898e67f1
---
title
:
'
GrahphQL:
Adds
status
to
jobs,
stages,
and
groups'
merge_request
:
43069
author
:
type
:
added
doc/api/graphql/reference/gitlab_schema.graphql
View file @
898e67f1
...
@@ -2000,6 +2000,11 @@ type BurnupChartDailyTotals {
...
@@ -2000,6 +2000,11 @@ type BurnupChartDailyTotals {
}
}
type
CiGroup
{
type
CiGroup
{
"""
Detailed
status
of
the
group
"""
detailedStatus
:
DetailedStatus
"""
"""
Jobs
in
group
Jobs
in
group
"""
"""
...
@@ -2072,6 +2077,11 @@ type CiGroupEdge {
...
@@ -2072,6 +2077,11 @@ type CiGroupEdge {
}
}
type
CiJob
{
type
CiJob
{
"""
Detailed
status
of
the
job
"""
detailedStatus
:
DetailedStatus
"""
"""
Name
of
the
job
Name
of
the
job
"""
"""
...
@@ -2144,6 +2154,11 @@ Identifier of Ci::Pipeline
...
@@ -2144,6 +2154,11 @@ Identifier of Ci::Pipeline
scalar
CiPipelineID
scalar
CiPipelineID
type
CiStage
{
type
CiStage
{
"""
Detailed
status
of
the
stage
"""
detailedStatus
:
DetailedStatus
"""
"""
Group
of
jobs
for
the
stage
Group
of
jobs
for
the
stage
"""
"""
...
@@ -5215,42 +5230,42 @@ type DetailedStatus {
...
@@ -5215,42 +5230,42 @@ type DetailedStatus {
action
:
StatusAction
action
:
StatusAction
"""
"""
Path
of
the
details
for
the
pipeline
status
Path
of
the
details
for
the
status
"""
"""
detailsPath
:
String
!
detailsPath
:
String
"""
"""
Favicon
of
the
pipeline
status
Favicon
of
the
status
"""
"""
favicon
:
String
!
favicon
:
String
!
"""
"""
Group
of
the
pipeline
status
Group
of
the
status
"""
"""
group
:
String
!
group
:
String
!
"""
"""
Indicates
if
the
pipeline
status
has
further
details
Indicates
if
the
status
has
further
details
"""
"""
hasDetails
:
Boolean
!
hasDetails
:
Boolean
!
"""
"""
Icon
of
the
pipeline
status
Icon
of
the
status
"""
"""
icon
:
String
!
icon
:
String
!
"""
"""
Label
of
the
pipeline
status
Label
of
the
status
"""
"""
label
:
String
!
label
:
String
!
"""
"""
Text
of
the
pipeline
status
Text
of
the
status
"""
"""
text
:
String
!
text
:
String
!
"""
"""
Tooltip
associated
with
the
pipeline
status
Tooltip
associated
with
the
status
"""
"""
tooltip
:
String
!
tooltip
:
String
!
}
}
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
898e67f1
...
@@ -5343,6 +5343,20 @@
...
@@ -5343,6 +5343,20 @@
"name": "CiGroup",
"name": "CiGroup",
"description": null,
"description": null,
"fields": [
"fields": [
{
"name": "detailedStatus",
"description": "Detailed status of the group",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "DetailedStatus",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
{
"name": "jobs",
"name": "jobs",
"description": "Jobs in group",
"description": "Jobs in group",
...
@@ -5549,6 +5563,20 @@
...
@@ -5549,6 +5563,20 @@
"name": "CiJob",
"name": "CiJob",
"description": null,
"description": null,
"fields": [
"fields": [
{
"name": "detailedStatus",
"description": "Detailed status of the job",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "DetailedStatus",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
{
"name": "name",
"name": "name",
"description": "Name of the job",
"description": "Name of the job",
...
@@ -5751,6 +5779,20 @@
...
@@ -5751,6 +5779,20 @@
"name": "CiStage",
"name": "CiStage",
"description": null,
"description": null,
"fields": [
"fields": [
{
"name": "detailedStatus",
"description": "Detailed status of the stage",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "DetailedStatus",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
{
"name": "groups",
"name": "groups",
"description": "Group of jobs for the stage",
"description": "Group of jobs for the stage",
...
@@ -14279,25 +14321,21 @@
...
@@ -14279,25 +14321,21 @@
},
},
{
{
"name": "detailsPath",
"name": "detailsPath",
"description": "Path of the details for the
pipeline
status",
"description": "Path of the details for the status",
"args": [
"args": [
],
],
"type": {
"type": {
"kind": "NON_NULL",
"kind": "SCALAR",
"name": null,
"name": "String",
"ofType": {
"ofType": null
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
},
"isDeprecated": false,
"isDeprecated": false,
"deprecationReason": null
"deprecationReason": null
},
},
{
{
"name": "favicon",
"name": "favicon",
"description": "Favicon of the
pipeline
status",
"description": "Favicon of the status",
"args": [
"args": [
],
],
...
@@ -14315,7 +14353,7 @@
...
@@ -14315,7 +14353,7 @@
},
},
{
{
"name": "group",
"name": "group",
"description": "Group of the
pipeline
status",
"description": "Group of the status",
"args": [
"args": [
],
],
...
@@ -14333,7 +14371,7 @@
...
@@ -14333,7 +14371,7 @@
},
},
{
{
"name": "hasDetails",
"name": "hasDetails",
"description": "Indicates if the
pipeline
status has further details",
"description": "Indicates if the status has further details",
"args": [
"args": [
],
],
...
@@ -14351,7 +14389,7 @@
...
@@ -14351,7 +14389,7 @@
},
},
{
{
"name": "icon",
"name": "icon",
"description": "Icon of the
pipeline
status",
"description": "Icon of the status",
"args": [
"args": [
],
],
...
@@ -14369,7 +14407,7 @@
...
@@ -14369,7 +14407,7 @@
},
},
{
{
"name": "label",
"name": "label",
"description": "Label of the
pipeline
status",
"description": "Label of the status",
"args": [
"args": [
],
],
...
@@ -14387,7 +14425,7 @@
...
@@ -14387,7 +14425,7 @@
},
},
{
{
"name": "text",
"name": "text",
"description": "Text of the
pipeline
status",
"description": "Text of the status",
"args": [
"args": [
],
],
...
@@ -14405,7 +14443,7 @@
...
@@ -14405,7 +14443,7 @@
},
},
{
{
"name": "tooltip",
"name": "tooltip",
"description": "Tooltip associated with the
pipeline
status",
"description": "Tooltip associated with the status",
"args": [
"args": [
],
],
doc/api/graphql/reference/index.md
View file @
898e67f1
...
@@ -323,6 +323,7 @@ Represents the total number of issues and their weights for a particular day.
...
@@ -323,6 +323,7 @@ Represents the total number of issues and their weights for a particular day.
| Field | Type | Description |
| Field | Type | Description |
| ----- | ---- | ----------- |
| ----- | ---- | ----------- |
|
`detailedStatus`
| DetailedStatus | Detailed status of the group |
|
`name`
| String | Name of the job group |
|
`name`
| String | Name of the job group |
|
`size`
| Int | Size of the group |
|
`size`
| Int | Size of the group |
...
@@ -330,12 +331,14 @@ Represents the total number of issues and their weights for a particular day.
...
@@ -330,12 +331,14 @@ Represents the total number of issues and their weights for a particular day.
| Field | Type | Description |
| Field | Type | Description |
| ----- | ---- | ----------- |
| ----- | ---- | ----------- |
|
`detailedStatus`
| DetailedStatus | Detailed status of the job |
|
`name`
| String | Name of the job |
|
`name`
| String | Name of the job |
### CiStage
### CiStage
| Field | Type | Description |
| Field | Type | Description |
| ----- | ---- | ----------- |
| ----- | ---- | ----------- |
|
`detailedStatus`
| DetailedStatus | Detailed status of the stage |
|
`name`
| String | Name of the stage |
|
`name`
| String | Name of the stage |
### ClusterAgent
### ClusterAgent
...
@@ -840,14 +843,14 @@ Autogenerated return type of DestroySnippet.
...
@@ -840,14 +843,14 @@ Autogenerated return type of DestroySnippet.
| Field | Type | Description |
| Field | Type | Description |
| ----- | ---- | ----------- |
| ----- | ---- | ----------- |
|
`action`
| StatusAction | Action information for the status. This includes method, button title, icon, path, and title |
|
`action`
| StatusAction | Action information for the status. This includes method, button title, icon, path, and title |
|
`detailsPath`
| String
! | Path of the details for the pipelin
e status |
|
`detailsPath`
| String
| Path of the details for th
e status |
|
`favicon`
| String! | Favicon of the
pipeline
status |
|
`favicon`
| String! | Favicon of the status |
|
`group`
| String! | Group of the
pipeline
status |
|
`group`
| String! | Group of the status |
|
`hasDetails`
| Boolean! | Indicates if the
pipeline
status has further details |
|
`hasDetails`
| Boolean! | Indicates if the status has further details |
|
`icon`
| String! | Icon of the
pipeline
status |
|
`icon`
| String! | Icon of the status |
|
`label`
| String! | Label of the
pipeline
status |
|
`label`
| String! | Label of the status |
|
`text`
| String! | Text of the
pipeline
status |
|
`text`
| String! | Text of the status |
|
`tooltip`
| String! | Tooltip associated with the
pipeline
status |
|
`tooltip`
| String! | Tooltip associated with the status |
### DiffPosition
### DiffPosition
...
...
lib/gitlab/ci/status/canceled.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_canceled'
'favicon_status_canceled'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/created.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_created'
'favicon_status_created'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/failed.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_failed'
'favicon_status_failed'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/manual.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_manual'
'favicon_status_manual'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/pending.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_pending'
'favicon_status_pending'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/preparing.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_preparing'
'favicon_status_preparing'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/running.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_running'
'favicon_status_running'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/scheduled.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_scheduled'
'favicon_status_scheduled'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/skipped.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_skipped'
'favicon_status_skipped'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/success.rb
View file @
898e67f1
...
@@ -19,6 +19,10 @@ module Gitlab
...
@@ -19,6 +19,10 @@ module Gitlab
def
favicon
def
favicon
'favicon_status_success'
'favicon_status_success'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/waiting_for_resource.rb
View file @
898e67f1
...
@@ -23,6 +23,10 @@ module Gitlab
...
@@ -23,6 +23,10 @@ module Gitlab
def
group
def
group
'waiting-for-resource'
'waiting-for-resource'
end
end
def
details_path
nil
end
end
end
end
end
end
end
...
...
spec/graphql/types/ci/group_type_spec.rb
View file @
898e67f1
...
@@ -10,6 +10,7 @@ RSpec.describe Types::Ci::GroupType do
...
@@ -10,6 +10,7 @@ RSpec.describe Types::Ci::GroupType do
name
name
size
size
jobs
jobs
detailedStatus
]
]
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
...
...
spec/graphql/types/ci/job_type_spec.rb
View file @
898e67f1
...
@@ -9,6 +9,7 @@ RSpec.describe Types::Ci::JobType do
...
@@ -9,6 +9,7 @@ RSpec.describe Types::Ci::JobType do
expected_fields
=
%i[
expected_fields
=
%i[
name
name
needs
needs
detailedStatus
]
]
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
...
...
spec/graphql/types/ci/stage_type_spec.rb
View file @
898e67f1
...
@@ -9,6 +9,7 @@ RSpec.describe Types::Ci::StageType do
...
@@ -9,6 +9,7 @@ RSpec.describe Types::Ci::StageType do
expected_fields
=
%i[
expected_fields
=
%i[
name
name
groups
groups
detailedStatus
]
]
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
...
...
spec/lib/gitlab/ci/status/canceled_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Canceled do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Canceled do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'canceled'
}
it
{
expect
(
subject
.
group
).
to
eq
'canceled'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
spec/lib/gitlab/ci/status/created_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Created do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Created do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'created'
}
it
{
expect
(
subject
.
group
).
to
eq
'created'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
spec/lib/gitlab/ci/status/failed_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Failed do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Failed do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'failed'
}
it
{
expect
(
subject
.
group
).
to
eq
'failed'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
spec/lib/gitlab/ci/status/pending_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Pending do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Pending do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'pending'
}
it
{
expect
(
subject
.
group
).
to
eq
'pending'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
spec/lib/gitlab/ci/status/preparing_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Preparing do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Preparing do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'preparing'
}
it
{
expect
(
subject
.
group
).
to
eq
'preparing'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
spec/lib/gitlab/ci/status/running_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Running do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Running do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'running'
}
it
{
expect
(
subject
.
group
).
to
eq
'running'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
spec/lib/gitlab/ci/status/scheduled_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Scheduled do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Scheduled do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'scheduled'
}
it
{
expect
(
subject
.
group
).
to
eq
'scheduled'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
spec/lib/gitlab/ci/status/skipped_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Skipped do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Skipped do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'skipped'
}
it
{
expect
(
subject
.
group
).
to
eq
'skipped'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
spec/lib/gitlab/ci/status/success_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Success do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::Success do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'success'
}
it
{
expect
(
subject
.
group
).
to
eq
'success'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
spec/lib/gitlab/ci/status/waiting_for_resource_spec.rb
View file @
898e67f1
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::WaitingForResource do
...
@@ -26,4 +26,8 @@ RSpec.describe Gitlab::Ci::Status::WaitingForResource do
describe
'#group'
do
describe
'#group'
do
it
{
expect
(
subject
.
group
).
to
eq
'waiting-for-resource'
}
it
{
expect
(
subject
.
group
).
to
eq
'waiting-for-resource'
}
end
end
describe
'#details_path'
do
it
{
expect
(
subject
.
details_path
).
to
be_nil
}
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment