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
46c91ae5
Commit
46c91ae5
authored
May 27, 2020
by
Phil Hughes
Committed by
Sean McGivern
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes broken master caused by spec in wrong file
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/219231
parent
c2a32118
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
39 deletions
+56
-39
ee/spec/features/issues/move_spec.rb
ee/spec/features/issues/move_spec.rb
+56
-0
spec/features/issues/move_spec.rb
spec/features/issues/move_spec.rb
+0
-39
No files found.
ee/spec/features/issues/move_spec.rb
0 → 100644
View file @
46c91ae5
# frozen_string_literal: true
require
'spec_helper'
describe
'issue move to another project'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:old_project
)
{
create
(
:project
,
:repository
)
}
let
(
:text
)
{
'Some issue description'
}
let
(
:issue
)
do
create
(
:issue
,
description:
text
,
project:
old_project
,
author:
user
)
end
before
do
sign_in
(
user
)
end
context
'service desk issue moved to a project with service desk disabled'
,
:js
do
let
(
:project_title
)
{
'service desk disabled project'
}
let
(
:warning_selector
)
{
'.js-alert-moved-from-service-desk-warning'
}
let
(
:namespace
)
{
create
(
:namespace
)
}
let
(
:regular_project
)
{
create
(
:project
,
title:
project_title
,
service_desk_enabled:
false
)
}
let
(
:service_desk_project
)
{
build
(
:project
,
:private
,
namespace:
namespace
,
service_desk_enabled:
true
)
}
let
(
:service_desk_issue
)
{
create
(
:issue
,
project:
service_desk_project
,
author:
::
User
.
support_bot
)
}
before
do
allow
(
::
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
allow
(
::
Gitlab
::
IncomingEmail
).
to
receive
(
:enabled?
).
and_return
(
true
)
allow
(
::
Gitlab
::
IncomingEmail
).
to
receive
(
:supports_wildcard?
).
and_return
(
true
)
regular_project
.
add_reporter
(
user
)
service_desk_project
.
add_reporter
(
user
)
visit
issue_path
(
service_desk_issue
)
find
(
'.js-move-issue'
).
click
wait_for_requests
find
(
'.js-move-issue-dropdown-item'
,
text:
project_title
).
click
find
(
'.js-move-issue-confirmation-button'
).
click
end
it
'shows an alert after being moved'
do
expect
(
page
).
to
have_content
(
'This project does not have Service Desk enabled'
)
end
it
'does not show an alert after being dismissed'
do
find
(
"
#{
warning_selector
}
.js-close"
).
click
expect
(
page
).
to
have_no_selector
(
warning_selector
)
page
.
refresh
expect
(
page
).
to
have_no_selector
(
warning_selector
)
end
end
end
spec/features/issues/move_spec.rb
View file @
46c91ae5
...
...
@@ -95,45 +95,6 @@ describe 'issue move to another project' do
expect
(
page
).
to
have_no_selector
(
'#move_to_project_id'
)
end
end
context
'service desk issue moved to a project with service desk disabled'
,
:js
do
let
(
:project_title
)
{
'service desk disabled project'
}
let
(
:warning_selector
)
{
'.js-alert-moved-from-service-desk-warning'
}
let
(
:namespace
)
{
create
(
:namespace
)
}
let
(
:regular_project
)
{
create
(
:project
,
title:
project_title
,
service_desk_enabled:
false
)
}
let
(
:service_desk_project
)
{
build
(
:project
,
:private
,
namespace:
namespace
,
service_desk_enabled:
true
)
}
let
(
:service_desk_issue
)
{
create
(
:issue
,
project:
service_desk_project
,
author:
::
User
.
support_bot
)
}
before
do
allow
(
::
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
allow
(
::
Gitlab
::
IncomingEmail
).
to
receive
(
:enabled?
).
and_return
(
true
)
allow
(
::
Gitlab
::
IncomingEmail
).
to
receive
(
:supports_wildcard?
).
and_return
(
true
)
regular_project
.
add_reporter
(
user
)
service_desk_project
.
add_reporter
(
user
)
visit
issue_path
(
service_desk_issue
)
find
(
'.js-move-issue'
).
click
wait_for_requests
find
(
'.js-move-issue-dropdown-item'
,
text:
project_title
).
click
find
(
'.js-move-issue-confirmation-button'
).
click
end
it
'shows an alert after being moved'
do
expect
(
page
).
to
have_content
(
'This project does not have Service Desk enabled'
)
end
it
'does not show an alert after being dismissed'
do
find
(
"
#{
warning_selector
}
.js-close"
).
click
expect
(
page
).
to
have_no_selector
(
warning_selector
)
page
.
refresh
expect
(
page
).
to
have_no_selector
(
warning_selector
)
end
end
end
def
issue_path
(
issue
)
...
...
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