From bbc7f21ecd2e5550910101dd2de809ea71c05f5a Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 4 Feb 2025 15:14:41 +1100 Subject: [PATCH] Rename field label This could have been done in Transifex, but I figured it would be quicker to just go ahead and update here. --- config/locales/en.yml | 2 +- config/locales/en_GB.yml | 2 +- spec/system/admin/dfc_product_import_spec.rb | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index a5e4d07414..a5636589e7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1041,7 +1041,7 @@ en: shipping_categories: Shipping Categories dfc_import_form: title: "Import from DFC catalog" - enterprise: "Enterprise" + enterprise: "Create products for enterprise" catalog_url: "DFC catalog URL" preview: Preview import: diff --git a/config/locales/en_GB.yml b/config/locales/en_GB.yml index 3545fc8384..2b6e8fe2b9 100644 --- a/config/locales/en_GB.yml +++ b/config/locales/en_GB.yml @@ -946,7 +946,7 @@ en_GB: shipping_categories: Shipping Categories dfc_import_form: title: "Import from DFC catalogue" - enterprise: "Enterprise" + enterprise: "Create products for enterprise" catalog_url: "DFC catalogue URL" import: "Import" import: diff --git a/spec/system/admin/dfc_product_import_spec.rb b/spec/system/admin/dfc_product_import_spec.rb index b044e210bc..8f4d3f2487 100644 --- a/spec/system/admin/dfc_product_import_spec.rb +++ b/spec/system/admin/dfc_product_import_spec.rb @@ -25,7 +25,7 @@ RSpec.describe "DFC Product Import" do host = Rails.application.default_url_options[:host] url = "http://#{host}/api/dfc/enterprises/#{enterprise.id}/catalog_items" fill_in "catalog_url", with: url - select enterprise.name, from: "Enterprise" + select enterprise.name, from: "Create products for enterprise" click_button "Preview" expect(page).to have_content "Saucy preserves" @@ -55,7 +55,7 @@ RSpec.describe "DFC Product Import" do url = "https://env-0105831.jcloud-ver-jpe.ik-server.com/api/dfc/Enterprises/test-hodmedod/SuppliedProducts" fill_in "catalog_url", with: url - select enterprise.name, from: "Enterprise" + select enterprise.name, from: "Create products for enterprise" click_button "Preview" expect(page).to have_content "4 products to be imported" @@ -97,19 +97,19 @@ RSpec.describe "DFC Product Import" do stub_request(:get, url).to_return(status: [401, "Unauthorized"]) visit admin_product_import_path - select enterprise.name, from: "Enterprise" + select enterprise.name, from: "Create products for enterprise" fill_in "catalog_url", with: url expect { click_button "Preview" }.not_to change { Spree::Variant.count } expect(page).to have_content "the server responded with status 401" - select enterprise.name, from: "Enterprise" + select enterprise.name, from: "Create products for enterprise" fill_in "catalog_url", with: "badurl" click_button "Preview" expect(page).to have_content "Absolute URI missing hierarchical segment: 'http://:80'" - select enterprise.name, from: "Enterprise" + select enterprise.name, from: "Create products for enterprise" fill_in "catalog_url", with: "" click_button "Preview" expect(page).to have_content "param is missing or the value is empty: catalog_url"