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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
2aea7878
Commit
2aea7878
authored
Feb 19, 2019
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor/simplify Auto DevOps QA spec
parent
45927684
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
40 deletions
+19
-40
qa/qa/page/project/job/show.rb
qa/qa/page/project/job/show.rb
+13
-20
qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
...er_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
+0
-2
qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
...igure/auto_devops/create_project_with_auto_devops_spec.rb
+6
-18
No files found.
qa/qa/page/project/job/show.rb
View file @
2aea7878
...
...
@@ -4,10 +4,6 @@ module QA::Page
COMPLETED_STATUSES
=
%w[passed failed canceled blocked skipped manual]
.
freeze
# excludes created, pending, running
PASSED_STATUS
=
'passed'
.
freeze
view
'app/assets/javascripts/jobs/components/job_app.vue'
do
element
:loading_animation
end
view
'app/assets/javascripts/jobs/components/job_log.vue'
do
element
:build_trace
end
...
...
@@ -20,26 +16,13 @@ module QA::Page
element
:pipeline_path
end
def
loaded?
(
wait:
60
)
has_element?
(
:build_trace
,
wait:
wait
)
end
# Reminder: You should check #loaded? first
def
completed?
(
timeout:
60
)
wait
(
reload:
false
,
max:
timeout
)
do
COMPLETED_STATUSES
.
include?
(
status_badge
)
end
end
def
successful?
(
timeout:
60
)
raise
"Timed out waiting for the build trace to load"
unless
loaded?
raise
"Timed out waiting for the status to be a valid completed state"
unless
completed?
(
timeout:
timeout
)
# Reminder: You should check #completed? and #loaded? first
def
successful?
status_badge
==
PASSED_STATUS
end
def
trace_loading?
has_element?
(
:loading_animation
)
end
# Reminder: You may wish to wait for a particular job status before checking output
def
output
find_element
(
:build_trace
).
text
...
...
@@ -47,6 +30,16 @@ module QA::Page
private
def
loaded?
(
wait:
60
)
has_element?
(
:build_trace
,
wait:
wait
)
end
def
completed?
(
timeout:
60
)
wait
(
reload:
false
,
max:
timeout
)
do
COMPLETED_STATUSES
.
include?
(
status_badge
)
end
end
def
status_badge
find_element
(
:status_badge
).
text
end
...
...
qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
View file @
2aea7878
...
...
@@ -95,8 +95,6 @@ module QA
Page
::
Project
::
Pipeline
::
Show
.
perform
(
&
:go_to_first_job
)
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_loaded
expect
(
job
).
to
be_completed
expect
(
job
).
to
be_successful
expect
(
job
.
output
).
to
include
(
sha1sum
)
end
...
...
qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
View file @
2aea7878
...
...
@@ -73,9 +73,7 @@ module QA
pipeline
.
go_to_job
(
'build'
)
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_loaded
expect
(
job
).
to
be_completed
(
timeout:
600
)
expect
(
job
).
to
be_successful
expect
(
job
).
to
be_successful
(
timeout:
600
)
job
.
click_element
(
:pipeline_path
)
end
...
...
@@ -84,9 +82,7 @@ module QA
pipeline
.
go_to_job
(
'test'
)
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_loaded
expect
(
job
).
to
be_completed
(
timeout:
600
)
expect
(
job
).
to
be_successful
expect
(
job
).
to
be_successful
(
timeout:
600
)
job
.
click_element
(
:pipeline_path
)
end
...
...
@@ -95,9 +91,7 @@ module QA
pipeline
.
go_to_job
(
'production'
)
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_loaded
expect
(
job
).
to
be_completed
(
timeout:
1200
)
expect
(
job
).
to
be_successful
expect
(
job
).
to
be_successful
(
timeout:
1200
)
job
.
click_element
(
:pipeline_path
)
end
...
...
@@ -140,9 +134,7 @@ module QA
pipeline
.
go_to_job
(
'build'
)
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_loaded
expect
(
job
).
to
be_completed
(
timeout:
600
)
expect
(
job
).
to
be_successful
expect
(
job
).
to
be_successful
(
timeout:
600
)
job
.
click_element
(
:pipeline_path
)
end
...
...
@@ -151,9 +143,7 @@ module QA
pipeline
.
go_to_job
(
'test'
)
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_loaded
expect
(
job
).
to
be_completed
(
timeout:
600
)
expect
(
job
).
to
be_successful
expect
(
job
).
to
be_successful
(
timeout:
600
)
job
.
click_element
(
:pipeline_path
)
end
...
...
@@ -162,9 +152,7 @@ module QA
pipeline
.
go_to_job
(
'production'
)
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_loaded
expect
(
job
).
to
be_completed
(
timeout:
1200
)
expect
(
job
).
to
be_successful
expect
(
job
).
to
be_successful
(
timeout:
1200
)
job
.
click_element
(
:pipeline_path
)
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