2020-08-28 14:07:30 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe 'Signup', type: :system, authenticated_as: false do
|
|
|
|
it 'shows password strength error' do
|
|
|
|
visit 'signup'
|
|
|
|
|
|
|
|
fill_in 'firstname', with: 'Test'
|
|
|
|
fill_in 'lastname', with: 'Test'
|
|
|
|
fill_in 'email', with: 'test@example.com'
|
2020-10-06 10:34:36 +00:00
|
|
|
fill_in 'password', with: 'asdasdasdasd'
|
|
|
|
fill_in 'password_confirm', with: 'asdasdasdasd'
|
2020-08-28 14:07:30 +00:00
|
|
|
|
|
|
|
click '.js-submit'
|
|
|
|
|
2020-10-06 10:34:36 +00:00
|
|
|
within '.js-danger' do
|
|
|
|
expect(page).to have_text('Invalid password,').and(have_no_text('["'))
|
|
|
|
end
|
2020-08-28 14:07:30 +00:00
|
|
|
end
|
|
|
|
end
|