Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/users')
-rw-r--r--spec/features/users/login_spec.rb6
-rw-r--r--spec/features/users/signup_spec.rb9
2 files changed, 11 insertions, 4 deletions
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb
index 7ba663d08d4..2d0fcfe84e6 100644
--- a/spec/features/users/login_spec.rb
+++ b/spec/features/users/login_spec.rb
@@ -110,7 +110,7 @@ RSpec.describe 'Login' do
gitlab_sign_in(user)
- expect(page).not_to have_content('You have to confirm your email address before continuing.')
+ expect(page).not_to have_content(I18n.t('devise.failure.unconfirmed'))
expect(page).not_to have_link('Resend confirmation email', href: new_user_confirmation_path)
end
end
@@ -124,7 +124,7 @@ RSpec.describe 'Login' do
gitlab_sign_in(user)
- expect(page).to have_content('You have to confirm your email address before continuing.')
+ expect(page).to have_content(I18n.t('devise.failure.unconfirmed'))
expect(page).to have_link('Resend confirmation email', href: new_user_confirmation_path)
end
end
@@ -820,7 +820,7 @@ RSpec.describe 'Login' do
gitlab_sign_in(user)
expect(current_path).to eq new_user_session_path
- expect(page).to have_content('You have to confirm your email address before continuing.')
+ expect(page).to have_content(I18n.t('devise.failure.unconfirmed'))
end
end
end
diff --git a/spec/features/users/signup_spec.rb b/spec/features/users/signup_spec.rb
index 66a26493339..af2ecfec498 100644
--- a/spec/features/users/signup_spec.rb
+++ b/spec/features/users/signup_spec.rb
@@ -70,6 +70,13 @@ RSpec.shared_examples 'Signup' do
expect(page).to have_content("Username is too long (maximum is 255 characters).")
end
+ it 'shows an error message if the username is less than 2 characters' do
+ fill_in 'new_user_username', with: 'u'
+ wait_for_requests
+
+ expect(page).to have_content("Username is too short (minimum is 2 characters).")
+ end
+
it 'shows an error message on submit if the username contains special characters' do
fill_in 'new_user_username', with: 'new$user!username'
wait_for_requests
@@ -91,7 +98,7 @@ RSpec.shared_examples 'Signup' do
expect(page).to have_content("Invalid input, please avoid emojis")
end
- it 'shows a pending message if the username availability is being fetched', :quarantine do
+ it 'shows a pending message if the username availability is being fetched', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/31484' do
fill_in 'new_user_username', with: 'new-user'
expect(find('.username > .validation-pending')).not_to have_css '.hide'