Commit 5fdef68f authored by Jarka Kadlecova's avatar Jarka Kadlecova

Move relative_path to the element that is being clicked

parent d964816b
- if @projects.any? - if @projects.any?
.project-item-select-holder .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] = 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{ data: { relative_path: local_assigns[:path] } } %a.btn.btn-new.new-project-item-select-button
= local_assigns[:label] = local_assigns[:label]
= icon('caret-down') = icon('caret-down')
...@@ -78,5 +78,23 @@ RSpec.describe 'Dashboard Issues', feature: true do ...@@ -78,5 +78,23 @@ RSpec.describe 'Dashboard Issues', feature: true do
expect(page).not_to have_content(project_with_issues_disabled.name_with_namespace) expect(page).not_to have_content(project_with_issues_disabled.name_with_namespace)
end end
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
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment