|
15 | 15 |
|
16 | 16 | context 'with valid credentials' do |
17 | 17 | it 'allows to sign in' do |
18 | | - click_link(I18n.t('common.button.log_in')) # rubocop:disable Capybara/ClickLinkOrButtonStyle |
| 18 | + click_link(I18n.t('common.button.log_in')) |
19 | 19 | fill_in(:user_email, with: user.email) |
20 | 20 | fill_in(:user_password, with: password) |
21 | | - click_button(I18n.t('common.button.log_in')) # rubocop:disable Capybara/ClickLinkOrButtonStyle |
| 21 | + click_button(I18n.t('common.button.log_in')) |
22 | 22 | expect(page).to have_content(I18n.t('devise.sessions.signed_in')) |
23 | 23 | end |
24 | 24 | end |
25 | 25 |
|
26 | 26 | context 'with invalid credentials' do |
27 | 27 | it 'does not allow to sign in' do |
28 | | - click_link(I18n.t('common.button.log_in')) # rubocop:disable Capybara/ClickLinkOrButtonStyle |
| 28 | + click_link(I18n.t('common.button.log_in')) |
29 | 29 | fill_in(:user_email, with: user.email) |
30 | 30 | fill_in(:user_password, with: password.reverse) |
31 | | - click_button(I18n.t('common.button.log_in')) # rubocop:disable Capybara/ClickLinkOrButtonStyle |
| 31 | + click_button(I18n.t('common.button.log_in')) |
32 | 32 | expect(page).to have_content(I18n.t('devise.failure.invalid', authentication_keys: 'Email')) |
33 | 33 | end |
34 | 34 | end |
|
49 | 49 | it 'redirects to the desired page immediately after sign-in' do |
50 | 50 | fill_in(:user_email, with: user.email) |
51 | 51 | fill_in(:user_password, with: password) |
52 | | - click_button(I18n.t('common.button.log_in')) # rubocop:disable Capybara/ClickLinkOrButtonStyle |
| 52 | + click_button(I18n.t('common.button.log_in')) |
53 | 53 | expect(page).to have_content(task.title) |
54 | 54 | end |
55 | 55 |
|
|
59 | 59 | it 'informs the user about missing permissions' do |
60 | 60 | fill_in(:user_email, with: user.email) |
61 | 61 | fill_in(:user_password, with: password) |
62 | | - click_button(I18n.t('common.button.log_in')) # rubocop:disable Capybara/ClickLinkOrButtonStyle |
| 62 | + click_button(I18n.t('common.button.log_in')) |
63 | 63 | expect(page).to have_content(I18n.t('common.errors.not_authorized')) |
64 | 64 | end |
65 | 65 | end |
|
0 commit comments