Skip to content

Commit

Permalink
Merge branch 'medusajs:develop' into bug-german-language-corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelwiese authored Dec 2, 2024
2 parents 095d8e4 + 3e98364 commit 520811c
Show file tree
Hide file tree
Showing 1,440 changed files with 180,948 additions and 120,936 deletions.
5 changes: 0 additions & 5 deletions .changeset/chilled-nails-cheat.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/cold-dragons-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/utils": patch
---

fix: do not rely on model loading order to find an implicit owner
6 changes: 6 additions & 0 deletions .changeset/hip-suns-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/types": patch
"@medusajs/utils": patch
---

feature: add support for check constraints in DML
6 changes: 6 additions & 0 deletions .changeset/kind-moons-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/pricing": patch
"@medusajs/types": patch
---

feat(pricing, types): add price rule operators to price calculations
5 changes: 5 additions & 0 deletions .changeset/lazy-eagles-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/auth": minor
---

feat(auth): Migrate auth module to DML
5 changes: 5 additions & 0 deletions .changeset/nasty-tigers-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---

fix(medusa): remove request body type argument from cancel order transfer routes
5 changes: 0 additions & 5 deletions .changeset/orange-buses-repair.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/purple-maps-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/product": patch
---

fix(product): change export name of ProductImage
5 changes: 5 additions & 0 deletions .changeset/rotten-tigers-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/user": minor
---

feat(user): Migrate user module to DML
7 changes: 7 additions & 0 deletions .changeset/spicy-beds-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@medusajs/core-flows": patch
"@medusajs/framework": patch
"@medusajs/medusa": patch
---

feat(core-flows,framework,medusa): list shipping options pass in cart as pricing context
6 changes: 6 additions & 0 deletions .changeset/strange-trainers-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/ui-preset": patch
"@medusajs/icons": patch
---

feat(ui,icons,ui-preset): Sync with latest changes from Figma, and fix Code components
2 changes: 1 addition & 1 deletion .github/workflows/test-cli-with-database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Create Medusa project
run: |
medusa new cli-test --skip-db --v2 --branch feat/v2-ci
medusa new cli-test --skip-db --v2 --branch ci
working-directory: ..

- name: run medusa dev
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/trigger-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Trigger Release and Publish

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
Expand Down
28 changes: 28 additions & 0 deletions integration-tests/http/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# integration-tests-http

## 1.0.4

### Patch Changes

- Updated dependencies [[`e9003c3124f284eae7e1457101bf10c1beccbac1`](https://github.com/medusajs/medusa/commit/e9003c3124f284eae7e1457101bf10c1beccbac1), [`030ee871506cfe178702853714feaaa33f1d9cf4`](https://github.com/medusajs/medusa/commit/030ee871506cfe178702853714feaaa33f1d9cf4)]:
- @medusajs/utils@2.0.7
- @medusajs/core-flows@2.0.7
- @medusajs/modules-sdk@2.0.7
- @medusajs/medusa@2.0.7
- @medusajs/test-utils@2.0.7
- @medusajs/api-key@2.0.7
- @medusajs/auth@2.0.7
- @medusajs/cache-inmemory@2.0.7
- @medusajs/customer@2.0.7
- @medusajs/event-bus-local@2.0.7
- @medusajs/fulfillment@2.0.7
- @medusajs/inventory@2.0.7
- @medusajs/pricing@2.0.7
- @medusajs/product@2.0.7
- @medusajs/promotion@2.0.7
- @medusajs/fulfillment-manual@2.0.7
- @medusajs/region@2.0.7
- @medusajs/stock-location@2.0.7
- @medusajs/store@2.0.7
- @medusajs/tax@2.0.7
- @medusajs/user@2.0.7
- @medusajs/workflow-engine-inmemory@2.0.7

## 1.0.3

### Patch Changes
Expand Down
85 changes: 85 additions & 0 deletions integration-tests/http/__tests__/cart/store/cart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,91 @@ medusaIntegrationTestRunner({
)
})

it("should add item to cart with tax lines multiple times", async () => {
let response = await api.post(
`/store/carts/${cart.id}/line-items`,
{
variant_id: product.variants[0].id,
quantity: 1,
},
storeHeaders
)

expect(response.status).toEqual(200)
expect(response.data.cart).toEqual(
expect.objectContaining({
id: cart.id,
currency_code: "usd",
items: expect.arrayContaining([
expect.objectContaining({
unit_price: 1500,
compare_at_unit_price: null,
is_tax_inclusive: true,
title: "S / Black",
quantity: 2,
tax_lines: [
expect.objectContaining({
description: "CA Default Rate",
code: "CADEFAULT",
rate: 5,
provider_id: "system",
}),
],
}),
]),
})
)

response = await api.post(
`/store/carts/${cart.id}/line-items`,
{
variant_id: product.variants[1].id,
quantity: 1,
},
storeHeaders
)

expect(response.status).toEqual(200)
expect(response.data.cart).toEqual(
expect.objectContaining({
id: cart.id,
currency_code: "usd",
items: expect.arrayContaining([
expect.objectContaining({
unit_price: 1500,
compare_at_unit_price: null,
is_tax_inclusive: true,
quantity: 2,
title: "S / Black",
tax_lines: [
expect.objectContaining({
description: "CA Default Rate",
code: "CADEFAULT",
rate: 5,
provider_id: "system",
}),
],
}),
expect.objectContaining({
unit_price: 1500,
compare_at_unit_price: null,
is_tax_inclusive: true,
quantity: 1,
title: "S / White",
tax_lines: [
expect.objectContaining({
description: "CA Default Rate",
code: "CADEFAULT",
rate: 5,
provider_id: "system",
}),
],
}),
]),
})
)
})

describe("with sale price lists", () => {
let priceList

Expand Down
31 changes: 31 additions & 0 deletions integration-tests/http/__tests__/invite/admin/invite.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,37 @@ medusaIntegrationTestRunner({
expect(e.response.data.message).toEqual("Unauthorized")
})
})

it("should fail to accept with an expired token", async () => {
jest.useFakeTimers()

const signup = await api.post("/auth/user/emailpass/register", {
email: "test@medusa-commerce.com",
password: "secret_password",
})

// Advance time by 25 hours
jest.advanceTimersByTime(25 * 60 * 60 * 1000)

await api
.post(
`/admin/invites/accept?token=${invite.token}`,
{
first_name: "Another Test",
last_name: "User",
},
{
headers: { authorization: `Bearer ${signup.data.token}` },
}
)
.catch((e) => {
expect(e.response.status).toEqual(401)
expect(e.response.data.message).toEqual("Unauthorized")
})

jest.useRealTimers()
})

it("should resend an invite", async () => {
const resendResponse = (
await api.post(`/admin/invites/${invite.id}/resend`, {}, adminHeaders)
Expand Down
Loading

0 comments on commit 520811c

Please sign in to comment.