Merge remote-tracking branch 'parent/main' into upstream-20241006

This commit is contained in:
KMY 2024-10-05 09:10:58 +09:00
commit 66bed31dbe
226 changed files with 2688 additions and 1846 deletions

View file

@ -9,7 +9,6 @@ RSpec.describe 'Invites' do
before do
UserRole.everyone.update(permissions: UserRole::FLAGS[:invite_users])
host! 'localhost:3000' # TODO: Move into before for all system specs?
sign_in user
end

View file

@ -179,7 +179,7 @@ RSpec.describe 'Using OAuth from an external app' do
end
context 'when the user has set up TOTP' do
let(:user) { Fabricate(:user, email: email, password: password, otp_required_for_login: true, otp_secret: User.generate_otp_secret(32)) }
let(:user) { Fabricate(:user, email: email, password: password, otp_required_for_login: true, otp_secret: User.generate_otp_secret) }
it 'when accepting the authorization request' do
params = { client_id: client_app.uid, response_type: 'code', redirect_uri: client_app.redirect_uri, scope: 'read' }

View file

@ -28,4 +28,17 @@ RSpec.describe 'report interface', :attachment_processing, :js, :streaming do
page.scroll_to(page.find('.batch-table__row'))
expect(page).to have_css('.spoiler-button__overlay__label')
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