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
02b1a1f4
Commit
02b1a1f4
authored
Apr 15, 2019
by
Felipe Artur
Committed by
Robert Speicher
Apr 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract EE specific files/lines for spec/features/issues
Part of moving gitlab into single codebase
parent
7ee640ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
110 deletions
+98
-110
ee/spec/features/issues/user_uses_quick_actions_spec.rb
ee/spec/features/issues/user_uses_quick_actions_spec.rb
+96
-0
spec/features/issues/user_uses_quick_actions_spec.rb
spec/features/issues/user_uses_quick_actions_spec.rb
+2
-110
No files found.
ee/spec/features/issues/user_uses_quick_actions_spec.rb
0 → 100644
View file @
02b1a1f4
# frozen_string_literal: true
require
'rails_helper'
describe
'Issues > User uses quick actions'
,
:js
do
include
Spec
::
Support
::
Helpers
::
Features
::
NotesHelpers
describe
'issue-only commands'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
before
do
project
.
add_maintainer
(
user
)
sign_in
(
user
)
visit
project_issue_path
(
project
,
issue
)
end
after
do
wait_for_requests
end
describe
'adding a weight from a note'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
context
'when the user can update the weight'
do
it
'does not create a note, and sets the weight accordingly'
do
add_note
(
"/weight 5"
)
expect
(
page
).
not_to
have_content
'/weight 5'
expect
(
page
).
to
have_content
'Commands applied'
issue
.
reload
expect
(
issue
.
weight
).
to
eq
(
5
)
end
end
context
'when the current user cannot update the weight'
do
let
(
:guest
)
{
create
(
:user
)
}
before
do
project
.
add_guest
(
guest
)
gitlab_sign_out
sign_in
(
guest
)
visit
project_issue_path
(
project
,
issue
)
end
it
'does not create a note or set the weight'
do
add_note
(
"/weight 5"
)
expect
(
page
).
not_to
have_content
'Commands applied'
issue
.
reload
expect
(
issue
.
weight
).
not_to
eq
(
5
)
end
end
end
describe
'removing weight from a note'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
weight:
1
)
}
context
'when the user can update the weight'
do
it
'does not create a note, and removes the weight accordingly'
do
add_note
(
"/clear_weight"
)
expect
(
page
).
not_to
have_content
'/clear_weight'
expect
(
page
).
to
have_content
'Commands applied'
issue
.
reload
expect
(
issue
.
weight
).
to
eq
(
nil
)
end
end
context
'when the current user cannot update the weight'
do
let
(
:guest
)
{
create
(
:user
)
}
before
do
project
.
add_guest
(
guest
)
gitlab_sign_out
sign_in
(
guest
)
visit
project_issue_path
(
project
,
issue
)
end
it
'does create a note or set the weight'
do
add_note
(
"/clear_weight"
)
expect
(
page
).
not_to
have_content
'Commands applied'
issue
.
reload
expect
(
issue
.
weight
).
to
eq
(
1
)
end
end
end
end
end
spec/features/issues/user_uses_quick_actions_spec.rb
View file @
02b1a1f4
# frozen_string_literal: true
require
'rails_helper'
describe
'Issues > User uses quick actions'
,
:js
do
...
...
@@ -62,116 +64,6 @@ describe 'Issues > User uses quick actions', :js do
it_behaves_like
'create_merge_request quick action'
it_behaves_like
'due quick action'
describe
'adding a weight from a note'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
context
'when the user can update the weight'
do
it
'does not create a note, and sets the weight accordingly'
do
add_note
(
"/weight 5"
)
expect
(
page
).
not_to
have_content
'/weight 5'
expect
(
page
).
to
have_content
'Commands applied'
issue
.
reload
expect
(
issue
.
weight
).
to
eq
(
5
)
end
end
context
'when the current user cannot update the weight'
do
let
(
:guest
)
{
create
(
:user
)
}
before
do
project
.
add_guest
(
guest
)
gitlab_sign_out
sign_in
(
guest
)
visit
project_issue_path
(
project
,
issue
)
end
it
'does not create a note or set the weight'
do
add_note
(
"/weight 5"
)
expect
(
page
).
not_to
have_content
'Commands applied'
issue
.
reload
expect
(
issue
.
weight
).
not_to
eq
(
5
)
end
end
end
describe
'removing weight from a note'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
weight:
1
)
}
context
'when the user can update the weight'
do
it
'does not create a note, and removes the weight accordingly'
do
add_note
(
"/clear_weight"
)
expect
(
page
).
not_to
have_content
'/clear_weight'
expect
(
page
).
to
have_content
'Commands applied'
issue
.
reload
expect
(
issue
.
weight
).
to
eq
(
nil
)
end
end
context
'when the current user cannot update the weight'
do
let
(
:guest
)
{
create
(
:user
)
}
before
do
project
.
add_guest
(
guest
)
gitlab_sign_out
sign_in
(
guest
)
visit
project_issue_path
(
project
,
issue
)
end
it
'does create a note or set the weight'
do
add_note
(
"/clear_weight"
)
expect
(
page
).
not_to
have_content
'Commands applied'
issue
.
reload
expect
(
issue
.
weight
).
to
eq
(
1
)
end
end
end
describe
'mark issue as duplicate'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:original_issue
)
{
create
(
:issue
,
project:
project
)
}
context
'when the current user can update issues'
do
it
'does not create a note, and marks the issue as a duplicate'
do
add_note
(
"/duplicate #
#{
original_issue
.
to_reference
}
"
)
expect
(
page
).
not_to
have_content
"/duplicate
#{
original_issue
.
to_reference
}
"
expect
(
page
).
to
have_content
'Commands applied'
expect
(
page
).
to
have_content
"marked this issue as a duplicate of
#{
original_issue
.
to_reference
}
"
expect
(
issue
.
reload
).
to
be_closed
end
end
context
'when the current user cannot update the issue'
do
let
(
:guest
)
{
create
(
:user
)
}
before
do
project
.
add_guest
(
guest
)
gitlab_sign_out
sign_in
(
guest
)
visit
project_issue_path
(
project
,
issue
)
end
it
'does not create a note, and does not mark the issue as a duplicate'
do
add_note
(
"/duplicate #
#{
original_issue
.
to_reference
}
"
)
expect
(
page
).
not_to
have_content
'Commands applied'
expect
(
page
).
not_to
have_content
"marked this issue as a duplicate of
#{
original_issue
.
to_reference
}
"
expect
(
issue
.
reload
).
to
be_open
end
end
end
describe
'move the issue to another project'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
...
...
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