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
7e457277
Commit
7e457277
authored
Feb 05, 2021
by
mfluharty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganize licensed vs unlicensed tests
Explicitly stub licensed feature Remove unecessary wait_for_requests's
parent
4b8eb0fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
26 deletions
+30
-26
ee/spec/features/projects/pipelines/pipeline_spec.rb
ee/spec/features/projects/pipelines/pipeline_spec.rb
+30
-26
No files found.
ee/spec/features/projects/pipelines/pipeline_spec.rb
View file @
7e457277
...
...
@@ -169,15 +169,39 @@ RSpec.describe 'Pipeline', :js do
describe
'GET /:project/pipelines/:id/codequality_report'
,
:aggregate_failures
do
shared_examples_for
'full codequality report'
do
context
'w
ith no code quality artifact
'
do
context
'w
hen licensed
'
do
before
do
create
(
:ee_ci_build
,
pipeline:
pipeline
)
visit
project_pipeline_path
(
project
,
pipeline
)
stub_licensed_features
(
full_codequality_report:
true
)
end
it
'does not show code quality tab'
do
expect
(
page
).
not_to
have_content
(
'Code Quality'
)
expect
(
page
).
not_to
have_css
(
'#js-tab-codequality'
)
context
'with code quality artifact'
do
before
do
create
(
:ee_ci_build
,
:codequality
,
pipeline:
pipeline
)
visit
codequality_report_project_pipeline_path
(
project
,
pipeline
)
end
it
'shows code quality tab pane as active, quality issue with link to file, and events for data tracking'
do
expect
(
page
).
to
have_content
(
'Code Quality'
)
expect
(
page
).
to
have_css
(
'#js-tab-codequality'
)
expect
(
page
).
to
have_content
(
'Method `new_array` has 12 arguments (exceeds 4 allowed). Consider refactoring.'
)
expect
(
find_link
(
'foo.rb:10'
)[
:href
]).
to
end_with
(
project_blob_path
(
project
,
File
.
join
(
pipeline
.
commit
.
id
,
'foo.rb'
))
+
'#L10'
)
expect
(
page
).
to
have_selector
(
'[data-track-event="click_button"]'
)
expect
(
page
).
to
have_selector
(
'[data-track-label="get_codequality_report"]'
)
end
end
context
'with no code quality artifact'
do
before
do
create
(
:ee_ci_build
,
pipeline:
pipeline
)
visit
project_pipeline_path
(
project
,
pipeline
)
end
it
'does not show code quality tab'
do
expect
(
page
).
not_to
have_content
(
'Code Quality'
)
expect
(
page
).
not_to
have_css
(
'#js-tab-codequality'
)
end
end
end
...
...
@@ -187,7 +211,6 @@ RSpec.describe 'Pipeline', :js do
create
(
:ee_ci_build
,
:codequality
,
pipeline:
pipeline
)
visit
project_pipeline_path
(
project
,
pipeline
)
wait_for_requests
end
it
'does not show code quality tab'
do
...
...
@@ -195,25 +218,6 @@ RSpec.describe 'Pipeline', :js do
expect
(
page
).
not_to
have_css
(
'#js-tab-codequality'
)
end
end
context
'with code quality artifact'
do
before
do
create
(
:ee_ci_build
,
:codequality
,
pipeline:
pipeline
)
visit
codequality_report_project_pipeline_path
(
project
,
pipeline
)
wait_for_requests
end
it
'shows code quality tab pane as active, quality issue with link to file, and events for data tracking'
do
expect
(
page
).
to
have_content
(
'Code Quality'
)
expect
(
page
).
to
have_css
(
'#js-tab-codequality'
)
expect
(
page
).
to
have_content
(
'Method `new_array` has 12 arguments (exceeds 4 allowed). Consider refactoring.'
)
expect
(
find_link
(
'foo.rb:10'
)[
:href
]).
to
end_with
(
project_blob_path
(
project
,
File
.
join
(
pipeline
.
commit
.
id
,
'foo.rb'
))
+
'#L10'
)
expect
(
page
).
to
have_selector
(
'[data-track-event="click_button"]'
)
expect
(
page
).
to
have_selector
(
'[data-track-label="get_codequality_report"]'
)
end
end
end
context
'for a branch pipeline'
do
...
...
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