diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-05-26 21:28:01 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-05-26 21:28:01 +0300 |
commit | 1a848d835447fb0b0948dac6751a947643bdeb3a (patch) | |
tree | 80892571397061b3077de88d36f4d0a103f3e63b /spec/features | |
parent | 9bdfc98242f6fa039b73f47e6105faded1027eb1 (diff) | |
parent | 50a16c4bd75307f05bcffa4d1231872a1346ae6e (diff) |
Merge branch 'move-project-dropdown-async' into 'master'
Loads move issue dropdown async
To keep the style of the dropdown the same as the other dropdowns in the issue form, it uses select2 rather than our new dropdowns.
![dropdown](/uploads/e80d5f48440b2a49fd3ac13e74c1ba55/dropdown.gif)
Closes #16563
See merge request !4160
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/issues/move_spec.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/spec/features/issues/move_spec.rb b/spec/features/issues/move_spec.rb index 84c8e20ebaa..c7019c5aea1 100644 --- a/spec/features/issues/move_spec.rb +++ b/spec/features/issues/move_spec.rb @@ -19,7 +19,7 @@ feature 'issue move to another project' do end scenario 'moving issue to another project not allowed' do - expect(page).to have_no_select('move_to_project_id') + expect(page).to have_no_selector('#move_to_project_id') end end @@ -37,7 +37,7 @@ feature 'issue move to another project' do end 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') expect(current_url).to include project_path(new_project) @@ -47,14 +47,18 @@ feature 'issue move to another project' do expect(page).to have_content(issue.title) end - context 'projects user does not have permission to move issue to exist' do + context 'user does not have permission to move the issue to a project', js: true do let!(:private_project) { create(:project, :private) } let(:another_project) { create(:project) } background { another_project.team << [user, :guest] } scenario 'browsing projects in projects select' do - 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 @@ -65,7 +69,7 @@ feature 'issue move to another project' do end 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_selector('#move_to_project_id') end end end |