Files
medusa-store/integration-tests
Philip Korsholm 19f35ba6aa Feat(medusa, medusa-js, medusa-react): Include sales channels in related queries as an optional expand parameter (#1816)
**What**
- Add `transformQuery` to get endpoints for product, order and cart
  - ensure that the default relations (when getting a singular entity) includes sales channels when enabled
- Add `EmptyQueryParams` class in common types to prevent query parameters while using `transformQuery`
- update product-, order- and cartFactory to include sales channels if provided
- remove `packages/medusa/src/controllers/products/admin-list-products.ts`

**Testing** 
- expands sales channel for single order
- expands sales channels for orders with expand parameter 
- returns single product with sales channel 
- expands sales channels for products with expand parameter
- returns cart with sales channel for single cart

Fixes CORE-293

Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2022-07-11 16:45:01 +00:00
..
2022-02-24 20:14:09 +01:00
2022-02-24 20:14:09 +01:00
2021-12-08 09:56:59 +01:00
2022-02-03 20:03:25 +01:00
2022-02-24 20:14:09 +01:00

Integration-tests

To be able to run the integration tests on your local machine, run the following commands (adapted to your machine)

cd [ROOT_OF_YOUR_REPO]
medusa-dev -p [YOUR_ABSOLUTE_PATH_TO_THE_REPO]
npm run bootstrap
cd integration-tests/api
medusa-dev -s
npm run build
cd - && npm run test:integration