mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 11:48:06 +01:00
Add regression coverage for admin reports resolution button within form (#32248)
This commit is contained in:
parent
49407e7623
commit
463f9197d8
1 changed files with 13 additions and 0 deletions
|
@ -28,4 +28,17 @@ RSpec.describe 'report interface', :attachment_processing, :js, :streaming do
|
||||||
page.scroll_to(page.find('.batch-table__row'))
|
page.scroll_to(page.find('.batch-table__row'))
|
||||||
expect(page).to have_css('.spoiler-button__overlay__label')
|
expect(page).to have_css('.spoiler-button__overlay__label')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'marks a report resolved from the show page actions area' do
|
||||||
|
visit admin_report_path(report)
|
||||||
|
|
||||||
|
expect { resolve_report }
|
||||||
|
.to change { report.reload.action_taken_at }.to(be_present).from(nil)
|
||||||
|
end
|
||||||
|
|
||||||
|
def resolve_report
|
||||||
|
within '.report-actions' do
|
||||||
|
click_on I18n.t('admin.reports.mark_as_resolved')
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue