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
Léo-Paul Géneau
gitlab-ce
Commits
80bda874
Commit
80bda874
authored
May 16, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests
parent
5c4416bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
spec/features/issues/move_spec.rb
spec/features/issues/move_spec.rb
+10
-5
No files found.
spec/features/issues/move_spec.rb
View file @
80bda874
...
@@ -19,7 +19,7 @@ feature 'issue move to another project' do
...
@@ -19,7 +19,7 @@ feature 'issue move to another project' do
end
end
scenario
'moving issue to another project not allowed'
do
scenario
'moving issue to another project not allowed'
do
expect
(
page
).
to
have_no_select
(
'
move_to_project_id'
)
expect
(
page
).
to
have_no_select
or
(
'#
move_to_project_id'
)
end
end
end
end
...
@@ -37,7 +37,7 @@ feature 'issue move to another project' do
...
@@ -37,7 +37,7 @@ feature 'issue move to another project' do
end
end
scenario
'moving issue to another project'
do
scenario
'moving issue to another project'
do
select
(
new_project
.
name_with_namespace
,
from:
'move_to_project_id'
)
first
(
'#move_to_project_id'
,
visible:
false
).
set
(
new_project
.
id
)
click_button
(
'Save changes'
)
click_button
(
'Save changes'
)
expect
(
current_url
).
to
include
project_path
(
new_project
)
expect
(
current_url
).
to
include
project_path
(
new_project
)
...
@@ -47,14 +47,19 @@ feature 'issue move to another project' do
...
@@ -47,14 +47,19 @@ feature 'issue move to another project' do
expect
(
page
).
to
have_content
(
issue
.
title
)
expect
(
page
).
to
have_content
(
issue
.
title
)
end
end
context
'projects user does not have permission to move issue to exist'
do
context
'projects user does not have permission to move issue to exist'
,
js:
true
do
let!
(
:private_project
)
{
create
(
:project
,
:private
)
}
let!
(
:private_project
)
{
create
(
:project
,
:private
)
}
let
(
:another_project
)
{
create
(
:project
)
}
let
(
:another_project
)
{
create
(
:project
)
}
background
{
another_project
.
team
<<
[
user
,
:guest
]
}
background
{
another_project
.
team
<<
[
user
,
:guest
]
}
scenario
'browsing projects in projects select'
do
scenario
'browsing projects in projects select'
do
options
=
[
''
,
'No project'
,
new_project
.
name_with_namespace
]
options
=
[
''
,
'No project'
,
new_project
.
name_with_namespace
]
expect
(
page
).
to
have_select
(
'move_to_project_id'
,
options:
options
)
click_link
'Select project'
page
.
within
'.select2-results'
do
expect
(
page
).
to
have_content
'No project'
expect
(
page
).
to
have_content
new_project
.
name_with_namespace
end
end
end
end
end
...
@@ -65,7 +70,7 @@ feature 'issue move to another project' do
...
@@ -65,7 +70,7 @@ feature 'issue move to another project' do
end
end
scenario
'user wants to move issue that has already been moved'
do
scenario
'user wants to move issue that has already been moved'
do
expect
(
page
).
to
have_no_select
(
'
move_to_project_id'
)
expect
(
page
).
to
have_no_select
or
(
'#
move_to_project_id'
)
end
end
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