From 4b38817aff8ca8397bab3f71163ee570b2da5b73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 22:55:03 +0000 Subject: [PATCH 1/2] chore(deps-dev): bump rubocop from 1.56.4 to 1.57.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.56.4 to 1.57.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.56.4...v1.57.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 37bd3a20ad..1e0277f1e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -467,7 +467,7 @@ GEM parallel (1.23.0) paranoia (2.6.3) activerecord (>= 5.1, < 7.2) - parser (3.2.2.3) + parser (3.2.2.4) ast (~> 2.4.1) racc paypal-sdk-core (0.3.4) @@ -567,7 +567,7 @@ GEM redis (4.8.1) redis-client (0.17.0) connection_pool - regexp_parser (2.8.1) + regexp_parser (2.8.2) reline (0.3.3) io-console (~> 0.5) request_store (1.5.1) @@ -621,12 +621,12 @@ GEM rswag-ui (2.11.0) actionpack (>= 3.1, < 7.2) railties (>= 3.1, < 7.2) - rubocop (1.56.4) + rubocop (1.57.0) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) From 45dd5cc40aa6baf97c9de3e21ace62d22c339811 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 12 Oct 2023 10:01:27 +1100 Subject: [PATCH 2/2] Style/SingleLineDoEndBlock: Prefer multiline do...end block --- spec/system/admin/tag_rules_spec.rb | 28 +++++++++++++++------ spec/system/admin/variant_overrides_spec.rb | 16 +++++++++--- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/spec/system/admin/tag_rules_spec.rb b/spec/system/admin/tag_rules_spec.rb index 9d698c6af4..7ccf1cf059 100644 --- a/spec/system/admin/tag_rules_spec.rb +++ b/spec/system/admin/tag_rules_spec.rb @@ -158,14 +158,18 @@ describe 'Tag Rules' do # DEFAULT FilterShippingMethods rule within ".default_rules #tr_0" do - within "li.tag-item", text: "local ✖" do find("a.remove-button").click end + within "li.tag-item", text: "local ✖" do + find("a.remove-button").click + end fill_in_tag "volunteers-only" expect(page).to have_content "not visible" end # FilterProducts rule within ".customer_tag #tr_1" do - within "li.tag-item", text: "member ✖" do find("a.remove-button").click end + within "li.tag-item", text: "member ✖" do + find("a.remove-button").click + end fill_in_tag "volunteers-only1" expect(page).to have_select2 "enterprise_tag_rules_attributes_1_preferred_matched_" \ "variants_visibility", selected: 'VISIBLE' @@ -176,7 +180,9 @@ describe 'Tag Rules' do # FilterPaymentMethods rule within ".customer_tag #tr_2" do - within "li.tag-item", text: "trusted ✖" do find("a.remove-button").click end + within "li.tag-item", text: "trusted ✖" do + find("a.remove-button").click + end fill_in_tag "volunteers-only2" expect(page).to have_select2 "enterprise_tag_rules_attributes_2_preferred_matched_" \ "payment_methods_visibility", selected: 'NOT VISIBLE' @@ -187,7 +193,9 @@ describe 'Tag Rules' do # FilterOrderCycles rule within ".customer_tag #tr_3" do - within "li.tag-item", text: "wholesale ✖" do find("a.remove-button").click end + within "li.tag-item", text: "wholesale ✖" do + find("a.remove-button").click + end fill_in_tag "volunteers-only3" expect(page).to have_select2 "enterprise_tag_rules_attributes_3_preferred_matched_" \ "order_cycles_visibility", selected: 'VISIBLE' @@ -198,7 +206,9 @@ describe 'Tag Rules' do # FilterShippingMethods rule within ".customer_tag #tr_4" do - within "li.tag-item", text: "local ✖" do find("a.remove-button").click end + within "li.tag-item", text: "local ✖" do + find("a.remove-button").click + end fill_in_tag "volunteers-only4" expect(page).to have_select2 "enterprise_tag_rules_attributes_4_preferred_matched_" \ "shipping_methods_visibility", selected: 'NOT VISIBLE' @@ -257,11 +267,15 @@ describe 'Tag Rules' do it "deletes both default and customer rules from the database" do expect do accept_alert do - within "#tr_1" do first("a.delete-tag-rule").click end + within "#tr_1" do + first("a.delete-tag-rule").click + end end expect(page).to have_no_selector "#tr_1" accept_alert do - within "#tr_0" do first("a.delete-tag-rule").click end + within "#tr_0" do + first("a.delete-tag-rule").click + end end expect(page).to have_no_selector "#tr_0" end.to change{ TagRule.count }.by(-2) diff --git a/spec/system/admin/variant_overrides_spec.rb b/spec/system/admin/variant_overrides_spec.rb index e392a65eeb..f34c7691b0 100644 --- a/spec/system/admin/variant_overrides_spec.rb +++ b/spec/system/admin/variant_overrides_spec.rb @@ -131,14 +131,18 @@ describe " toggle_columns "Hide" expect(page).to have_selector "tr#v_#{variant.id}" expect(page).to have_selector "tr#v_#{variant_related.id}" - within "tr#v_#{variant.id}" do click_button 'Hide' end + within "tr#v_#{variant.id}" do + click_button 'Hide' + end expect(page).to have_no_selector "tr#v_#{variant.id}" expect(page).to have_selector "tr#v_#{variant_related.id}" first("div#views-dropdown").click first("div#views-dropdown div.menu div.menu_item", text: "Hidden Products").click expect(page).to have_selector "tr#v_#{variant.id}" expect(page).to have_no_selector "tr#v_#{variant_related.id}" - within "tr#v_#{variant.id}" do click_button 'Add' end + within "tr#v_#{variant.id}" do + click_button 'Add' + end expect(page).to have_no_selector "tr#v_#{variant.id}" expect(page).to have_no_selector "tr#v_#{variant_related.id}" first("div#views-dropdown").click @@ -492,8 +496,12 @@ describe " expect(page).to have_table_row ['PRODUCER', 'PRODUCT', 'VARIANT', 'ADD', 'HIDE'] expect(page).to have_selector "table#new-products tr#v_#{variant1.id}" expect(page).to have_selector "table#new-products tr#v_#{variant2.id}" - within "table#new-products tr#v_#{variant1.id}" do click_button 'Add' end - within "table#new-products tr#v_#{variant2.id}" do click_button 'Hide' end + within "table#new-products tr#v_#{variant1.id}" do + click_button 'Add' + end + within "table#new-products tr#v_#{variant2.id}" do + click_button 'Hide' + end expect(page).to have_no_selector "table#new-products tr#v_#{variant1.id}" expect(page).to have_no_selector "table#new-products tr#v_#{variant2.id}" click_button "Back to my inventory"