Replace local vars with let in JS-enabled system specs (#34905)
				
					
				
			This commit is contained in:
		@@ -11,13 +11,13 @@ RSpec.describe 'Account notes', :inline_jobs, :js, :streaming do
 | 
				
			|||||||
  let(:finished_onboarding) { true }
 | 
					  let(:finished_onboarding) { true }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let!(:other_account) { Fabricate(:account) }
 | 
					  let!(:other_account) { Fabricate(:account) }
 | 
				
			||||||
 | 
					  let(:note_text) { 'This is a personal note' }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  before { as_a_logged_in_user }
 | 
					  before { as_a_logged_in_user }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  it 'can be written and viewed' do
 | 
					  it 'can be written and viewed' do
 | 
				
			||||||
    visit_profile(other_account)
 | 
					    visit_profile(other_account)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    note_text = 'This is a personal note'
 | 
					 | 
				
			||||||
    fill_in frontend_translations('account_note.placeholder'), with: note_text
 | 
					    fill_in frontend_translations('account_note.placeholder'), with: note_text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # This is a bit awkward since there is no button to save the change
 | 
					    # This is a bit awkward since there is no button to save the change
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,12 +9,12 @@ RSpec.describe 'NewStatuses', :inline_jobs, :js, :streaming do
 | 
				
			|||||||
  let(:password)            { 'password' }
 | 
					  let(:password)            { 'password' }
 | 
				
			||||||
  let(:confirmed_at)        { Time.zone.now }
 | 
					  let(:confirmed_at)        { Time.zone.now }
 | 
				
			||||||
  let(:finished_onboarding) { true }
 | 
					  let(:finished_onboarding) { true }
 | 
				
			||||||
 | 
					  let(:status_text) { 'This is a new status!' }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  before { as_a_logged_in_user }
 | 
					  before { as_a_logged_in_user }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  it 'can be posted' do
 | 
					  it 'can be posted' do
 | 
				
			||||||
    visit_homepage
 | 
					    visit_homepage
 | 
				
			||||||
    status_text = 'This is a new status!'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    within('.compose-form') do
 | 
					    within('.compose-form') do
 | 
				
			||||||
      fill_in frontend_translations('compose_form.placeholder'), with: status_text
 | 
					      fill_in frontend_translations('compose_form.placeholder'), with: status_text
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user