Commit Graph

1188 Commits

Author SHA1 Message Date
filipefurtad0
5e7e120fcb Addresses Gaetans review
Removes assertions from before block, as Delete case is tested elsewhere

Declares enterprise_user variable as a non-instance variable
2024-06-17 14:56:23 +02:00
filipefurtad0
2eb1bc4d0a reverts changes on products_spec 2024-06-17 14:56:23 +02:00
filipefurtad0
04cb6b40be Adds tests around managing rights -> 'as an enterprise manager' 2024-06-17 14:56:23 +02:00
filipefurtad0
ee15be3aac Adds a test to assure that the new product path works as expected
The funcitonaliy itself should not be affected by BUU, so the tests remain at ./spec/system/admin/products_spec.rb
2024-06-17 14:56:23 +02:00
filipefurtad0
11365dc9a5 Removes comment on issue #7180, now closed 2024-06-17 14:56:23 +02:00
filipefurtad0
a70e6af7ac Removes deleting and cloning test from the legacy bulk product edit page
These are covered in the new BUU products page
2024-06-17 14:56:23 +02:00
filipefurtad0
c06ac4ca4d Removes test case on access rights to the products page
Moves test on access rights to authentication_spec

The test on accessing the products page as an anonymous does not seem specific to the products page (IMO); as we're testing access rights and the Devise gem (right?) we're probably better off having this test in a more suitable and general context, such as as a spec dealing with authentications and redirects
2024-06-17 14:56:23 +02:00
filipefurtad0
514117865e Adds test case around shipped product
Removes test case around shipped product for legacy products page
2024-06-17 14:56:23 +02:00
Maikel Linke
f0ccfb1f91 Avoid flakiness with Capybara features
Capybara should be clever enought to scroll to an element. The old
method failed nine times in CI. I couldn't reproduce it locally but
let's see if this is better.
2024-06-17 14:56:23 +02:00
Filipe
03c5a9b4cc Revert "[Invoices] Notify if any order cannot be invoiced on bulk invoice sending" 2024-06-17 14:56:23 +02:00
cyrillefr
0beda91541 Requested changes on spec
- if possible no sleep in spec
2024-06-17 14:56:23 +02:00
cyrillefr
fb712be430 Update and Recalculate Fees after Order Adjusted in Backend
- when update on adjustment in payment, recalculation of
  correct adjustment was not done
- the corresponding spec
- an id to easy the finding of the change of fees in the spec
2024-06-17 14:56:23 +02:00
Maikel Linke
29adbcb479 Import products from the FDC (Shopify) API 2024-06-17 14:56:23 +02:00
Abdellani
4a434873bc update tests 2024-06-17 14:56:23 +02:00
zanetagebka
053076e062 Fix test 2024-06-17 14:56:23 +02:00
zanetagebka
028686eea4 Fix cops StringConcatenation 2024-06-17 14:56:23 +02:00
cyrillefr
2ab61c423e Bugfix on spec 2024-06-17 14:56:23 +02:00
cyrillefr
40128d7311 Force start date before end date with range mode flatpickr
- modify view to get a flatpickr component in range mode
  - modify spec to take into account range mode
2024-06-17 14:56:23 +02:00
Ahmed Ejaz
e11a3ac53e 12398: fix failing specs 2024-06-17 14:56:22 +02:00
David Cook
746b8fc703 Remove redundant code 2024-06-17 14:56:22 +02:00
filipefurtad0
8de9055e7b Removes tests on edit action, under the Delete section 2024-06-17 14:56:22 +02:00
filipefurtad0
9af7975d1c Applies existing helper to assert on rows with product name 2024-06-17 14:56:22 +02:00
filipefurtad0
bea6344fc5 Assures the Edit button link is always displayed for the first variant,
although the delete button is not

Also should work for a second (non-default variant)

Removes unecessary test cases
2024-06-17 14:56:22 +02:00
filipefurtad0
43ee364bf8 Removes pending test case - covered in:
- Changing producers, category and tax category, done in 15ee4f6

- Updating Unit value, done in 49226ff

Removes comment about errors for empty variant_unit_name

I think this was done in commit f05d27b

Would you agree @dacook?
2024-06-17 14:56:22 +02:00
filipefurtad0
3009490c15 Updates tests around product and variant search
Adds test for a non-existing product

Adds test for variant search

Improves tests with multiple variants
2024-06-17 14:56:22 +02:00
filipefurtad0
20fb38da96 Adds tests around using the page
- with no products

- column display dropdown

