Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Schembri <jamie@schembri.me>2018-07-06 17:14:31 +0300
committerJamie Schembri <jamie@schembri.me>2018-07-06 17:20:44 +0300
commitb40c468b35ecdbef8be490ec0933afb253fad0c6 (patch)
treef10d1fbbb335cf559476a5ddea2406a8a668984e /spec/features/projects/settings/user_transfers_a_project_spec.rb
parentb14b31b819f0f09d73e001a80acd528aad913dc9 (diff)
Fix #48934 - Focus on text input on danger confirmation
Diffstat (limited to 'spec/features/projects/settings/user_transfers_a_project_spec.rb')
-rw-r--r--spec/features/projects/settings/user_transfers_a_project_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/features/projects/settings/user_transfers_a_project_spec.rb b/spec/features/projects/settings/user_transfers_a_project_spec.rb
index 96b7cf1f93b..2fdbc04fa62 100644
--- a/spec/features/projects/settings/user_transfers_a_project_spec.rb
+++ b/spec/features/projects/settings/user_transfers_a_project_spec.rb
@@ -10,7 +10,7 @@ describe 'Projects > Settings > User transfers a project', :js do
sign_in(user)
end
- def transfer_project(project, group)
+ def transfer_project(project, group, confirm: true)
visit edit_project_path(project)
page.within('.js-project-transfer-form') do
@@ -21,6 +21,8 @@ describe 'Projects > Settings > User transfers a project', :js do
click_button('Transfer project')
+ return unless confirm
+
fill_in 'confirm_name_input', with: project.name
click_button 'Confirm'
@@ -28,6 +30,11 @@ describe 'Projects > Settings > User transfers a project', :js do
wait_for_requests
end
+ it 'focuses on the confirmation field' do
+ transfer_project(project, group, confirm: false)
+ expect(page).to have_selector '#confirm_name_input:focus'
+ end
+
it 'allows transferring a project to a group' do
old_path = project_path(project)
transfer_project(project, group)