Skip to content

Commit

Permalink
Merge pull request #13134 from dacook/fix-locale-12301
Browse files Browse the repository at this point in the history
Update label and change default dev locale
  • Loading branch information
dacook authored Feb 18, 2025
2 parents 29c3ef3 + 363cc10 commit 96b8a4c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en_GB.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions spec/system/admin/dfc_product_import_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
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"
Expand Down Expand Up @@ -55,7 +55,7 @@

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"
Expand Down Expand Up @@ -97,19 +97,19 @@
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"
Expand Down

0 comments on commit 96b8a4c

Please sign in to comment.