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
fe6e2b98
Commit
fe6e2b98
authored
Sep 01, 2021
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify that Incidents were visible for guest users as well
parent
605796d6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
13 deletions
+29
-13
spec/features/issues/form_spec.rb
spec/features/issues/form_spec.rb
+29
-13
No files found.
spec/features/issues/form_spec.rb
View file @
fe6e2b98
...
...
@@ -13,12 +13,17 @@ RSpec.describe 'New/edit issue', :js do
let_it_be
(
:label2
)
{
create
(
:label
,
project:
project
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
,
assignees:
[
user
],
milestone:
milestone
)
}
before
do
stub_licensed_features
(
multiple_issue_assignees:
false
,
issue_weights:
false
)
let
(
:current_user
)
{
user
}
before_all
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user2
)
sign_in
(
user
)
end
before
do
stub_licensed_features
(
multiple_issue_assignees:
false
,
issue_weights:
false
)
sign_in
(
current_user
)
end
describe
'new issue'
do
...
...
@@ -234,24 +239,35 @@ RSpec.describe 'New/edit issue', :js do
end
describe
'displays issue type options in the dropdown'
do
shared_examples
'type option is visible'
do
|
label
:,
identifier
:|
it
"shows
#{
identifier
}
option"
,
:aggregate_failures
do
page
.
within
(
'[data-testid="issue-type-select-dropdown"]'
)
do
expect
(
page
).
to
have_selector
(
%([data-testid="issue-type-#{identifier}-icon"])
)
expect
(
page
).
to
have_content
(
label
)
end
end
end
before
do
page
.
within
(
'.issue-form'
)
do
click_button
'Issue'
end
end
it
'correctly displays the Issue type option with an icon'
,
:aggregate_failures
do
page
.
within
(
'[data-testid="issue-type-select-dropdown"]'
)
do
expect
(
page
).
to
have_selector
(
'[data-testid="issue-type-issue-icon"]'
)
expect
(
page
).
to
have_content
(
'Issue'
)
end
end
it_behaves_like
'type option is visible'
,
label:
'Issue'
,
identifier: :issue
it_behaves_like
'type option is visible'
,
label:
'Incident'
,
identifier: :incident
it
'correctly displays the Incident type option with an icon'
,
:aggregate_failures
do
page
.
within
(
'[data-testid="issue-type-select-dropdown"]'
)
do
expect
(
page
).
to
have_selector
(
'[data-testid="issue-type-incident-icon"]'
)
expect
(
page
).
to
have_content
(
'Incident'
)
context
'when user is guest'
do
let_it_be
(
:guest
)
{
create
(
:user
)
}
let
(
:current_user
)
{
guest
}
before_all
do
project
.
add_guest
(
guest
)
end
it_behaves_like
'type option is visible'
,
label:
'Issue'
,
identifier: :issue
it_behaves_like
'type option is visible'
,
label:
'Incident'
,
identifier: :incident
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