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
ce44964b
Commit
ce44964b
authored
Aug 04, 2020
by
Tiffany Rea
Committed by
Mark Lapierre
Aug 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve pipeline_status_on_operation_dashboard_spec.rb flakiness
parent
2fb63ac4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
20 deletions
+24
-20
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
+24
-20
No files found.
qa/qa/specs/features/ee/browser_ui/4_verify/pipeline_status_on_operation_dashboard_spec.rb
View file @
ce44964b
...
...
@@ -12,16 +12,16 @@ module QA
end
end
let
(
:project_with_
tag
)
do
let
(
:project_with_
success_run
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project-with-
tag
'
project
.
name
=
'project-with-
success-run
'
project
.
group
=
group
end
end
let
(
:project_with
out_tag
)
do
let
(
:project_with
_pending_run
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project-with
out-tag
'
project
.
name
=
'project-with
-pending-run
'
project
.
group
=
group
end
end
...
...
@@ -50,6 +50,7 @@ module QA
after
do
runner
.
remove_via_api!
remove_projects
end
it
'has many pipelines with appropriate statuses'
do
...
...
@@ -57,25 +58,28 @@ module QA
EE
::
Page
::
OperationsDashboard
.
perform
do
|
operation
|
{
'project-with-
tag
'
=>
'passed'
,
'project-with-
success-run
'
=>
'passed'
,
'project-with-failed-run'
=>
'failed'
,
'project-with
out-tag
'
=>
'pending'
,
'project-with
-pending-run
'
=>
'pending'
,
'project-without-ci'
=>
nil
}.
each
do
|
project_name
,
status
|
project
=
operation
.
find_project_card_by_name
(
project_name
)
pipeline_status
=
nil
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
if
project_name
==
'project-without-ci'
expect
(
project
).
to
have_content
(
'The branch for this project has no active pipeline configuration.'
)
next
pipeline_status
=
operation
.
pipeline_status
(
project
)
pipeline_status
!=
'running'
end
# Since `Support::Waiter.wait_until` would raise a `WaitExceededError` exception if the pipeline status
# isn't the one we expect after 60 seconds, we don't need an explicit expectation.
Support
::
Waiter
.
wait_until
{
operation
.
pipeline_status
(
project
)
==
status
}
expect
(
pipeline_status
).
to
eq
(
status
)
end
end
remove_projects
end
private
...
...
@@ -89,13 +93,13 @@ module QA
end
def
setup_projects
commit_ci_file
(
project_with_
tag
,
ci_file_with_tag
)
commit_ci_file
(
project_with
out_tag
,
ci_file_without
_tag
)
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
)
end
def
add_projects_to_board
[
project_with_
tag
,
project_without_tag
,
project_without_ci
,
project_with_failed_run
].
each
do
|
project
|
[
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
)
...
...
@@ -107,7 +111,6 @@ module QA
def
remove_projects
EE
::
Page
::
OperationsDashboard
.
perform
do
|
operation
|
operation
.
remove_all_projects
expect
(
operation
).
not_to
have_project_card
end
end
...
...
@@ -122,11 +125,12 @@ module QA
}
end
def
ci_file_without_tag
def
ci_file_without_
existing_
tag
{
file_path:
'.gitlab-ci.yml'
,
content:
<<~
YAML
test-pending:
tags: ['does-not-exist']
script: echo 'OK'
YAML
}
...
...
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