diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
commit | 9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch) | |
tree | 70467ae3692a0e35e5ea56bcb803eb512a10bedb /spec/features/profiles | |
parent | 4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff) |
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'spec/features/profiles')
-rw-r--r-- | spec/features/profiles/emails_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/profiles/password_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/profiles/personal_access_tokens_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/profiles/user_edit_profile_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/profiles/user_search_settings_spec.rb | 6 |
5 files changed, 15 insertions, 11 deletions
diff --git a/spec/features/profiles/emails_spec.rb b/spec/features/profiles/emails_spec.rb index bdf1f8b022a..6b6f628e2d5 100644 --- a/spec/features/profiles/emails_spec.rb +++ b/spec/features/profiles/emails_spec.rb @@ -43,7 +43,7 @@ RSpec.describe 'Profile > Emails' do end it 'user removes email' do - user.emails.create(email: 'my@email.com') + user.emails.create!(email: 'my@email.com') visit profile_emails_path expect(page).to have_content("my@email.com") @@ -52,7 +52,7 @@ RSpec.describe 'Profile > Emails' do end it 'user confirms email' do - email = user.emails.create(email: 'my@email.com') + email = user.emails.create!(email: 'my@email.com') visit profile_emails_path expect(page).to have_content("#{email.email} Unverified") @@ -64,7 +64,7 @@ RSpec.describe 'Profile > Emails' do end it 'user re-sends confirmation email' do - email = user.emails.create(email: 'my@email.com') + email = user.emails.create!(email: 'my@email.com') visit profile_emails_path expect { click_link("Resend confirmation email") }.to have_enqueued_job.on_queue('mailers') @@ -72,7 +72,7 @@ RSpec.describe 'Profile > Emails' do end it 'old unconfirmed emails show Send Confirmation button' do - email = user.emails.create(email: 'my@email.com') + email = user.emails.create!(email: 'my@email.com') email.update_attribute(:confirmation_sent_at, nil) visit profile_emails_path diff --git a/spec/features/profiles/password_spec.rb b/spec/features/profiles/password_spec.rb index 039966080d8..c9059395377 100644 --- a/spec/features/profiles/password_spec.rb +++ b/spec/features/profiles/password_spec.rb @@ -119,7 +119,7 @@ RSpec.describe 'Profile > Password' do before do sign_in(user) - user.update(password_expires_at: 1.hour.ago) + user.update!(password_expires_at: 1.hour.ago) user.identities.delete expect(user.ldap_user?).to eq false end diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb index 9e56ef087ae..c85657c89d5 100644 --- a/spec/features/profiles/personal_access_tokens_spec.rb +++ b/spec/features/profiles/personal_access_tokens_spec.rb @@ -95,7 +95,7 @@ RSpec.describe 'Profile > Personal Access Tokens', :js do end it "removes expired tokens from 'active' section" do - personal_access_token.update(expires_at: 5.days.ago) + personal_access_token.update!(expires_at: 5.days.ago) visit profile_personal_access_tokens_path expect(page).to have_selector(".settings-message") diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb index bd4917824d1..57f7c7878e3 100644 --- a/spec/features/profiles/user_edit_profile_spec.rb +++ b/spec/features/profiles/user_edit_profile_spec.rb @@ -212,8 +212,10 @@ RSpec.describe 'User edit profile' do end it 'shows author as busy in the assignee dropdown' do - find('.block.assignee .edit-link').click - wait_for_requests + page.within('.assignee') do + click_button('Edit') + wait_for_requests + end page.within '.dropdown-menu-user' do expect(page).to have_content("#{user.name} (Busy)") @@ -227,7 +229,7 @@ RSpec.describe 'User edit profile' do visit project_issue_path(project, issue) wait_for_requests - expect(page.find('[data-testid="expanded-assignee"]')).to have_text("#{user.name} (Busy)") + expect(page.find('.issuable-assignees')).to have_content("#{user.name} (Busy)") end end diff --git a/spec/features/profiles/user_search_settings_spec.rb b/spec/features/profiles/user_search_settings_spec.rb index 60df0d7532b..64a8556e349 100644 --- a/spec/features/profiles/user_search_settings_spec.rb +++ b/spec/features/profiles/user_search_settings_spec.rb @@ -10,9 +10,11 @@ RSpec.describe 'User searches their settings', :js do end context 'in profile page' do - let(:visit_path) { profile_path } + before do + visit profile_path + end - it_behaves_like 'can search settings with feature flag check', 'Public Avatar', 'Main settings' + it_behaves_like 'can search settings', 'Public Avatar', 'Main settings' end context 'in preferences page' do |