summaryrefslogtreecommitdiff
path: root/spec/features/dashboard
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2017-08-07 20:55:50 +0000
committerClement Ho <clemmakesapps@gmail.com>2017-08-07 20:55:50 +0000
commit0532bff6d41fd3c685c88622f34fa726f171568a (patch)
tree6c2f1cc5abe0bfdcc8ebe21896f3f5ff4c0b9f1a /spec/features/dashboard
parent5f30350c5b2482f72e221cce33ebd66919fcd6b4 (diff)
downloadgitlab-ce-0532bff6d41fd3c685c88622f34fa726f171568a.tar.gz
Group-level new issue & MR using previously selected project
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r--spec/features/dashboard/issues_spec.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/spec/features/dashboard/issues_spec.rb b/spec/features/dashboard/issues_spec.rb
index be6f78ee607..795335aa106 100644
--- a/spec/features/dashboard/issues_spec.rb
+++ b/spec/features/dashboard/issues_spec.rb
@@ -79,12 +79,21 @@ RSpec.describe 'Dashboard Issues' do
end
end
- it 'shows the new issue page', :js do
+ it 'shows the new issue page', js: true do
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")
+ project_path = "/#{project.path_with_namespace}"
+ project_json = { name: project.name_with_namespace, url: project_path }.to_json
+
+ # similate selection, and prevent overlap by dropdown menu
+ execute_script("$('.project-item-select').val('#{project_json}').trigger('change');")
+ execute_script("$('#select2-drop-mask').remove();")
+
+ find('.new-project-item-link').trigger('click')
+
+ expect(page).to have_current_path("#{project_path}/issues/new")
page.within('#content-body') do
expect(page).to have_selector('.issue-form')