diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/features/profiles | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/features/profiles')
5 files changed, 7 insertions, 9 deletions
diff --git a/spec/features/profiles/chat_names_spec.rb b/spec/features/profiles/chat_names_spec.rb index 80b36aa37b8..ca888018cad 100644 --- a/spec/features/profiles/chat_names_spec.rb +++ b/spec/features/profiles/chat_names_spec.rb @@ -14,6 +14,7 @@ RSpec.describe 'Profile > Chat' do let(:params) do { team_id: 'T00', team_domain: 'my_chat_team', user_id: 'U01', user_name: 'my_chat_user' } end + let!(:authorize_url) { ChatNames::AuthorizeUserService.new(service, params).execute } let(:authorize_path) { URI.parse(authorize_url).request_uri } diff --git a/spec/features/profiles/password_spec.rb b/spec/features/profiles/password_spec.rb index a274f2b6d96..039966080d8 100644 --- a/spec/features/profiles/password_spec.rb +++ b/spec/features/profiles/password_spec.rb @@ -42,7 +42,7 @@ RSpec.describe 'Profile > Password' do fill_passwords('mypassword', 'mypassword') page.within('.flash-notice') do - expect(page).to have_content('Password was successfully updated. Please login with it') + expect(page).to have_content('Password was successfully updated. Please sign in again.') end end end diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb index 21a0d01a9bf..4438831fb76 100644 --- a/spec/features/profiles/personal_access_tokens_spec.rb +++ b/spec/features/profiles/personal_access_tokens_spec.rb @@ -100,14 +100,11 @@ RSpec.describe 'Profile > Personal Access Tokens', :js do context "when revocation fails" do it "displays an error message" do visit profile_personal_access_tokens_path - allow_any_instance_of(PersonalAccessToken).to receive(:update!).and_return(false) - - errors = ActiveModel::Errors.new(PersonalAccessToken.new).tap { |e| e.add(:name, "cannot be nil") } - allow_any_instance_of(PersonalAccessToken).to receive(:errors).and_return(errors) + allow_any_instance_of(PersonalAccessTokens::RevokeService).to receive(:revocation_permitted?).and_return(false) accept_confirm { click_on "Revoke" } expect(active_personal_access_tokens).to have_text(personal_access_token.name) - expect(page).to have_content("Could not revoke") + expect(page).to have_content("Not permitted to revoke") end end end diff --git a/spec/features/profiles/user_edit_preferences_spec.rb b/spec/features/profiles/user_edit_preferences_spec.rb index 817228edca7..d489d92c524 100644 --- a/spec/features/profiles/user_edit_preferences_spec.rb +++ b/spec/features/profiles/user_edit_preferences_spec.rb @@ -64,7 +64,7 @@ RSpec.describe 'User edit preferences profile' do expect(page).to have_select( 'user[preferred_language]', selected: 'Spanish - espaƱol', - options: Gitlab::I18n::AVAILABLE_LANGUAGES.values, + options: Gitlab::I18n.selectable_locales.values, visible: :all ) end diff --git a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb index 2747b5894dc..56db7efff51 100644 --- a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb @@ -76,13 +76,13 @@ RSpec.describe 'User visits the profile preferences page' do it 'updates their preference' do wait_for_requests - select2('eo', from: '#user_preferred_language') + select2('pt_BR', from: '#user_preferred_language') click_button 'Save' wait_for_requests refresh - expect(page).to have_css('html[lang="eo"]') + expect(page).to have_css('html[lang="pt-BR"]') end end |