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
Boxiang Sun
gitlab-ce
Commits
5fdef68f
Commit
5fdef68f
authored
Jul 25, 2017
by
Jarka Kadlecova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move relative_path to the element that is being clicked
parent
d964816b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
app/views/shared/_new_project_item_select.html.haml
app/views/shared/_new_project_item_select.html.haml
+2
-2
spec/features/dashboard/issues_spec.rb
spec/features/dashboard/issues_spec.rb
+18
-0
No files found.
app/views/shared/_new_project_item_select.html.haml
View file @
5fdef68f
-
if
@projects
.
any?
.project-item-select-holder
=
project_select_tag
:project_path
,
class:
"project-item-select"
,
data:
{
include_groups:
local_assigns
[
:include_groups
],
order_by:
'last_activity_at'
},
with_feature_enabled:
local_assigns
[
:with_feature_enabled
]
%a
.btn.btn-new.new-project-item-select-button
{
data:
{
relative_path:
local_assigns
[
:path
]
}
}
=
project_select_tag
:project_path
,
class:
"project-item-select"
,
data:
{
include_groups:
local_assigns
[
:include_groups
],
order_by:
'last_activity_at'
,
relative_path:
local_assigns
[
:path
]
},
with_feature_enabled:
local_assigns
[
:with_feature_enabled
]
%a
.btn.btn-new.new-project-item-select-button
=
local_assigns
[
:label
]
=
icon
(
'caret-down'
)
spec/features/dashboard/issues_spec.rb
View file @
5fdef68f
...
...
@@ -78,5 +78,23 @@ RSpec.describe 'Dashboard Issues', feature: true do
expect
(
page
).
not_to
have_content
(
project_with_issues_disabled
.
name_with_namespace
)
end
end
it
'shows the new issue page'
,
js:
true
do
Gitlab
::
Application
.
routes
.
default_url_options
=
{
host:
Capybara
.
current_session
.
server
.
host
,
port:
Capybara
.
current_session
.
server
.
port
,
protocol:
'http'
}
find
(
'.new-project-item-select-button'
).
trigger
(
'click'
)
wait_for_requests
find
(
'.select2-results li'
).
click
expect
(
page
).
to
have_current_path
(
"/
#{
project
.
path_with_namespace
}
/issues/new"
)
page
.
within
(
'#content-body'
)
do
expect
(
page
).
to
have_selector
(
'.issue-form'
)
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