summaryrefslogtreecommitdiff
path: root/spec/features/profiles
diff options
context:
space:
mode:
authorShah El-Rahman <selrahman@gitlab.com>2018-04-06 09:36:22 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-04-06 09:36:22 +0000
commit43ef375e084884ed4260ac9c9de8f601d5594c90 (patch)
treeb5214f9deb9f389e5428f5c011b9c7cbfc55d506 /spec/features/profiles
parentca330f7ea30b368b928f5468a1f53264d74aa8aa (diff)
downloadgitlab-ce-43ef375e084884ed4260ac9c9de8f601d5594c90.tar.gz
Add confirmation modal to "Change username"
Diffstat (limited to 'spec/features/profiles')
-rw-r--r--spec/features/profiles/account_spec.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/features/profiles/account_spec.rb b/spec/features/profiles/account_spec.rb
index e8eb0d17ca4..215b658eb7b 100644
--- a/spec/features/profiles/account_spec.rb
+++ b/spec/features/profiles/account_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Profile > Account' do
+feature 'Profile > Account', :js do
given(:user) { create(:user, username: 'foo') }
before do
@@ -59,6 +59,12 @@ end
def update_username(new_username)
allow(user.namespace).to receive(:move_dir)
visit profile_account_path
- fill_in 'user_username', with: new_username
- click_button 'Update username'
+
+ fill_in 'username-change-input', with: new_username
+
+ page.find('[data-target="#username-change-confirmation-modal"]').click
+
+ page.within('.modal') do
+ find('.js-modal-primary-action').click
+ end
end