From 1d152d2181b872661b6338f4c41ecb53e9d2c8bf Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 5 Jun 2025 03:08:52 -0400 Subject: [PATCH] Replace local vars with `let` in JS-enabled system specs (#34905) --- spec/system/account_notes_spec.rb | 2 +- spec/system/new_statuses_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/account_notes_spec.rb b/spec/system/account_notes_spec.rb index 1d125e1984..eaef248347 100644 --- a/spec/system/account_notes_spec.rb +++ b/spec/system/account_notes_spec.rb @@ -11,13 +11,13 @@ RSpec.describe 'Account notes', :inline_jobs, :js, :streaming do let(:finished_onboarding) { true } let!(:other_account) { Fabricate(:account) } + let(:note_text) { 'This is a personal note' } before { as_a_logged_in_user } it 'can be written and viewed' do visit_profile(other_account) - note_text = 'This is a personal note' fill_in frontend_translations('account_note.placeholder'), with: note_text # This is a bit awkward since there is no button to save the change diff --git a/spec/system/new_statuses_spec.rb b/spec/system/new_statuses_spec.rb index d14bcc0058..70ed90a073 100644 --- a/spec/system/new_statuses_spec.rb +++ b/spec/system/new_statuses_spec.rb @@ -9,12 +9,12 @@ RSpec.describe 'NewStatuses', :inline_jobs, :js, :streaming do let(:password) { 'password' } let(:confirmed_at) { Time.zone.now } let(:finished_onboarding) { true } + let(:status_text) { 'This is a new status!' } before { as_a_logged_in_user } it 'can be posted' do visit_homepage - status_text = 'This is a new status!' within('.compose-form') do fill_in frontend_translations('compose_form.placeholder'), with: status_text