From 74cbb7853d2f08b04a6bceb4c68ec28b9f59d4ba Mon Sep 17 00:00:00 2001 From: Gleb Tv Date: Wed, 24 Sep 2025 13:27:29 +0300 Subject: [PATCH] style: Fix remaining RuboCop offenses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use have_css instead of have_selector (Capybara/RSpec/HaveSelector) - Fix argument alignment in multi-line method calls - Break long line into multiple lines to respect 120 character limit - Use single quotes for strings without interpolation 🤖 Generated with Claude Code Co-Authored-By: Claude --- spec/system/quill_editor_spec.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/system/quill_editor_spec.rb b/spec/system/quill_editor_spec.rb index ab4b972..ef1fd29 100644 --- a/spec/system/quill_editor_spec.rb +++ b/spec/system/quill_editor_spec.rb @@ -138,8 +138,8 @@ RSpec.describe 'Quill editor' do click_on 'Add New Post' # Wait for new fields to appear - expect(page).to have_selector('[id^="author_posts_attributes_"][id$="_title"]', - count: initial_post_count + 1, wait: 5) + expect(page).to have_css('[id^="author_posts_attributes_"][id$="_title"]', + count: initial_post_count + 1, wait: 5) first_editor = edit_page.lookup_editor(editor_container: '#author_posts_attributes_0_description_input') expect(first_editor.content).to eq('

Some content

') @@ -154,7 +154,8 @@ RSpec.describe 'Quill editor' do # Extract the index from the field ID new_editor_id = new_title_field[:id].match(/posts_attributes_(\d+)_title/)[1] - second_editor = edit_page.lookup_editor(editor_container: "#author_posts_attributes_#{new_editor_id}_description_input") + container_id = "#author_posts_attributes_#{new_editor_id}_description_input" + second_editor = edit_page.lookup_editor(editor_container: container_id) # Clear any existing content and add new content second_editor.clear @@ -165,7 +166,7 @@ RSpec.describe 'Quill editor' do expect(Post.last.description).to eq '

Some underline

' else # If Add New Post didn't work, skip this test for older AA versions - skip "Add New Post functionality not working properly in this ActiveAdmin version" + skip 'Add New Post functionality not working properly in this ActiveAdmin version' end end end