Move enterprise_fee_summaries_spec to order_management engine, moving

translation keys for the views and adapting some routes
This commit is contained in:
Luis Ramos
2020-03-18 12:09:12 +00:00
parent b4befea606
commit 3f5a964dec
4 changed files with 15 additions and 15 deletions

View File

@@ -2816,6 +2816,14 @@ See the %{link} to find out more about %{sitename}'s features and to start using
order_management:
reports:
enterprise_fee_summaries:
filters:
date_range: "Date Range"
report_format_csv: "Download as CSV"
generate_report: "Generate Report"
report:
none: "None"
select_and_search: "Select filters and click on GENERATE REPORT to access your data."
enterprise_fee_summary:
date_end_before_start_error: "must be after start"
parameter_not_allowed_error: "You are not authorized to use one or more selected filters for this report."
@@ -3318,14 +3326,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
bulk_coop_allocation: 'Bulk Co-op - Allocation'
bulk_coop_packing_sheets: 'Bulk Co-op - Packing Sheets'
bulk_coop_customer_payments: 'Bulk Co-op - Customer Payments'
enterprise_fee_summaries:
filters:
date_range: "Date Range"
report_format_csv: "Download as CSV"
generate_report: "Generate Report"
report:
none: "None"
select_and_search: "Select filters and click on GENERATE REPORT to access your data."
users:
index:
listing_users: "Listing Users"

View File

@@ -1,4 +1,4 @@
= form_for @report_parameters, as: :report, url: spree.admin_reports_enterprise_fee_summary_path, method: :post do |f|
= form_for @report_parameters, as: :report, url: main_app.order_management_reports_enterprise_fee_summary_path, method: :post do |f|
.row.date-range-filter
.sixteen.columns.alpha
= label_tag nil, t(".date_range")

View File

@@ -13,7 +13,7 @@
- if @renderer.data_rows.empty?
%tr
%td{colspan: @renderer.header.length}= t(:none)
%td{colspan: @renderer.header.length}= t('.none')
- else
%p.report__message
= t(".select_and_search")

View File

@@ -41,7 +41,7 @@ feature "enterprise fee summaries", js: true do
it "does not allow access to the report" do
visit spree.admin_reports_path
expect(page).to have_no_link(I18n.t("admin.reports.enterprise_fee_summary.name"))
visit spree.new_admin_reports_enterprise_fee_summary_path
visit main_app.new_order_management_reports_enterprise_fee_summary_path
expect(page).to have_content(I18n.t("unauthorized"))
end
end
@@ -49,7 +49,7 @@ feature "enterprise fee summaries", js: true do
describe "smoke test for filters" do
before do
visit spree.new_admin_reports_enterprise_fee_summary_path
visit main_app.new_order_management_reports_enterprise_fee_summary_path
end
context "when logged in as admin" do
@@ -80,7 +80,7 @@ feature "enterprise fee summaries", js: true do
describe "smoke test for generation of report based on permissions" do
before do
visit spree.new_admin_reports_enterprise_fee_summary_path
visit main_app.new_order_management_reports_enterprise_fee_summary_path
end
context "when logged in as admin" do
@@ -138,7 +138,7 @@ feature "enterprise fee summaries", js: true do
let(:current_user) { create(:admin_user) }
before do
visit spree.new_admin_reports_enterprise_fee_summary_path
visit main_app.new_order_management_reports_enterprise_fee_summary_path
end
it "generates file with data for selected order cycle" do
@@ -155,6 +155,6 @@ feature "enterprise fee summaries", js: true do
end
def i18n_scope
"spree.admin.reports.enterprise_fee_summaries"
"order_management.reports.enterprise_fee_summaries"
end
end