diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-05-24 16:48:54 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-05-24 16:48:54 -0500 |
commit | cbbe6d5d55037ad62bf23e0fc40fd982d09e4100 (patch) | |
tree | 48ae6d03524197bfa856b7de2434fd9b190fb003 /spec/features | |
parent | 644246dae48889a7009cbab4d15783a301b7a269 (diff) | |
parent | ba58a66a55e2270eb46f7429e070d16f77d25b9d (diff) | |
download | gitlab-ce-cbbe6d5d55037ad62bf23e0fc40fd982d09e4100.tar.gz |
Merge branch 'master' into bootstrap4
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/merge_request/user_resolves_conflicts_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/spec/features/merge_request/user_resolves_conflicts_spec.rb b/spec/features/merge_request/user_resolves_conflicts_spec.rb index 25a57f7d379..59aa90fc86f 100644 --- a/spec/features/merge_request/user_resolves_conflicts_spec.rb +++ b/spec/features/merge_request/user_resolves_conflicts_spec.rb @@ -10,7 +10,7 @@ describe 'Merge request > User resolves conflicts', :js do end def create_merge_request(source_branch) - create(:merge_request, source_branch: source_branch, target_branch: 'conflict-start', source_project: project) do |mr| + create(:merge_request, source_branch: source_branch, target_branch: 'conflict-start', source_project: project, merge_status: :unchecked) do |mr| mr.mark_as_unmergeable end end diff --git a/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb b/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb new file mode 100644 index 00000000000..c40c720d168 --- /dev/null +++ b/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb @@ -0,0 +1,24 @@ +require 'rails_helper' + +describe 'Merge request > User sees Check out branch modal', :js do + let(:project) { create(:project, :public, :repository) } + let(:user) { project.creator } + let(:merge_request) { create(:merge_request, source_project: project) } + + before do + sign_in(user) + visit project_merge_request_path(project, merge_request) + wait_for_requests + click_button('Check out branch') + end + + it 'shows the check out branch modal' do + expect(page).to have_content('Check out, review, and merge locally') + end + + it 'closes the check out branch model with Escape keypress' do + find('#modal_merge_info').send_keys(:escape) + + expect(page).not_to have_content('Check out, review, and merge locally') + end +end |