- listing products with several variants
2024-06-17 14:56:22 +02:00
Maikel Linke
4b4ae8c7ba Allow only enterprise managers to connect apps
Otherwise it doesn't work because non-managers, like super admins, are
not authorised to access enterprise data via the DFC API.
2024-06-17 14:56:22 +02:00
David Cook
1d11f8c85b Move bulk order actions to separate spec file
This was another large file, potentially causing a bottleneck.
All the order setup is duplicated from the other file which is a bit of shame, but I think it makes sense.
2024-05-22 09:20:12 +10:00
David Cook
39f1eac300 Move invoices specs to the invoices spec file
The orders file is too big and causes a bottleneck for parallelising specs.

Maybe they should be merged with the above specs, but I'm not familiar enough to know for sure.
2024-05-21 16:43:17 +10:00
Filipe
59e04cc549 Merge pull request #12376 from cyrillefr/MakeShipOrderButtonWorksOnPageOrderDetails
Fix Ship Order menu choice not working
2024-05-15 17:57:25 +01:00
David Cook
00f6d01738 Remove errored variants
I found another case.
2024-05-14 11:27:04 +10:00
cyrillefr
808f1c65f2 Requested changes on Delete Button missing
- Styling(in red) for the remove button/link in view

- A remove method to the bulk_form controller
    - removes elements from the Dom
    - removes changed elements from the binded Array in controller
    - so that menu that indicates changes disappear and blured elements
    - resume to non blurring state

- Added the corresponding specs
    - test with one, two variants
    - test with two different products
2024-05-14 11:25:22 +10:00
cyrillefr
9b10b73a65 Delete Button missing before saving variant
- used the remove option of stimulus-components/rails-nested-form lib
 - add the Remove option in the menu
 - the corresponding spec
 - the locale
2024-05-14 11:25:22 +10:00
Rachel Arnould
bd83977bf2 Merge pull request #12449 from chahmedejaz/feature/11058-change-products-order-by-name
Feature/11058 change products order by name
2024-05-13 15:29:33 +02:00
Ahmed Ejaz
881da0f9ac 11058: add get_all_input_values 2024-05-10 04:05:29 +05:00
Ahmed Ejaz
b5fe19cb7d 11058: add specs 2024-05-10 02:52:57 +05:00
Maikel Linke
6317fe1b71 Disable RSpec monkey patching 2024-05-09 12:24:41 +10:00
Maikel Linke
9ca6519fb1 Recommended RSpec option: shared_context_metadata_behavior
One spec failed due to this new behaviour. Converting the shared
examples to simple blocks solved this. But the specs could probably be
written better now. I didn't invest this time.
2024-05-09 11:14:13 +10:00
cyrillefr
271d50e5ab Fix Ship Order Button: modal should close itself
- returns to the same processing for customer, invoices etc.
   that edit
 - need a bit of sleep in spec bc 2 tasks are asynchroneous
2024-05-07 19:15:00 +02:00
cyrillefr
34bb05e681 Fix 'Ship Order': integrating non regression spec
- removes the pending
 - add the click to go to the 'Order Details' page
   to check for the 'shipped' status
 - from enqueued to have_been_enqueued so the spec
   is flaky-free
2024-05-07 19:15:00 +02:00
cyrillefr
901c29c97b Fix Ship Order menu choice not working
- Front End ShipOrderComponent was missed for the menu to work
 - updated spec to test for a specific case
2024-05-07 19:15:00 +02:00
Ahmed Ejaz
f07900ca4a 11060: refactor specs to have better separation of concerns 2024-05-07 14:59:14 +02:00
Ahmed Ejaz
3d60d84fc7 add wait for flaky specs 2024-05-07 14:59:14 +02:00
Ahmed Ejaz
227b677e4d 11060: fix specs 2024-05-07 14:59:14 +02:00
Ahmed Ejaz
15ee4f6619 11060: add specs 2024-05-07 14:59:14 +02:00
Ahmed Ejaz
c12d6ab7f0 11060: revert 33b947be00563b67ca36475f277ceceaf8c68378 2024-05-07 14:59:14 +02:00
David Cook
b846d0f517 Add ability to bulk update products for product managers
I forgot to do this in #12328 [BUU] Remove Stimulus Reflex from Products screen
2024-04-24 10:56:30 +10:00
David Cook
d0f683d279 Spec for bug 2024-04-23 16:48:52 +10:00
Konrad
8e7f4ff908 Merge pull request #12333 from chahmedejaz/bugfix/12294-wrong-tax-category-display
[BUU] Fix Wrong Tax Category Display
2024-04-20 11:42:05 +02:00
Rachel Arnould
2090bc1b47 Merge pull request #12361 from dacook/buu/add-turbo
[BUU] Add Turbo for dynamic page loading
2024-04-19 11:44:17 +02:00