mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #8400 from filipefurtad0/reports_into_system
Reports into system specs
This commit is contained in:
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@@ -35,7 +35,6 @@ jobs:
|
||||
- "spec/models"
|
||||
- "spec/features/admin/[a-o0-9]*_spec.rb"
|
||||
- "spec/features/admin/[p-z]*_spec.rb"
|
||||
- "spec/features/admin/*/*_spec.rb"
|
||||
- "spec/features/consumer"
|
||||
- "spec/lib"
|
||||
- "spec/migrations"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "spec_helper"
|
||||
require "system_helper"
|
||||
|
||||
describe "Packing Reports", js: true do
|
||||
include AuthenticationHelper
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'system_helper'
|
||||
|
||||
describe "Payments Reports" do
|
||||
include AuthenticationHelper
|
||||
@@ -40,16 +40,16 @@ describe "Payments Reports" do
|
||||
select I18n.t(:report_itemised_payment), from: "report_type"
|
||||
find("[type='submit']").click
|
||||
|
||||
expect(page.find("#listing_orders thead tr").text).to eq([
|
||||
expect(page.find("#listing_orders thead tr").text).to have_content([
|
||||
I18n.t(:report_header_payment_state),
|
||||
I18n.t(:report_header_distributor),
|
||||
I18n.t(:report_header_product_total_price, currency: currency_symbol),
|
||||
I18n.t(:report_header_shipping_total_price, currency: currency_symbol),
|
||||
I18n.t(:report_header_outstanding_balance_price, currency: currency_symbol),
|
||||
I18n.t(:report_header_total_price, currency: currency_symbol)
|
||||
].join(" "))
|
||||
].join(" ").upcase)
|
||||
|
||||
expect(page.find("#listing_orders tbody tr").text).to eq([
|
||||
expect(page.find("#listing_orders tbody tr").text).to have_content([
|
||||
order.payment_state,
|
||||
order.distributor.name,
|
||||
order.item_total.to_f + other_order.item_total.to_f,
|
||||
@@ -77,7 +77,7 @@ describe "Payments Reports" do
|
||||
select I18n.t(:report_payment_totals), from: "report_type"
|
||||
find("[type='submit']").click
|
||||
|
||||
expect(page.find("#listing_orders thead tr").text).to eq([
|
||||
expect(page.find("#listing_orders thead tr").text).to have_content([
|
||||
I18n.t(:report_header_payment_state),
|
||||
I18n.t(:report_header_distributor),
|
||||
I18n.t(:report_header_product_total_price, currency: currency_symbol),
|
||||
@@ -86,9 +86,9 @@ describe "Payments Reports" do
|
||||
I18n.t(:report_header_eft_price, currency: currency_symbol),
|
||||
I18n.t(:report_header_paypal_price, currency: currency_symbol),
|
||||
I18n.t(:report_header_outstanding_balance_price, currency: currency_symbol),
|
||||
].join(" "))
|
||||
].join(" ").upcase)
|
||||
|
||||
expect(page.find("#listing_orders tbody tr").text).to eq([
|
||||
expect(page.find("#listing_orders tbody tr").text).to have_content([
|
||||
order.payment_state,
|
||||
order.distributor.name,
|
||||
order.item_total.to_f + other_order.item_total.to_f,
|
||||
Reference in New Issue
Block a user