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
...
@@ -12,16 +12,16 @@ module QA
end
end
end
end
let
(
:project_with_
tag
)
do
let
(
:project_with_
success_run
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project-with-
tag
'
project
.
name
=
'project-with-
success-run
'
project
.
group
=
group
project
.
group
=
group
end
end
end
end
let
(
:project_with
out_tag
)
do
let
(
:project_with
_pending_run
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project-with
out-tag
'
project
.
name
=
'project-with
-pending-run
'
project
.
group
=
group
project
.
group
=
group
end
end
end
end
...
@@ -50,6 +50,7 @@ module QA
...
@@ -50,6 +50,7 @@ module QA
after
do
after
do
runner
.
remove_via_api!
runner
.
remove_via_api!
remove_projects
end
end
it
'has many pipelines with appropriate statuses'
do
it
'has many pipelines with appropriate statuses'
do
...
@@ -57,25 +58,28 @@ module QA
...
@@ -57,25 +58,28 @@ module QA
EE
::
Page
::
OperationsDashboard
.
perform
do
|
operation
|
EE
::
Page
::
OperationsDashboard
.
perform
do
|
operation
|
{
{
'project-with-
tag
'
=>
'passed'
,
'project-with-
success-run
'
=>
'passed'
,
'project-with-failed-run'
=>
'failed'
,
'project-with-failed-run'
=>
'failed'
,
'project-with
out-tag
'
=>
'pending'
,
'project-with
-pending-run
'
=>
'pending'
,
'project-without-ci'
=>
nil
'project-without-ci'
=>
nil
}.
each
do
|
project_name
,
status
|
}.
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'
pipeline_status
=
operation
.
pipeline_status
(
project
)
expect
(
project
).
to
have_content
(
'The branch for this project has no active pipeline configuration.'
)
pipeline_status
!=
'running'
next
end
end
# Since `Support::Waiter.wait_until` would raise a `WaitExceededError` exception if the pipeline status
expect
(
pipeline_status
).
to
eq
(
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
}
end
end
end
end
remove_projects
end
end
private
private
...
@@ -89,13 +93,13 @@ module QA
...
@@ -89,13 +93,13 @@ module QA
end
end
def
setup_projects
def
setup_projects
commit_ci_file
(
project_with_
tag
,
ci_file_with_tag
)
commit_ci_file
(
project_with_
success_run
,
ci_file_with_tag
)
commit_ci_file
(
project_with
out_tag
,
ci_file_without
_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_failed_run
,
ci_file_failed_run
)
end
end
def
add_projects_to_board
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
|
EE
::
Page
::
OperationsDashboard
.
perform
do
|
operation
|
operation
.
add_project
(
project
.
name
)
operation
.
add_project
(
project
.
name
)
...
@@ -107,7 +111,6 @@ module QA
...
@@ -107,7 +111,6 @@ module QA
def
remove_projects
def
remove_projects
EE
::
Page
::
OperationsDashboard
.
perform
do
|
operation
|
EE
::
Page
::
OperationsDashboard
.
perform
do
|
operation
|
operation
.
remove_all_projects
operation
.
remove_all_projects
expect
(
operation
).
not_to
have_project_card
end
end
end
end
...
@@ -122,11 +125,12 @@ module QA
...
@@ -122,11 +125,12 @@ module QA
}
}
end
end
def
ci_file_without_tag
def
ci_file_without_
existing_
tag
{
{
file_path:
'.gitlab-ci.yml'
,
file_path:
'.gitlab-ci.yml'
,
content:
<<~
YAML
content:
<<~
YAML
test-pending:
test-pending:
tags: ['does-not-exist']
script: echo 'OK'
script: echo 'OK'
YAML
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