diff options
author | Phil Hughes <me@iamphill.com> | 2016-05-16 17:17:40 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-05-16 17:17:40 +0100 |
commit | 80bda87424c149a3ab301cdca4500c0f236c38bd (patch) | |
tree | 34c2e52f692deb74e63215dd2837e19d063607e2 /spec | |
parent | 5c4416bb45c2c61e99517c594cdd3b8dea1dc829 (diff) | |
download | gitlab-ce-80bda87424c149a3ab301cdca4500c0f236c38bd.tar.gz |
Updated tests
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues/move_spec.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/spec/features/issues/move_spec.rb b/spec/features/issues/move_spec.rb index 84c8e20ebaa..ebf039817dd 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,19 @@ 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 'projects user does not have permission to move issue to exist', 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 +70,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 |