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
25cc2aeb
Commit
25cc2aeb
authored
Aug 18, 2020
by
Tiffany Rea
Committed by
Mark Lapierre
Aug 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for pipeline status via API
parent
475d4b9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
qa/qa/specs/features/ee/browser_ui/4_verify/pipeline_status_on_operation_dashboard_spec.rb
...i/4_verify/pipeline_status_on_operation_dashboard_spec.rb
+19
-19
No files found.
qa/qa/specs/features/ee/browser_ui/4_verify/pipeline_status_on_operation_dashboard_spec.rb
View file @
25cc2aeb
# frozen_string_literal: true
module
QA
context
'Verify'
,
:docker
do
RSpec
.
describe
'Verify'
,
:docker
do
describe
'Operations Dashboard'
do
let
(
:group
)
{
Resource
::
Group
.
fabricate_via_api!
}
let!
(
:runner
)
do
...
...
@@ -63,46 +63,46 @@ module QA
'project-with-pending-run'
=>
'pending'
,
'project-without-ci'
=>
nil
}.
each
do
|
project_name
,
status
|
p
ipeline_status
=
nil
p
roject
=
operation
.
find_project_card_by_name
(
project_name
)
Support
::
Waiter
.
wait_until
(
sleep_interval:
3
,
reload_page:
operation
)
do
project
=
operation
.
find_project_card_by_name
(
project_name
)
if
project_name
==
'project-without-ci'
expect
(
project
).
to
have_content
(
'The branch for this project has no active pipeline configuration.'
)
break
end
pipeline_status
=
operation
.
pipeline_status
(
project
)
pipeline_status
!=
'running'
if
project_name
==
'project-without-ci'
expect
(
project
).
to
have_content
(
'The branch for this project has no active pipeline configuration.'
)
else
expect
(
operation
.
pipeline_status
(
project
)).
to
eq
(
status
)
end
expect
(
pipeline_status
).
to
eq
(
status
)
end
end
end
private
def
commit_ci_file
(
project
,
file
)
def
commit_ci_file
(
project
,
file
,
status
)
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
commit
.
project
=
project
commit
.
commit_message
=
'Add .gitlab-ci.yml'
commit
.
add_files
([
file
])
end
wait_for_pipeline
(
project
,
status
)
end
def
setup_projects
commit_ci_file
(
project_with_success_run
,
ci_file_with_tag
)
commit_ci_file
(
project_with_pending_run
,
ci_file_without_existing_tag
)
commit_ci_file
(
project_with_failed_run
,
ci_file_failed_run
)
commit_ci_file
(
project_with_success_run
,
ci_file_with_tag
,
'success'
)
commit_ci_file
(
project_with_pending_run
,
ci_file_without_existing_tag
,
'pending'
)
commit_ci_file
(
project_with_failed_run
,
ci_file_failed_run
,
'failed'
)
end
def
wait_for_pipeline
(
project
,
status
)
Support
::
Waiter
.
wait_until
do
pipelines
=
project
.
pipelines
!
pipelines
.
empty?
&&
pipelines
.
last
[
:status
]
==
status
end
end
def
add_projects_to_board
[
project_with_success_run
,
project_with_pending_run
,
project_without_ci
,
project_with_failed_run
].
each
do
|
project
|
EE
::
Page
::
OperationsDashboard
.
perform
do
|
operation
|
operation
.
add_project
(
project
.
name
)
expect
(
operation
).
to
have_project_card
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