diff options
Diffstat (limited to 'spec/features/profiles')
-rw-r--r-- | spec/features/profiles/chat_names_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/profiles/emails_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/profiles/keys_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/profiles/password_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/profiles/personal_access_tokens_spec.rb | 11 |
5 files changed, 9 insertions, 18 deletions
diff --git a/spec/features/profiles/chat_names_spec.rb b/spec/features/profiles/chat_names_spec.rb index 6270fa7347d..b392d8dfa8e 100644 --- a/spec/features/profiles/chat_names_spec.rb +++ b/spec/features/profiles/chat_names_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' RSpec.describe 'Profile > Chat' do let(:user) { create(:user) } - let(:integration) { create(:service) } + let(:integration) { create(:integration) } before do sign_in(user) diff --git a/spec/features/profiles/emails_spec.rb b/spec/features/profiles/emails_spec.rb index 8f05de60be9..24917412826 100644 --- a/spec/features/profiles/emails_spec.rb +++ b/spec/features/profiles/emails_spec.rb @@ -44,7 +44,7 @@ RSpec.describe 'Profile > Emails' do end it 'does not add an invalid email' do - fill_in('Email', with: 'test.@example.com') + fill_in('Email', with: 'test@@example.com') click_button('Add email address') email = user.emails.find_by(email: email) diff --git a/spec/features/profiles/keys_spec.rb b/spec/features/profiles/keys_spec.rb index c1e2d19ad9a..b9e59a0239b 100644 --- a/spec/features/profiles/keys_spec.rb +++ b/spec/features/profiles/keys_spec.rb @@ -32,10 +32,10 @@ RSpec.describe 'Profile > SSH Keys' do expect(find('.breadcrumbs-sub-title')).to have_link(attrs[:title]) end - it 'shows a confirmable warning if the key does not start with ssh-' do + it 'shows a confirmable warning if the key begins with an algorithm name that is unsupported' do attrs = attributes_for(:key) - fill_in('Key', with: 'invalid-key') + fill_in('Key', with: 'unsupported-ssh-rsa key') fill_in('Title', with: attrs[:title]) click_button('Add key') diff --git a/spec/features/profiles/password_spec.rb b/spec/features/profiles/password_spec.rb index 7059697354d..25fe43617fd 100644 --- a/spec/features/profiles/password_spec.rb +++ b/spec/features/profiles/password_spec.rb @@ -39,7 +39,7 @@ RSpec.describe 'Profile > Password' do describe 'User puts the same passwords in the field and in the confirmation' do it 'shows a success message' do - fill_passwords('mypassword', 'mypassword') + fill_passwords(Gitlab::Password.test_default, Gitlab::Password.test_default) page.within('.flash-notice') do expect(page).to have_content('Password was successfully updated. Please sign in again.') @@ -79,7 +79,7 @@ RSpec.describe 'Profile > Password' do end context 'Change password' do - let(:new_password) { '22233344' } + let(:new_password) { "new" + Gitlab::Password.test_default } before do sign_in(user) @@ -170,8 +170,8 @@ RSpec.describe 'Profile > Password' do expect(current_path).to eq new_profile_password_path fill_in :user_password, with: user.password - fill_in :user_new_password, with: '12345678' - fill_in :user_password_confirmation, with: '12345678' + fill_in :user_new_password, with: Gitlab::Password.test_default + fill_in :user_password_confirmation, with: Gitlab::Password.test_default click_button 'Set new password' expect(current_path).to eq new_user_session_path diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb index 135a940807e..f1e5658cd7b 100644 --- a/spec/features/profiles/personal_access_tokens_spec.rb +++ b/spec/features/profiles/personal_access_tokens_spec.rb @@ -132,7 +132,7 @@ RSpec.describe 'Profile > Personal Access Tokens', :js do describe "feed token" do context "when enabled" do - it "displays feed token with `hide_access_tokens` feature flag enabled" do + it "displays feed token" do allow(Gitlab::CurrentSettings).to receive(:disable_feed_token).and_return(false) visit profile_personal_access_tokens_path @@ -143,15 +143,6 @@ RSpec.describe 'Profile > Personal Access Tokens', :js do expect(page).to have_content(feed_token_description) end end - - it "displays feed token with `hide_access_tokens` feature flag disabled" do - stub_feature_flags(hide_access_tokens: false) - allow(Gitlab::CurrentSettings).to receive(:disable_feed_token).and_return(false) - visit profile_personal_access_tokens_path - - expect(page).to have_field('Feed token', with: user.feed_token) - expect(page).to have_content(feed_token_description) - end end context "when disabled" do |