Few things to keep in mind:
1. You need to set MEDUSA_FF_MEDUSA_V2 to true before running the tests to run with the v2 API
2. You can use the `breaking` function to differentiate between v1 and v2 differences. This can help us identify what was breaking pretty quickly afterwards
3. You will need to run specific tests for now instead of all if you want to target v2. I think that's fine though, as we don't really need these to run on every PR until we have feature parity (and by then, all tests would be both v1 and v2 compatible)
**note: Adrien**
- add a new way to load modules only to run their loaders comparable to the way to run the migrations only
- improve tests runner to cleanup the data properly as well as re running all loaders and core defaults
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
What:
Workflow Engine API.
Endpoints for:
- List workflow executions
- Run a workflow
- Set async steps as success or failure
- Retrieve the details of a workflow run
**What**
- ensure that an error is raised properly if the requested product doesn't exist and a publishable-key header is set
**Why**
- previously endpoints would hang if the product didn't exist and requests would time out
closes#5724
* Expose item tax total and shipping tax total in order totals
* Added changeset
* Fixes to tests
* Fixes to integration tests
* Fixes to integration tests
* Fixes to integration tests
* Change changeset to patch
* fix for merging line items and quantity prices
* add changeset
* fix draft order unit_price calculation
* update test to reflect only quantity change
* fix unit tests
* update conditional
* initial code push
* update metadata and only merge if the existing line item allows merging
* update should_merge check
* undo changes to taxrate service
* update results with unit pricing corresponding to the db values after update
* add should_merge property to line_item creation
* add should_merge property to line_item creation
* fix unit tests
* undo adding "should_merge" to create-line-item
* undo change to "addOrUpdateLineItem"
* :wqh_merge from generate method
* undo changes to unit tests
* revert to adding pricing in updateLineItem method
* update cart service test
* Create funny-radios-juggle.md
---------
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Fix for the problems identified in issue #4892
Bugfix: admin-ui order summary no longer uses gift card total from order when displaying how much has been withdrawn from each giftcard.
Bugfix(?): no longer keep applying gift cards (at 0 value) when sufficient balance has been reached
Feature: multiple giftcards are now applied in ordered fashion. First by end_date (supports null), then by remaining balance. In order to ensure that customers ends up with as long lasting and few remaining gift cards as possible after the transaction.
Looks like during an earlier refactor, some of the categories logic wasn't ported over to the handler that works with q params.
what:
- adds a fix that allows queries to be made on category_id when q param is passed.
Fixes https://github.com/medusajs/medusa/issues/4885
**What**
Integration tests to validate the workflow compensation.
Also, fix the transaction state when the workflow is compensating and some steps does not have any compensation
* update method for listing regions
* add changeset
* fix unit tests
* listAndCount swaps
* add count calculation to list-returns
* swap integration test
* notes pagination
* pagination props for notifications
* listAndCount store regions
* fix nit
* fix note unit test
* update list-regions store unit test
* cleanup integration test
* rename introduced tests
---------
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
There is actually an issue with using the `fields` query params with the way the repositories are using our custom query strategy. This pr aims to fix this issue by reworking the strategy.
What we had to do was to rework the way the selects are built for each subquery in order to follow the aliasing convention and to be taken into consideration. Alongside these changes, the join used to always select everything, this needed to be changed so that if there are any selects provided for a join, the join should not select everything and let the query select the fields that are requested.
Another notable change is that all the repositories are now using the repository util in order to centralize the customization and to have a single place to update when this kind of issue arises. This means that the eager relations when using the query builder are not necessarily taken into account. For that reason, I have removed the `shipping_option` eager option in favor of explicitly asking for the relations like we started to do it in some places.
FIXES CORE-1413
* chore: Use caret for all Medusa deps
* Create wild-balloons-push.md
* Address PR feedback
* force build order
* add missing dep
* add missing dev deps
* addresses last comments