Skip to content

Commit c2f5a3f

Browse files
committed
fix: remove gift card from order summary when is used
1 parent bb0cdea commit c2f5a3f

5 files changed

Lines changed: 297 additions & 804 deletions

File tree

components/data/AppProvider/reducer.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { AppStateData } from "components/data/AppProvider"
44
import {
55
prepareShipments,
66
checkPaymentMethod,
7-
calculateAddresses,
8-
calculateSelectedShipments,
97
creditCardPayment,
108
hasShippingMethodSet,
119
} from "components/data/AppProvider/utils"

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"commercelayer"
6969
],
7070
"dependencies": {
71-
"@commercelayer/react-components": "^3.12.3",
71+
"@commercelayer/react-components": "^3.13.0-beta.1",
7272
"@headlessui/react": "^1.6.1",
7373
"@rollbar/react": "^0.11.0",
7474
"async-retry": "^1.3.3",
@@ -90,24 +90,24 @@
9090
"@faker-js/faker": "^6.3.1",
9191
"@next/bundle-analyzer": "^12.1.6",
9292
"@next/eslint-plugin-next": "^12.1.6",
93-
"@playwright/test": "^1.21.1",
93+
"@playwright/test": "^1.22.1",
9494
"@semantic-release/changelog": "^6.0.1",
9595
"@semantic-release/commit-analyzer": "^9.0.2",
9696
"@semantic-release/git": "^10.0.1",
9797
"@semantic-release/github": "^8.0.4",
9898
"@semantic-release/npm": "^9.0.1",
9999
"@semantic-release/release-notes-generator": "^10.0.3",
100-
"@tailwindcss/forms": "^0.5.1",
100+
"@tailwindcss/forms": "^0.5.2",
101101
"@tailwindcss/line-clamp": "^0.4.0",
102102
"@types/async-retry": "1.4.3",
103-
"@types/node": "^17.0.31",
103+
"@types/node": "^17.0.34",
104104
"@types/react": "^17.0.45",
105105
"@types/react-gtm-module": "^2.0.1",
106106
"@types/styled-components": "^5.1.25",
107-
"@typescript-eslint/eslint-plugin": "^5.23.0",
108-
"@typescript-eslint/parser": "^5.23.0",
107+
"@typescript-eslint/eslint-plugin": "^5.25.0",
108+
"@typescript-eslint/parser": "^5.25.0",
109109
"autoprefixer": "^10.4.7",
110-
"dotenv": "^16.0.0",
110+
"dotenv": "^16.0.1",
111111
"eslint": "^8.15.0",
112112
"eslint-config-next": "^12.1.6",
113113
"eslint-config-prettier": "^8.5.0",
@@ -116,9 +116,9 @@
116116
"eslint-plugin-node": "^11.1.0",
117117
"eslint-plugin-prettier": "^4.0.0",
118118
"eslint-plugin-promise": "^6.0.0",
119-
"eslint-plugin-react": "^7.29.4",
119+
"eslint-plugin-react": "^7.30.0",
120120
"eslint-plugin-tailwind": "^0.2.1",
121-
"postcss": "^8.4.13",
121+
"postcss": "^8.4.14",
122122
"prettier": "^2.6.1",
123123
"stylelint": "^14.8.2",
124124
"stylelint-config-standard": "^25.0.0",

specs/e2e/order-summary.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ test.describe("using gift card", () => {
226226
let element = checkoutPage.page.locator(
227227
"[data-test-id=line-items-gift_cards]"
228228
)
229-
const text = await element.innerText()
230-
await expect(text).toBe("")
229+
await expect(element).toHaveCount(0)
231230

232231
element = checkoutPage.page.locator(
233232
"[data-test-id=items-count] >> text=Your shopping cart contains 3 items"

specs/fixtures/CheckoutPage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ export class CheckoutPage {
561561
} else {
562562
paymentMethod = `${type}_payments`
563563
}
564-
565564
await this.page.click(`[data-test-id=${paymentMethod}]`, { force: true })
565+
await this.page.mouse.wheel(0, 30)
566566
}
567567

568568
async setPayment(

0 commit comments

Comments
 (0)