From fd795d851322e7c0fbd82095411e1d84c19c4079 Mon Sep 17 00:00:00 2001 From: Neal Chambers Date: Thu, 17 Aug 2023 13:52:37 +0900 Subject: [PATCH] Safely autocorrect Style/BlockComments Inspecting 1483 files ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C...................................................... Offenses: spec/system/admin/tag_rules_spec.rb:209:1: C: [Corrected] Style/BlockComments: Do not use block comments. =begin ... ^^^^^^ spec/system/admin/tag_rules_spec.rb:217:101: C: Layout/LineLength: Line is too long. [103/100] # expect(default_fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "hidden" ^^^ spec/system/admin/tag_rules_spec.rb:241:1: C: [Corrected] Layout/CommentIndentation: Incorrect indentation detected (column 0 instead of 6). # expect(foc_tag_rule.preferred_matched_order_cycles_visibility).to eq "hidden" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1483 files inspected, 3 offenses detected, 2 offenses corrected --- .rubocop_todo.yml | 8 +--- spec/system/admin/tag_rules_spec.rb | 68 ++++++++++++++--------------- 2 files changed, 34 insertions(+), 42 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3db3e088d2..608594cd53 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -759,12 +759,6 @@ Style/ArrayIntersect: - 'lib/open_food_network/tag_rule_applicator.rb' - 'spec/support/matchers/select2_matchers.rb' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -Style/BlockComments: - Exclude: - - 'spec/system/admin/tag_rules_spec.rb' - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowOnConstant, AllowOnSelfClass. @@ -903,7 +897,7 @@ Style/HashLikeCase: Exclude: - 'app/models/enterprise.rb' -# Offense count: 1782 +# Offense count: 1784 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys diff --git a/spec/system/admin/tag_rules_spec.rb b/spec/system/admin/tag_rules_spec.rb index 01ad0741ee..9d698c6af4 100644 --- a/spec/system/admin/tag_rules_spec.rb +++ b/spec/system/admin/tag_rules_spec.rb @@ -206,41 +206,39 @@ describe 'Tag Rules' do from: "enterprise_tag_rules_attributes_4_preferred_matched_" \ "shipping_methods_visibility" end -=begin - # Moving the Shipping Methods to top priority - find(".customer_tag#tg_4 .header", ).drag_to find(".customer_tag#tg_1 .header") - - click_button 'Update' - - # DEFAULT FilterShippingMethods rule - expect(default_fsm_tag_rule.reload.preferred_customer_tags).to eq "" - expect(default_fsm_tag_rule.preferred_shipping_method_tags).to eq "volunteers-only" - expect(default_fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "hidden" - - # FilterShippingMethods rule - expect(fsm_tag_rule.reload.priority).to eq 1 - expect(fsm_tag_rule.preferred_customer_tags).to eq "volunteer" - expect(fsm_tag_rule.preferred_shipping_method_tags).to eq "volunteers-only4" - expect(fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "visible" - - # FilterProducts rule - expect(fp_tag_rule.reload.priority).to eq 2 - expect(fp_tag_rule.preferred_customer_tags).to eq "volunteer" - expect(fp_tag_rule.preferred_variant_tags).to eq "volunteers-only1" - expect(fp_tag_rule.preferred_matched_variants_visibility).to eq "hidden" - - # FilterPaymentMethods rule - expect(fpm_tag_rule.reload.priority).to eq 3 - expect(fpm_tag_rule.preferred_customer_tags).to eq "volunteer" - expect(fpm_tag_rule.preferred_payment_method_tags).to eq "volunteers-only2" - expect(fpm_tag_rule.preferred_matched_payment_methods_visibility).to eq "visible" - - # FilterOrderCycles rule - expect(foc_tag_rule.reload.priority).to eq 4 - expect(foc_tag_rule.preferred_customer_tags).to eq "volunteer" - expect(foc_tag_rule.preferred_exchange_tags).to eq "volunteers-only3" - expect(foc_tag_rule.preferred_matched_order_cycles_visibility).to eq "hidden" -=end + # # Moving the Shipping Methods to top priority + # find(".customer_tag#tg_4 .header", ).drag_to find(".customer_tag#tg_1 .header") + # + # click_button 'Update' + # + # # DEFAULT FilterShippingMethods rule + # expect(default_fsm_tag_rule.reload.preferred_customer_tags).to eq "" + # expect(default_fsm_tag_rule.preferred_shipping_method_tags).to eq "volunteers-only" + # expect(default_fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "hidden" + # + # # FilterShippingMethods rule + # expect(fsm_tag_rule.reload.priority).to eq 1 + # expect(fsm_tag_rule.preferred_customer_tags).to eq "volunteer" + # expect(fsm_tag_rule.preferred_shipping_method_tags).to eq "volunteers-only4" + # expect(fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "visible" + # + # # FilterProducts rule + # expect(fp_tag_rule.reload.priority).to eq 2 + # expect(fp_tag_rule.preferred_customer_tags).to eq "volunteer" + # expect(fp_tag_rule.preferred_variant_tags).to eq "volunteers-only1" + # expect(fp_tag_rule.preferred_matched_variants_visibility).to eq "hidden" + # + # # FilterPaymentMethods rule + # expect(fpm_tag_rule.reload.priority).to eq 3 + # expect(fpm_tag_rule.preferred_customer_tags).to eq "volunteer" + # expect(fpm_tag_rule.preferred_payment_method_tags).to eq "volunteers-only2" + # expect(fpm_tag_rule.preferred_matched_payment_methods_visibility).to eq "visible" + # + # # FilterOrderCycles rule + # expect(foc_tag_rule.reload.priority).to eq 4 + # expect(foc_tag_rule.preferred_customer_tags).to eq "volunteer" + # expect(foc_tag_rule.preferred_exchange_tags).to eq "volunteers-only3" + # expect(foc_tag_rule.preferred_matched_order_cycles_visibility).to eq "hidden" end end