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
Boxiang Sun
gitlab-ce
Commits
7380ed30
Commit
7380ed30
authored
Dec 13, 2018
by
Tristan Read
Committed by
Peter Leitzen
Jan 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add view and feature test for error tracking settings
parent
0c1d6be1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
0 deletions
+79
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-0
spec/features/projects/settings/operations_settings_spec.rb
spec/features/projects/settings/operations_settings_spec.rb
+39
-0
spec/views/projects/settings/operations/show.html.haml_spec.rb
...views/projects/settings/operations/show.html.haml_spec.rb
+39
-0
No files found.
app/helpers/projects_helper.rb
View file @
7380ed30
...
@@ -549,6 +549,7 @@ module ProjectsHelper
...
@@ -549,6 +549,7 @@ module ProjectsHelper
services#edit
services#edit
repository#show
repository#show
ci_cd#show
ci_cd#show
operations#show
badges#index
badges#index
pages#show
pages#show
]
]
...
...
spec/features/projects/settings/operations_settings_spec.rb
0 → 100644
View file @
7380ed30
# frozen_string_literal: true
require
'spec_helper'
describe
'Projects > Settings > For a forked project'
,
:js
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:role
)
{
:maintainer
}
before
do
stub_feature_flags
(
error_tracking:
true
)
sign_in
(
user
)
project
.
add_role
(
user
,
role
)
end
describe
'Sidebar > Operations'
do
context
'when sidebar feature flag enabled'
do
it
'renders the settings link in the sidebar'
do
visit
project_path
(
project
)
wait_for_requests
expect
(
page
).
to
have_selector
(
'a[title="Operations"]'
,
visible:
false
)
end
end
context
'when sidebar feature flag disabled'
do
before
do
stub_feature_flags
(
error_tracking:
false
)
end
it
'does not render the settings link in the sidebar'
do
visit
project_path
(
project
)
wait_for_requests
expect
(
page
).
not_to
have_selector
(
'a[title="Operations"]'
,
visible:
false
)
end
end
end
end
spec/views/projects/settings/operations/show.html.haml_spec.rb
0 → 100644
View file @
7380ed30
# frozen_string_literal: true
require
'spec_helper'
require
'rails_helper'
describe
'projects/settings/operations/show'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
assign
:project
,
project
end
describe
'Operations > Error Tracking'
do
before
do
stub_feature_flags
(
error_tracking:
true
)
project
.
add_reporter
(
user
)
allow
(
view
).
to
receive
(
:error_tracking_setting
)
.
and_return
(
error_tracking_setting
)
allow
(
view
).
to
receive
(
:current_user
).
and_return
(
user
)
end
let!
(
:error_tracking_setting
)
do
create
(
:project_error_tracking_setting
,
project:
project
)
end
context
'Settings page '
do
it
'renders the Operations Settings page'
do
render
expect
(
rendered
).
to
have_content
_
(
'Error Tracking'
)
expect
(
rendered
).
to
have_content
_
(
'To link Sentry to GitLab, enter your Sentry URL and Auth Token'
)
expect
(
rendered
).
to
have_content
_
(
'Active'
)
end
end
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