Pau Perez
8ab77b077b
Fix spec
...
This needs to be revisited. I'm not sure it's the most appropriate spec
as it seems to be testing just part of story.
2019-07-05 18:19:58 +02:00
Pau Perez
4a67ffab25
Add a test case for reports with deleted products
2019-07-04 17:01:06 +02:00
luisramos0
86b0d71c7e
Result of rubocop auto-correct and rebuilding rubocop_manual_todo
2019-05-28 12:57:29 +01:00
luisramos0
05d42d475e
Make reports and subscriptions specs work without product.distributors attribute
2019-03-13 12:24:40 +00:00
Maikel Linke
40b0a0bd5a
Determine searching state by params, not request
...
We may want to use GET for searching or POST to display a certain report
type.
2018-05-18 11:27:48 +10:00
Maikel Linke
8a1a540f3d
Clarify creating objects for test context
2018-05-18 11:27:48 +10:00
Maikel Linke
8a4457e8e4
Give better names
2018-05-18 11:27:48 +10:00
Maikel Linke
1e80487afc
Compile Order And Distributors only on search
...
And move most logic into the report class like the others.
2018-05-18 11:27:47 +10:00
Maikel Linke
53436024e2
Compile Orders & Fulfillment report only on search
2018-05-18 11:27:47 +10:00
Maikel Linke
feb33c3ca5
Compile Payments report only on search
2018-05-18 11:27:47 +10:00
Maikel Linke
bf74282e5f
Compile Bulk Co-Op report only on search
2018-05-18 11:27:47 +10:00
Maikel Linke
5f9d239f19
Compile Products & Inventory report only on search
2018-05-18 11:27:47 +10:00
Maikel Linke
d464216027
Don't compile Sales Tax report data before search
2018-05-18 11:27:47 +10:00
Maikel Linke
983e128d90
Half test run time by loading less data
...
On my computer it took 3 seconds to load all four orders with all the
attached order cycles and enterprises.
Runtime before: 56.38 seconds
Runtime after: 25.14 seconds
This really speeds up developing reports.
2018-05-18 11:27:47 +10:00
Maikel Linke
14e7cdd138
Don't compile customers report data before search
...
Distributors, suppliers and order cycles are still loaded for the search
form.
2018-05-18 11:27:47 +10:00
Maikel Linke
8393b1d4c0
Don't compile user-enterprises report before search
2018-05-18 11:27:47 +10:00
Maikel Linke
99a6afd9cd
Convert specs to RSpec 3.7.0 syntax with Transpec
...
This conversion is done by Transpec 3.3.0 with the following command:
transpec spec/controllers/spree/admin/reports_controller_spec.rb
* 20 conversions
from: obj.should
to: expect(obj).to
* 14 conversions
from: obj.should_not
to: expect(obj).not_to
* 5 conversions
from: == expected
to: eq(expected)
* 4 conversions
from: obj.stub(:message)
to: allow(obj).to receive(:message)
* 2 conversions
from: obj.should_receive(:message)
to: expect(obj).to receive(:message)
For more details: https://github.com/yujinakayama/transpec#supported-conversions
2018-05-18 11:27:46 +10:00
Rob Harrington
82072c8970
Explicitly specifying 'type: :controller' for all controller specs
2017-11-10 08:47:12 +11:00
Rob Harrington
7c0feab08f
Fix #1526 : add descriptions for reports *before* they are filtered
2017-07-28 17:15:57 +10:00
Julius Pabrinkis
55b2c19b64
Extract translations from lib folder
2017-07-21 12:17:12 +10:00
Rob Harrington
4b5e33d5b0
Implementing new permissions for producers in reports_controller_spec
2015-12-17 14:21:30 +11:00
Rohan Mitchell
9ffc97f8b6
Fix controller spec for extraction of report controller logic
2015-07-24 14:10:04 +10:00
Rohan Mitchell
97e49c2bdb
Replace 'array.sort.should == expected.sort' pattern with match_array
2015-05-28 10:46:08 +10:00
Rob Harrington
0d5ce5ff57
Fixing issues with reports controller spec
2015-05-07 12:50:57 +10:00
Rohan Mitchell
f18141c9bb
Use controller login helpers
2014-07-16 10:29:58 +10:00
Rohan Mitchell
634af96a66
Update reports controller spec for multi-order-cycle params
2014-06-06 09:47:16 +10:00
Rohan Mitchell
0d97397084
Fix fragile specs (ordering)
2014-03-12 15:00:20 +11:00
Will Marshall
cdd64d438a
Adding another trivial sort to a test
2014-01-16 13:23:57 +11:00
Rohan Mitchell
c08c42b087
Fix inconsistent test fails - insignificant ordering
2014-01-08 15:11:46 +11:00
Will Marshall
6e36142809
Making some changes to the data on the products inventory page
2013-12-13 11:39:45 +11:00
Will Marshall
b3bf3a8378
Adding the plumbing for Customers reports, and one tiny refactor to products
2013-11-22 14:56:57 +11:00
Will Marshall
f642d6532a
Removing reundant Group Buys spec now we've removed Group Buys
2013-11-21 14:06:46 +11:00
Will Marshall
d703e1836f
Working build of P&I report
2013-11-21 14:06:24 +11:00
Will Marshall
6a11b2685f
Controller plumbing for Product & Inventory report
2013-11-20 13:58:01 +11:00
David Cook
fe513d42c4
Rename 'Order Cycles' report group to 'Orders & Fulfillment'
2013-09-18 09:25:51 +10:00
David Cook
80bfc5ce53
Ensure Supplier enterprise users can only view their own products in reports
2013-08-30 15:17:27 +10:00
David Cook
9de5a0061e
Enterprise user can only view their own distributors in reports (and remove redundant feature test)
2013-08-23 16:09:37 +10:00
David Cook
f1c2582e65
WIP: Test for enterprise user access in reports
2013-08-22 12:49:39 +10:00