diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-05-24 05:31:50 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-05-24 05:31:50 +0000 |
commit | c52db71e36ee70c4c5be80b029cf4362f28e3667 (patch) | |
tree | f74649e6ce527b40a7b9ceef6be6c27336fa6ec3 /spec | |
parent | 6c51e220ef2774447038a909c4f22ff90eb624fb (diff) | |
parent | 7af283c74d6bc36d2d3a963ddc4b831e9e1e8a98 (diff) | |
download | gitlab-ce-c52db71e36ee70c4c5be80b029cf4362f28e3667.tar.gz |
Merge branch '45850-close-mr-checkout-modal-on-escape' into 'master'
Resolve "Escape key to close MR check out branch modal"
Closes #45850
See merge request gitlab-org/gitlab-ce!19050
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
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 |