Merge pull request #11654 from openfoodfoundation/dependabot/bundler/rubocop-1.57.0

chore(deps-dev): bump rubocop from 1.56.4 to 1.57.0
This commit is contained in:
Maikel
2023-10-13 08:29:29 +11:00
committed by GitHub
3 changed files with 37 additions and 15 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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"