@graphcommerce/magento-payment-included 3.0.4 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1379](https://github.com/graphcommerce-org/graphcommerce/pull/1379) [`b8d04130a`](https://github.com/graphcommerce-org/graphcommerce/commit/b8d04130a1b1cb8fc85308939235140288744465) Thanks [@paales](https://github.com/paales)! - Removed unused trigger: onChange for useForm handler
8
+
9
+ - Updated dependencies [[`3c801f45c`](https://github.com/graphcommerce-org/graphcommerce/commit/3c801f45c7df55131acf30ae2fe0d2344830d480), [`b8d04130a`](https://github.com/graphcommerce-org/graphcommerce/commit/b8d04130a1b1cb8fc85308939235140288744465), [`3192fab82`](https://github.com/graphcommerce-org/graphcommerce/commit/3192fab82560e2211dfcacadc3b0b305260527d8), [`104abd14e`](https://github.com/graphcommerce-org/graphcommerce/commit/104abd14e1585ef0d8de77937d25156b8fa1e201), [`0e425e85e`](https://github.com/graphcommerce-org/graphcommerce/commit/0e425e85ee8fed280349317ee0440c7bceea5823), [`2a125b1f9`](https://github.com/graphcommerce-org/graphcommerce/commit/2a125b1f98bb9272d96c3577f21d6c984caad892), [`8a354d1cd`](https://github.com/graphcommerce-org/graphcommerce/commit/8a354d1cd4757497ddfc9b1969a0addbc8ff616b), [`6ebe9d12d`](https://github.com/graphcommerce-org/graphcommerce/commit/6ebe9d12db9fcaa2af67a475e64a08d63e232b46)]:
10
+ - @graphcommerce/next-ui@4.6.0
11
+ - @graphcommerce/magento-cart@4.2.4
12
+ - @graphcommerce/magento-cart-payment-method@3.1.0
13
+ - @graphcommerce/react-hook-form@3.1.0
14
+ - @graphcommerce/image@3.1.4
15
+ - @graphcommerce/magento-store@4.1.6
16
+
17
+ ## 3.0.6
18
+
19
+ ### Patch Changes
20
+
21
+ - [#1378](https://github.com/graphcommerce-org/graphcommerce/pull/1378) [`b610a6e40`](https://github.com/graphcommerce-org/graphcommerce/commit/b610a6e4049e8c9e8b5d2aeff31b8e1bfc24abe5) Thanks [@paales](https://github.com/paales)! - Pin all versions internally so we can’t end up in an unfixable state for the user
22
+
23
+ - Updated dependencies [[`b610a6e40`](https://github.com/graphcommerce-org/graphcommerce/commit/b610a6e4049e8c9e8b5d2aeff31b8e1bfc24abe5), [`22ff9df16`](https://github.com/graphcommerce-org/graphcommerce/commit/22ff9df1677742ae8e07d9b7e5b12fbb487580dc)]:
24
+ - @graphcommerce/graphql@3.0.7
25
+ - @graphcommerce/image@3.1.3
26
+ - @graphcommerce/magento-cart@4.2.3
27
+ - @graphcommerce/magento-cart-payment-method@3.0.7
28
+ - @graphcommerce/magento-store@4.1.5
29
+ - @graphcommerce/next-ui@4.5.1
30
+ - @graphcommerce/react-hook-form@3.0.7
31
+
32
+ ## 3.0.5
33
+
34
+ ### Patch Changes
35
+
36
+ - [#1369](https://github.com/graphcommerce-org/graphcommerce/pull/1369) [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9) Thanks [@paales](https://github.com/paales)! - Upgraded dependencies
37
+
38
+ - Updated dependencies [[`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a)]:
39
+ - @graphcommerce/graphql@3.0.6
40
+ - @graphcommerce/next-ui@4.5.0
41
+ - @graphcommerce/image@3.1.2
42
+ - @graphcommerce/magento-cart@4.2.2
43
+ - @graphcommerce/magento-cart-payment-method@3.0.6
44
+ - @graphcommerce/magento-store@4.1.4
45
+ - @graphcommerce/react-hook-form@3.0.6
46
+
3
47
  ## 3.0.4
4
48
 
5
49
  ### Patch Changes
@@ -11,7 +11,6 @@ export function PurchaseOrderOptions(props: PaymentOptionsProps) {
11
11
  const poNumber = selected?.purchase_order_number ?? undefined
12
12
 
13
13
  const form = useFormGqlMutationCart(PurchaseOrderOptionsDocument, {
14
- mode: 'onChange',
15
14
  defaultValues: { code, poNumber },
16
15
  })
17
16
  const { handleSubmit, muiRegister, formState, required } = form
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-payment-included",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.0.4",
5
+ "version": "3.0.7",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,29 +12,29 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.0.5",
16
- "@graphcommerce/magento-cart-shipping-address": "^3.0.4",
17
- "@graphcommerce/magento-product": "^4.0.6",
18
- "@graphcommerce/magento-product-configurable": "^4.0.6",
19
- "@graphcommerce/prettier-config-pwa": "^4.0.3",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.4",
16
+ "@graphcommerce/magento-cart-shipping-address": "3.0.7",
17
+ "@graphcommerce/magento-product": "4.1.5",
18
+ "@graphcommerce/magento-product-configurable": "4.0.9",
19
+ "@graphcommerce/prettier-config-pwa": "^4.0.5",
20
20
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
21
- "@playwright/test": "^1.19.2"
21
+ "@playwright/test": "^1.20.1",
22
+ "type-fest": "2.12.1"
22
23
  },
23
24
  "dependencies": {
24
- "@graphcommerce/graphql": "^3.0.4",
25
- "@graphcommerce/image": "^3.1.1",
26
- "@graphcommerce/magento-cart": "^4.1.4",
27
- "@graphcommerce/magento-cart-payment-method": "^3.0.5",
28
- "@graphcommerce/magento-store": "^4.1.2",
29
- "@graphcommerce/next-ui": "^4.2.4",
30
- "@graphcommerce/react-hook-form": "^3.0.4",
31
- "type-fest": "^2.12.0"
25
+ "@graphcommerce/graphql": "3.0.7",
26
+ "@graphcommerce/image": "3.1.4",
27
+ "@graphcommerce/magento-cart": "4.2.4",
28
+ "@graphcommerce/magento-cart-payment-method": "3.1.0",
29
+ "@graphcommerce/magento-store": "4.1.6",
30
+ "@graphcommerce/next-ui": "4.6.0",
31
+ "@graphcommerce/react-hook-form": "3.1.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@lingui/macro": "^3.13.2",
35
- "@mui/material": "^5.4.1",
35
+ "@mui/material": "5.5.3",
36
36
  "framer-motion": "^6.2.4",
37
- "next": "^12.0.10",
37
+ "next": "12.1.2",
38
38
  "react": "^17.0.2",
39
39
  "react-dom": "^17.0.2"
40
40
  }
@@ -0,0 +1,23 @@
1
+ /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
+ import { waitForGraphQlResponse } from '@graphcommerce/graphql/test/apolloClient.fixture'
3
+ import { PaymentMethodPlaceOrderNoopDocument } from '@graphcommerce/magento-cart-payment-method/PaymentMethodPlaceOrderNoop/PaymentMethodPlaceOrderNoop.gql'
4
+ import { goToPayment } from '@graphcommerce/magento-cart-payment-method/test/goToPayment'
5
+ import { addConfigurableProductToCart } from '@graphcommerce/magento-product-configurable/test/addConfigurableProductToCart'
6
+ import { test } from '@graphcommerce/magento-product/test/productURL.fixture'
7
+ import { expect } from '@playwright/test'
8
+
9
+ test('banktransfer', async ({ page, productURL, apolloClient }) => {
10
+ await addConfigurableProductToCart(page, productURL.ConfigurableProduct)
11
+ await goToPayment(page, apolloClient)
12
+
13
+ await page.click('button[value=banktransfer]')
14
+
15
+ const waitForPlaceOrder = waitForGraphQlResponse(page, PaymentMethodPlaceOrderNoopDocument)
16
+
17
+ await Promise.all([page.waitForNavigation(), page.click('#place-order')])
18
+
19
+ expect((await waitForPlaceOrder).errors).toBeUndefined()
20
+ expect((await waitForPlaceOrder).data?.placeOrder?.order.order_number).toBeDefined()
21
+
22
+ expect(await page.locator('#back-to-home').innerText()).toBeDefined()
23
+ })
@@ -0,0 +1,26 @@
1
+ /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
+ import { waitForGraphQlResponse } from '@graphcommerce/graphql/test/apolloClient.fixture'
3
+ import { PaymentMethodPlaceOrderNoopDocument } from '@graphcommerce/magento-cart-payment-method/PaymentMethodPlaceOrderNoop/PaymentMethodPlaceOrderNoop.gql'
4
+ import { goToPayment } from '@graphcommerce/magento-cart-payment-method/test/goToPayment'
5
+ import { addConfigurableProductToCart } from '@graphcommerce/magento-product-configurable/test/addConfigurableProductToCart'
6
+ import { test } from '@graphcommerce/magento-product/test/productURL.fixture'
7
+ import { expect } from '@playwright/test'
8
+
9
+ test('place order', async ({ page, productURL, apolloClient }) => {
10
+ await addConfigurableProductToCart(page, productURL.ConfigurableProduct)
11
+ await goToPayment(page, apolloClient)
12
+
13
+ await page.click('button[value=purchaseorder]')
14
+
15
+ await page.click('input[name="poNumber"]')
16
+ await page.fill('input[name="poNumber"]', '1234567890')
17
+
18
+ const waitForPlaceOrder = waitForGraphQlResponse(page, PaymentMethodPlaceOrderNoopDocument)
19
+
20
+ await Promise.all([page.waitForNavigation(), page.click('#place-order')])
21
+
22
+ expect((await waitForPlaceOrder).errors).toBeUndefined()
23
+ expect((await waitForPlaceOrder).data?.placeOrder?.order.order_number).toBeDefined()
24
+
25
+ expect(await page.locator('#back-to-home').innerText()).toBeDefined()
26
+ })
@@ -1,39 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
- import { waitForGraphQlResponse } from '@graphcommerce/graphql/_playwright/apolloClient.fixture'
3
- import { PaymentMethodPlaceOrderNoopDocument } from '@graphcommerce/magento-cart-payment-method/PaymentMethodPlaceOrderNoop/PaymentMethodPlaceOrderNoop.gql'
4
- import { fillShippingAddressForm } from '@graphcommerce/magento-cart-shipping-address/_playwright/fillShippingAddressForm'
5
- import { addConfigurableProductToCart } from '@graphcommerce/magento-product-configurable/_playwright/addConfigurableProductToCart'
6
- import { test } from '@graphcommerce/magento-product/_playwright/productURL.fixture'
7
- import { expect } from '@playwright/test'
8
-
9
- test('place order', async ({ page, productURL }) => {
10
- await addConfigurableProductToCart(page, productURL.ConfigurableProduct)
11
-
12
- await page.click('a:has-text("View shopping cart")')
13
-
14
- await page.click('a[href="/checkout"]:last-of-type')
15
-
16
- await page.click('input[name="email"]')
17
- await page.fill('input[name="email"]', 'test@test.com')
18
-
19
- await fillShippingAddressForm(page)
20
-
21
- await page.click('button[value=flatrate-flatrate]')
22
- await page.click('button:has-text("Next")')
23
-
24
- await page.click('button[value=purchaseorder___]')
25
-
26
- await page.click('input[name="poNumber"]')
27
- await page.fill('input[name="poNumber"]', '1234567890')
28
-
29
- const [, , placeOrder] = await Promise.all([
30
- page.waitForNavigation(),
31
- page.click('button[name="placeOrder"]'),
32
- waitForGraphQlResponse(page, PaymentMethodPlaceOrderNoopDocument),
33
- ])
34
-
35
- expect(placeOrder.errors).toBeUndefined()
36
- expect(placeOrder.data?.placeOrder?.order.order_number).toBeDefined()
37
-
38
- expect(await page.$('h2:has-text("Thank you for your order!")')).toBeDefined()
39
- })