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
This commit is contained in:
commit
c52db71e36
3 changed files with 30 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
#modal_merge_info.modal
|
||||
#modal_merge_info.modal{ tabindex: '-1' }
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Closes MR check out branch modal with escape
|
||||
merge_request: Jacopo Beschi @jacopo-beschi
|
||||
author: 19050
|
||||
type: added
|
|
@ -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
|
Loading…
Reference in a new issue