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
39aa3d86
Commit
39aa3d86
authored
Mar 23, 2021
by
peterhegman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply reviewer feedback
Add spec for when Auditor is part of the project
parent
3032eef8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
ee/spec/features/issues/user_sees_empty_state_spec.rb
ee/spec/features/issues/user_sees_empty_state_spec.rb
+20
-6
No files found.
ee/spec/features/issues/user_sees_empty_state_spec.rb
View file @
39aa3d86
...
...
@@ -2,21 +2,35 @@
require
'spec_helper'
RSpec
.
describe
'Issues
> User sees empty state
'
do
RSpec
.
describe
'Issues'
do
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:auditor
)
{
create
(
:user
,
auditor:
true
)
}
shared_examples
'empty state'
do
|
expect_button
|
it
"shows empty state
#{
expect_button
?
'with'
:
'without'
}
\"
New issue
\"
button"
do
visit
project_issues_path
(
project
)
expect
(
page
).
to
have_content
(
'The Issue Tracker is the place to add things that need to be improved or solved in a project'
)
expect
(
page
).
to
have_content
(
'Issues can be bugs, tasks or ideas to be discussed. Also, issues are searchable and filterable.'
)
expect
(
page
.
has_link?
(
'New issue'
)).
to
be
(
expect_button
)
end
end
context
'when signed in user is an Auditor'
do
before
do
sign_in
(
auditor
)
end
it
'shows empty state without "New issue" button'
do
visit
project_issues_path
(
project
)
context
'when user is not a member of the project'
do
it_behaves_like
'empty state'
,
false
end
expect
(
page
).
to
have_content
(
'The Issue Tracker is the place to add things that need to be improved or solved in a project'
)
expect
(
page
).
to
have_content
(
'Issues can be bugs, tasks or ideas to be discussed. Also, issues are searchable and filterable.'
)
expect
(
page
).
not_to
have_link
(
'New issue'
)
context
'when user is a member of the project'
do
before
do
project
.
add_guest
(
auditor
)
end
it_behaves_like
'empty state'
,
true
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