Konrad
f3b09508ff
Merge pull request #11347 from abdellani/fix-edit-order-button
...
fix cancel order button
2023-08-18 17:07:42 +02:00
Konrad
d8bc479a70
Merge pull request #11387 from jibees/10957-missing-translation-invalid-url
...
Admin, White Label: add translation for invalid URL in white label context
2023-08-18 15:59:39 +02:00
Jean-Baptiste Bellet
66a106b1c9
hide pagination for single page catalogue
...
+ update specs then
2023-08-17 09:26:10 +02:00
Maikel
6377149e18
Merge pull request #11400 from jibees/buu-update/refactor-tests
...
🚧 BUU: refactor/improve testing
2023-08-17 16:32:00 +10:00
Maikel
27dcad205e
Merge pull request #11337 from macanudo527/fix_rubocop_6
...
Fix autocorrect Rails Cops 2
2023-08-17 10:39:34 +10:00
David Cook
b49de7d49e
Simplify spec
...
What if Zucchini didn't appear at all? Better to test that the two products appear on the same page, in the correct order.
2023-08-16 11:13:54 +10:00
David Cook
1155bd42ea
Reflex test to reveal collation sorting varies on different OS...
...
https://dba.stackexchange.com/questions/106964/why-is-my-postgresql-order-by-case-insensitive
Uncommented, the spec fails on macOS (BSD).. but succeeds in Ubuntu (Linux). Weird.
2023-08-15 08:36:22 +02:00
David Cook
e816228959
Sort products by name in ascending order
...
The order is specified above in fetch_products. I'm guessing this line was unintentional?
Original requirment doesn't say ascending but I think it's safe to assume (issue#10694).
2023-08-15 08:36:22 +02:00
David Cook
6dbfb36e52
Spec: use url helpers
...
To be consistent with other specs.
2023-08-15 08:36:22 +02:00
David Cook
9a3820db4f
Tidy up spec
...
Although 'describe' and 'context' are the same simple constructs to label groups of examples, to humans they mean:
* Describe a particular domain of functionality
* Context means a different environment, IE something has been set up differently (generally with before and/or let blocks)
Also the default 'before' is :each, so we don't need to specify it.
2023-08-15 08:36:22 +02:00
David Cook
757ba27908
Optimise spec: only create objects when needed
...
Moving the 'clear filters' and 'no results' tests up into the first context.
2023-08-15 08:36:22 +02:00
David Cook
2a4d5af552
Remove redundant test
...
This is already covered in the following test.
2023-08-15 08:36:21 +02:00
Matt-Yorkley
97d9aadb69
Update specs
2023-08-14 21:02:48 +01:00
Neal Chambers
94f1b89a9f
Safely autocorrect Rails/RootPublicPath
...
Inspecting 1484 files
.............................................................................................C........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.........................................................................................C..........C..........................................................................................................................................................................................................................................................................................................C....................................................................................................................................................................C...................C.............................................................C.C.......C....................
Offenses:
app/controllers/concerns/request_timeouts.rb:19:22: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
file: Rails.root.join("public/500.html"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/spree/core/controller_helpers/common.rb:45:30: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
file: Rails.root.join("public/404.html"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/controllers/api/v0/product_images_controller_spec.rb:13:22: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:pdf_path) { Rails.root.join("public/Terms-of-service.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/controllers/api/v0/terms_and_conditions_controller_spec.rb:15:31: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:terms_file_path) { Rails.root.join("public/Terms-of-service.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/models/terms_of_service_file_spec.rb:6:25: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:pdf) { File.open(Rails.root.join("public/Terms-of-service.pdf")) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/bulk_product_update_spec.rb:907:37: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
attach_file 'image-upload', Rails.root.join("public/500.jpg"), visible: false
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/enterprises/terms_and_conditions_spec.rb:27:30: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:original_terms) { Rails.root.join("public/Terms-of-service.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/enterprises/terms_and_conditions_spec.rb:28:29: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:updated_terms) { Rails.root.join("public/Terms-of-ServiceUK.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/shopping/checkout_spec.rb:94:9: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
Rails.root.join("public/Terms-of-service.pdf"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/shopping/embedded_groups_spec.rb:18:9: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
Rails.root.join("public/embedded-group-preview.html")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/shopping/embedded_groups_spec.rb:26:9: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
Rails.root.join("public/embedded-group-preview.html")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/split_checkout_spec.rb:986:35: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:system_terms_path) { Rails.root.join("public/Terms-of-service.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/split_checkout_spec.rb:987:33: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:shop_terms_path) { Rails.root.join("public/Terms-of-ServiceUK.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1484 files inspected, 13 offenses detected, 13 offenses corrected
2023-08-14 17:29:11 +09:00
Maikel Linke
91e4fb18ed
Use input labels in Voucher system spec
...
It's more robust, and closer to what the user sees and does. It's also
verifying that the labels are correctly connected to the inputs.
2023-08-14 12:46:13 +10:00
Konrad
99daab07b7
Merge pull request #11297 from mkllnk/require-belongs-to--part2
...
Require belongs_to associations by default
2023-08-12 17:09:03 +02:00
Gaetan Craig-Riou
29a38467d2
Fix admin pages to work with refactored vouchers
2023-08-11 14:54:23 +10:00
Gaetan Craig-Riou
cc9069e9c6
Add voucher type to admin screen
...
Plus specs
2023-08-11 14:19:26 +10:00
Maikel Linke
efbf1d6b8f
Stabilise flaky assertion on PDF text
...
The PDF reader can't always place text elements in the right place. So
something that should be in one line can be in multiple lines and those
lines can be in a different order. I'm asserting the moving parts
separately as done in other places of this spec.
2023-08-11 10:14:47 +10:00
Konrad
60212f92c3
Merge pull request #11270 from rioug/9553-removing-cutomer-tag-when-search-for-tag
...
Fix removing customer tag when using search bar for said tag
2023-08-11 00:11:55 +02:00
Jean-Baptiste Bellet
5b4b37032c
Add translation for invalid URL in white label context
2023-08-10 15:22:35 +02:00
Mohamed ABDELLANI
620dd70dd7
rename 'new invoice' button to 'create or update invoice'
2023-08-10 09:35:13 +10:00
Rachel Arnould
4505beff98
Merge pull request #11327 from bouaik/fix-display-invoice-tab-for-completed-resumed-canceled-only
...
Fix display invoice tab for completed, resumed and canceled orders only
2023-08-09 18:37:02 +02:00
Rachel Arnould
2b108dfeee
Merge pull request #11116 from abdellani/fix-show-date-only-on-invoices-list
...
render date without time on invoices list
2023-08-09 14:33:40 +02:00
Matt-Yorkley
321047d663
Update specs
2023-08-08 11:36:31 +01:00
Mohamed ABDELLANI
c185a47592
render the confirm model on the same component that includes the action on the order.
2023-08-08 07:32:20 +01:00
Gaetan Craig-Riou
6f10907555
Fix rubocop warnings
2023-08-08 15:37:05 +10:00
Gaetan Craig-Riou
4e468c81f9
Handle updating customer attribute when directive is destroyed
...
Handle any customer attribute not just tags
2023-08-08 15:29:22 +10:00
Gaetan Craig-Riou
41dbad629b
Add system spec to cover deleting data when filtering
...
covers tag scenario and code scenario
2023-08-08 15:29:22 +10:00
David Cook
42230c07b2
Merge pull request #11312 from macanudo527/fix_rubocop_5
...
Fix autocorrect Rails Cops
2023-08-04 11:13:52 +10:00
bouaik
41d649404f
make suggested changes
2023-08-04 00:55:35 +01:00
Maikel
2b18effe6d
Merge pull request #11322 from macanudo527/fix_remaining_line_length
...
Fix remaining Layout/LineLength Rubocop Errors
2023-08-04 09:34:00 +10:00
Filipe
69dfd53658
Merge pull request #11254 from rioug/11130-add-product-filter-order-report
...
11130 add product filter order report
2023-08-03 16:08:44 +01:00
Mohamed ABDELLANI
c21ffd338b
fix only date is expected on the invoices list table.
...
time is not supposed to be rendered on the invoices list table (only date)
2023-08-03 15:12:02 +01:00
Mohamed ABDELLANI
5358802ab5
replace Presenter#invoice_date with a delagator
2023-08-03 15:11:58 +01:00
Mohamed ABDELLANI
d044959cec
fix date formatting
...
implement a new helper `pretty_date`
2023-08-03 14:55:26 +01:00
Mohamed ABDELLANI
8fecc9db4b
render date without time on invoices list
...
+ sort invoices in the reverse order of the creation time
2023-08-03 14:55:26 +01:00
bouaik
0c849f08fd
fix tests
2023-08-03 13:04:16 +01:00
Filipe
46cb1add63
Merge pull request #11126 from abdellani/show-invoice-number-on-invoices
...
Show invoice number on invoices
2023-08-03 10:48:34 +01:00
Filipe
c0a4bccb3e
Merge pull request #11156 from Matt-Yorkley/product-tax-category
...
[Product Refactor] Tax category
2023-08-03 10:29:40 +01:00
Neal Chambers
a4f270bdec
Fix Layout/LineLength
2023-08-03 09:49:47 +09:00
Konrad
27e3a65440
Merge pull request #11234 from jibees/10867-vouchers-vouchers-page-is-shown-for-profile-enterprises
...
Show vouchers panel only if enterprise sells products (own or any)
2023-08-02 13:11:29 +02:00
Konrad
44d25dbb6a
Merge pull request #11299 from cillian/order-name-sorting
...
Sort orders by last name, then first name i.e. the same way bulk order management works
2023-08-02 11:30:25 +02:00
Neal Chambers
f47f6efcd0
Safely autocorrect Rails/DurationArithmetic
...
Inspecting 1481 files
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.C.................................................................................................................................................................................................................................................................................C..............C..........................................................C...............................C....C..........CC................................................................
Offenses:
app/services/create_order_cycle.rb:41:24: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
orders_close_at: Time.zone.now + 1.month
^^^^^^^^^^^^^^^^^^^^^^^
spec/jobs/order_cycle_closing_job_spec.rb:7:74: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
create(:order_cycle, automatic_notifications: true, orders_close_at: Time.zone.now - 1.minute)
^^^^^^^^^^^^^^^^^^^^^^^^
spec/jobs/order_cycle_closing_job_spec.rb:10:74: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
create(:order_cycle, automatic_notifications: true, orders_close_at: Time.zone.now + 1.minute)
^^^^^^^^^^^^^^^^^^^^^^^^
spec/jobs/order_cycle_closing_job_spec.rb:13:75: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
create(:order_cycle, automatic_notifications: false, orders_close_at: Time.zone.now - 1.minute)
^^^^^^^^^^^^^^^^^^^^^^^^
spec/jobs/order_cycle_opened_job_spec.rb:7:42: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
create(:order_cycle, orders_open_at: Time.zone.now - 1.hour)
^^^^^^^^^^^^^^^^^^^^^^
spec/jobs/order_cycle_opened_job_spec.rb:13:42: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
create(:order_cycle, orders_open_at: Time.zone.now + 1.minute)
^^^^^^^^^^^^^^^^^^^^^^^^
spec/services/permissions/order_spec.rb:26:58: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
completed_at: Time.zone.now - 1.year)
^^^^^^^^^^^^^^^^^^^^^^
spec/services/terms_of_service_spec.rb:21:71: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
allow(customer).to receive(:terms_and_conditions_accepted_at) { Time.zone.now - 1.week }
^^^^^^^^^^^^^^^^^^^^^^
spec/services/terms_of_service_spec.rb:22:59: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
allow(TermsOfServiceFile).to receive(:updated_at) { Time.zone.now - 2.weeks }
^^^^^^^^^^^^^^^^^^^^^^^
spec/services/terms_of_service_spec.rb:36:71: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
allow(customer).to receive(:terms_and_conditions_accepted_at) { Time.zone.now - 1.week }
^^^^^^^^^^^^^^^^^^^^^^
spec/services/terms_of_service_spec.rb:38:45: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
ActiveStorage::Blob.new(created_at: Time.zone.now - 2.weeks)
^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/bulk_order_management_spec.rb:647:57: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
completed_at: Time.zone.now + 1.week,
^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/bulk_order_management_spec.rb:652:57: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
completed_at: Time.zone.now + 2.weeks,
^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/bulk_order_management_spec.rb:661:40: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
oc3.update!(orders_close_at: Time.zone.now + 2.weeks)
^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/bulk_order_management_spec.rb:662:39: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
oc3.update!(orders_open_at: Time.zone.now + 1.week)
^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/order_cycles/list_spec.rb:128:18: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
oc_open_at = Time.zone.now - 2.weeks
^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/order_cycles/list_spec.rb:129:19: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
oc_close_at = Time.zone.now + 2.weeks
^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/orders_spec.rb:289:40: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
order2.update!(completed_at: Time.zone.now - 2.weeks)
^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/orders_spec.rb:290:40: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
order3.update!(completed_at: Time.zone.now - 3.weeks)
^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/orders_spec.rb:291:40: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
order4.update!(completed_at: Time.zone.now - 4.weeks)
^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/orders_spec.rb:292:40: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
order5.update!(completed_at: Time.zone.now - 5.weeks)
^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/reports/orders_and_fulfillment_spec.rb:113:31: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
let(:completed_at1) { Time.zone.now - 1500.hours } # 1500 hours in the past
^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/reports/orders_and_fulfillment_spec.rb:114:31: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
let(:completed_at2) { Time.zone.now - 1700.hours } # 1700 hours in the past
^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/reports/orders_and_fulfillment_spec.rb:115:33: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
let(:datetime_start1) { Time.zone.now - 1600.hours } # 1600 hours in the past
^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/reports/orders_and_fulfillment_spec.rb:116:33: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
let(:datetime_start2) { Time.zone.now - 1800.hours } # 1600 hours in the past
^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/reports/orders_and_fulfillment_spec.rb:117:30: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
let(:datetime_end) { Time.zone.now - 1400.hours } # 1400 hours in the past
^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/reports/packing_report_spec.rb:13:26: C: [Corrected] Style/RedundantParentheses: Don't use parentheses around a method call.
let!(:open_datetime) { (1.month.ago).strftime("%Y-%m-%d 00:00") }
^^^^^^^^^^^^^
spec/system/admin/reports/packing_report_spec.rb:13:27: C: [Corrected] Rails/DurationArithmetic: Do not add or subtract duration.
let!(:open_datetime) { (Time.zone.now - 1.month).strftime("%Y-%m-%d 00:00") }
^^^^^^^^^^^^^^^^^^^^^^^
1481 files inspected, 28 offenses detected, 28 offenses corrected
2023-08-01 22:50:21 +09:00
Mohamed ABDELLANI
760b17042b
fix existing tests
2023-07-31 16:31:24 +01:00
Matt-Yorkley
07774c4572
Update tax category specs
2023-07-31 09:23:20 +10:00
Matt-Yorkley
b2a7a931f3
Update tax_category tests
2023-07-31 09:23:20 +10:00
Matt-Yorkley
a52516bcbf
Move tax_category dropdown in edit pages
2023-07-31 09:23:20 +10:00
Matt-Yorkley
4934d09a4c
Update delegation and method chaining between product and tax_category
2023-07-31 09:23:20 +10:00
Cillian O'Ruanaidh
8039c0106a
Set firstname correctly in spec/system/admin/orders_spec.rb
2023-07-28 15:04:47 +01:00