Requested changes - translation useless

- also useless in specs
This commit is contained in:
cyrillefr
2025-05-12 14:46:27 +02:00
parent 36cada0510
commit e61d951dcf
3 changed files with 8 additions and 8 deletions

View File

@@ -38,7 +38,7 @@
.field
= label_tag nil, t(:shipping_method)
= select_tag(:shipping_method_id,
options_for_select(Spree::ShippingMethod.managed_by(spree_current_user).collect {|s| [t("spree.shipping_method_names.#{s.name}", default: s.name), s.id]}),
options_for_select(Spree::ShippingMethod.managed_by(spree_current_user).map {|s| [s.name, s.id]}),
{ include_blank: true, class: "primary", "data-controller": "tom-select" })
.field-block.alpha.eight.columns
= label_tag nil, t(:distributors)

View File

@@ -41,8 +41,8 @@ RSpec.describe '
distributors: [distributor, distributor2, distributor3])
}
let!(:shipping_method2) {
create(:shipping_method_with, :pickup, name: "delivery",
distributors: [distributor4, distributor5])
create(:shipping_method_with, :delivery, name: "delivery",
distributors: [distributor4, distributor5])
}
let(:order_cycle) do
create(:simple_order_cycle, name: 'One', distributors: [distributor, distributor2,

View File

@@ -37,12 +37,12 @@ RSpec.describe '
}
let(:distributor5) { create(:distributor_enterprise, owner: owner2, charges_sales_tax: true) }
let!(:shipping_method) {
create(:shipping_method_with, :pickup, name: "pick_up",
create(:shipping_method_with, :pickup, name: "Pick up at the farm",
distributors: [distributor, distributor2, distributor3])
}
let!(:shipping_method2) {
create(:shipping_method_with, :pickup, name: "delivery",
distributors: [distributor4, distributor5])
create(:shipping_method_with, :delivery, name: "Home delivery to your convenience",
distributors: [distributor4, distributor5])
}
let(:order_cycle) do
create(:simple_order_cycle, name: 'One', distributors: [distributor, distributor2,
@@ -190,7 +190,7 @@ RSpec.describe '
order2.select_shipping_method(shipping_method.id)
order4.select_shipping_method(shipping_method2.id)
tomselect_search_and_select "Pick-up at the farm", from: 'shipping_method_id'
tomselect_search_and_select "Pick up at the farm", from: 'shipping_method_id'
page.find('.filter-actions .button[type=submit]').click
# Order 2 should show, but not 3 and 5
expect(page).to have_content order2.number
@@ -199,7 +199,7 @@ RSpec.describe '
find("#clear_filters_button").click
tomselect_search_and_select "Signed, sealed, delivered", from: 'shipping_method_id'
tomselect_search_and_select "Home delivery to your convenience", from: 'shipping_method_id'
page.find('.filter-actions .button[type=submit]').click
# Order 4 should show, but not 2 and 3
expect(page).not_to have_content order2.number