From 43ef375e084884ed4260ac9c9de8f601d5594c90 Mon Sep 17 00:00:00 2001 From: Shah El-Rahman Date: Fri, 6 Apr 2018 09:36:22 +0000 Subject: Add confirmation modal to "Change username" --- spec/features/profiles/account_spec.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'spec/features/profiles') 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 -- cgit v1.2.3