Commit 3bc20202 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'close-revoke-deploy-token-modal-on-escape-keypress' into 'master'

Close revoke deploy token modal on escape keypress

See merge request gitlab-org/gitlab-ce!20347
parents a43b7d4a 6af7397f
.modal{ id: "revoke-modal-#{token.id}" } .modal{ id: "revoke-modal-#{token.id}", tabindex: -1 }
.modal-dialog .modal-dialog
.modal-content .modal-content
.modal-header .modal-header
......
---
title: Close revoke deploy token modal on escape keypress
merge_request: 20347
author: George Tsiolis
type: changed
require 'rails_helper'
describe 'Repository Settings > User sees revoke deploy token modal', :js do
let(:project) { create(:project, :public, :repository) }
let(:user) { project.creator }
let(:role) { :developer }
let!(:deploy_token) { create(:deploy_token, :gitlab_deploy_token, projects: [project]) }
before do
project.add_role(user, role)
sign_in(user)
visit(project_settings_repository_path(project))
click_link('Revoke')
end
it 'shows the revoke deploy token modal' do
expect(page).to have_content('You are about to revoke')
end
it 'closes the revoke deploy token modal with escape keypress' do
find('.modal.show').send_keys(:escape)
expect(page).not_to have_content('You are about to revoke')
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment