mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
Merge pull request #13134 from dacook/fix-locale-12301
Update label and change default dev locale
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
# cp .env.development .env.local
|
||||
|
||||
# Locale for translation. Using a locale other than `en` tests the
|
||||
# successful fallback to `en`. You will also see up-to-date text used
|
||||
# in production
|
||||
LOCALE="en_AU"
|
||||
# successful fallback to `en`. To see up-to-date text used in production,
|
||||
# set another locale in a local env file.
|
||||
LOCALE="en_TST"
|
||||
|
||||
VERBOSE_QUERY_LOGS=true
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Override locally with `.env.test.local`
|
||||
|
||||
# Locale for translation.
|
||||
LOCALE="en_TEST"
|
||||
LOCALE="en_TST"
|
||||
|
||||
OFN_REDIS_JOBS_URL="redis://localhost:6379/2"
|
||||
|
||||
|
||||
@@ -1042,7 +1042,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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user