Skip to content

Commit

Permalink
Merge pull request #452 from commercelayer/fix/is-new-address-check
Browse files Browse the repository at this point in the history
Adjust new address check when customer addresses are present
  • Loading branch information
malessani committed Mar 28, 2024
2 parents b20b095 + a9f48f9 commit dedf4cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions components/data/AppProvider/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ function isNewAddress({

const hasAddressIntoAddresses = Boolean(
customerAddresses?.find(
(customerAddress) =>
customerAddress?.address?.reference === address?.reference
(customerAddress) => customerAddress?.id === address?.reference
)
)

Expand Down
4 changes: 2 additions & 2 deletions specs/e2e/payments-stripe.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,15 @@ test.describe("guest with Stripe", () => {

await checkoutPage.save("Payment", undefined, true)

await checkoutPage.page.waitForTimeout(10000)
await checkoutPage.page.waitForTimeout(6000)

const myFrames = checkoutPage.page.frames()

await myFrames[myFrames.length - 1]
.locator("#test-source-authorize-3ds")
.click()

await checkoutPage.checkPaymentRecap("Visa ending in 3155")
await checkoutPage.checkPaymentRecap("Visa ending in 3155", 10000)

await checkoutPage.page.reload()

Expand Down

0 comments on commit dedf4cc

Please sign in to comment.