Fix `Capybara/ClickLinkOrButtonStyle` cop in spec/features/admin area (#27445)
parent
0036de46bc
commit
71447ab19f
|
@ -22,7 +22,7 @@ describe 'Admin::Accounts' do
|
||||||
|
|
||||||
context 'without selecting any accounts' do
|
context 'without selecting any accounts' do
|
||||||
it 'displays a notice about account selection' do
|
it 'displays a notice about account selection' do
|
||||||
click_on button_for_suspend
|
click_button button_for_suspend
|
||||||
|
|
||||||
expect(page).to have_content(selection_error_text)
|
expect(page).to have_content(selection_error_text)
|
||||||
end
|
end
|
||||||
|
@ -32,7 +32,7 @@ describe 'Admin::Accounts' do
|
||||||
it 'suspends the account' do
|
it 'suspends the account' do
|
||||||
batch_checkbox_for(approved_user_account).check
|
batch_checkbox_for(approved_user_account).check
|
||||||
|
|
||||||
click_on button_for_suspend
|
click_button button_for_suspend
|
||||||
|
|
||||||
expect(approved_user_account.reload).to be_suspended
|
expect(approved_user_account.reload).to be_suspended
|
||||||
end
|
end
|
||||||
|
@ -42,7 +42,7 @@ describe 'Admin::Accounts' do
|
||||||
it 'approves the account user' do
|
it 'approves the account user' do
|
||||||
batch_checkbox_for(unapproved_user_account).check
|
batch_checkbox_for(unapproved_user_account).check
|
||||||
|
|
||||||
click_on button_for_approve
|
click_button button_for_approve
|
||||||
|
|
||||||
expect(unapproved_user_account.reload.user).to be_approved
|
expect(unapproved_user_account.reload.user).to be_approved
|
||||||
end
|
end
|
||||||
|
@ -52,7 +52,7 @@ describe 'Admin::Accounts' do
|
||||||
it 'rejects and removes the account' do
|
it 'rejects and removes the account' do
|
||||||
batch_checkbox_for(unapproved_user_account).check
|
batch_checkbox_for(unapproved_user_account).check
|
||||||
|
|
||||||
click_on button_for_reject
|
click_button button_for_reject
|
||||||
|
|
||||||
expect { unapproved_user_account.reload }.to raise_error(ActiveRecord::RecordNotFound)
|
expect { unapproved_user_account.reload }.to raise_error(ActiveRecord::RecordNotFound)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe 'Admin::CustomEmojis' do
|
||||||
|
|
||||||
context 'without selecting any records' do
|
context 'without selecting any records' do
|
||||||
it 'displays a notice about selection' do
|
it 'displays a notice about selection' do
|
||||||
click_on button_for_enable
|
click_button button_for_enable
|
||||||
|
|
||||||
expect(page).to have_content(selection_error_text)
|
expect(page).to have_content(selection_error_text)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe 'Admin::EmailDomainBlocks' do
|
||||||
|
|
||||||
context 'without selecting any records' do
|
context 'without selecting any records' do
|
||||||
it 'displays a notice about selection' do
|
it 'displays a notice about selection' do
|
||||||
click_on button_for_delete
|
click_button button_for_delete
|
||||||
|
|
||||||
expect(page).to have_content(selection_error_text)
|
expect(page).to have_content(selection_error_text)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe 'Admin::IpBlocks' do
|
||||||
|
|
||||||
context 'without selecting any records' do
|
context 'without selecting any records' do
|
||||||
it 'displays a notice about selection' do
|
it 'displays a notice about selection' do
|
||||||
click_on button_for_delete
|
click_button button_for_delete
|
||||||
|
|
||||||
expect(page).to have_content(selection_error_text)
|
expect(page).to have_content(selection_error_text)
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe 'Admin::Statuses' do
|
||||||
|
|
||||||
context 'without selecting any records' do
|
context 'without selecting any records' do
|
||||||
it 'displays a notice about selection' do
|
it 'displays a notice about selection' do
|
||||||
click_on button_for_report
|
click_button button_for_report
|
||||||
|
|
||||||
expect(page).to have_content(selection_error_text)
|
expect(page).to have_content(selection_error_text)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe 'Admin::Trends::Links::PreviewCardProviders' do
|
||||||
|
|
||||||
context 'without selecting any records' do
|
context 'without selecting any records' do
|
||||||
it 'displays a notice about selection' do
|
it 'displays a notice about selection' do
|
||||||
click_on button_for_allow
|
click_button button_for_allow
|
||||||
|
|
||||||
expect(page).to have_content(selection_error_text)
|
expect(page).to have_content(selection_error_text)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe 'Admin::Trends::Links' do
|
||||||
|
|
||||||
context 'without selecting any records' do
|
context 'without selecting any records' do
|
||||||
it 'displays a notice about selection' do
|
it 'displays a notice about selection' do
|
||||||
click_on button_for_allow
|
click_button button_for_allow
|
||||||
|
|
||||||
expect(page).to have_content(selection_error_text)
|
expect(page).to have_content(selection_error_text)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe 'Admin::Trends::Statuses' do
|
||||||
|
|
||||||
context 'without selecting any records' do
|
context 'without selecting any records' do
|
||||||
it 'displays a notice about selection' do
|
it 'displays a notice about selection' do
|
||||||
click_on button_for_allow
|
click_button button_for_allow
|
||||||
|
|
||||||
expect(page).to have_content(selection_error_text)
|
expect(page).to have_content(selection_error_text)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe 'Admin::Trends::Tags' do
|
||||||
|
|
||||||
context 'without selecting any records' do
|
context 'without selecting any records' do
|
||||||
it 'displays a notice about selection' do
|
it 'displays a notice about selection' do
|
||||||
click_on button_for_allow
|
click_button button_for_allow
|
||||||
|
|
||||||
expect(page).to have_content(selection_error_text)
|
expect(page).to have_content(selection_error_text)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue