@graphcommerce/magento-payment-included 3.0.4 → 3.0.5
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 +15 -0
- package/package.json +15 -15
- package/test/banktransfer.playwright.ts +23 -0
- package/test/purchaseorder.playwright.ts +26 -0
- package/_playwright/purchaseorder.spec.ts +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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
|
|
8
|
+
|
|
9
|
+
- 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)]:
|
|
10
|
+
- @graphcommerce/graphql@3.0.6
|
|
11
|
+
- @graphcommerce/next-ui@4.5.0
|
|
12
|
+
- @graphcommerce/image@3.1.2
|
|
13
|
+
- @graphcommerce/magento-cart@4.2.2
|
|
14
|
+
- @graphcommerce/magento-cart-payment-method@3.0.6
|
|
15
|
+
- @graphcommerce/magento-store@4.1.4
|
|
16
|
+
- @graphcommerce/react-hook-form@3.0.6
|
|
17
|
+
|
|
3
18
|
## 3.0.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
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.
|
|
5
|
+
"version": "3.0.5",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,23 +12,23 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "^4.
|
|
16
|
-
"@graphcommerce/magento-cart-shipping-address": "^3.0.
|
|
17
|
-
"@graphcommerce/magento-product": "^4.
|
|
18
|
-
"@graphcommerce/magento-product-configurable": "^4.0.
|
|
19
|
-
"@graphcommerce/prettier-config-pwa": "^4.0.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^4.1.3",
|
|
16
|
+
"@graphcommerce/magento-cart-shipping-address": "^3.0.5",
|
|
17
|
+
"@graphcommerce/magento-product": "^4.1.3",
|
|
18
|
+
"@graphcommerce/magento-product-configurable": "^4.0.7",
|
|
19
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.5",
|
|
20
20
|
"@graphcommerce/typescript-config-pwa": "^4.0.2",
|
|
21
|
-
"@playwright/test": "^1.
|
|
21
|
+
"@playwright/test": "^1.20.1",
|
|
22
|
+
"type-fest": "2.12.1"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@graphcommerce/graphql": "^3.0.
|
|
25
|
-
"@graphcommerce/image": "^3.1.
|
|
26
|
-
"@graphcommerce/magento-cart": "^4.
|
|
27
|
-
"@graphcommerce/magento-cart-payment-method": "^3.0.
|
|
28
|
-
"@graphcommerce/magento-store": "^4.1.
|
|
29
|
-
"@graphcommerce/next-ui": "^4.
|
|
30
|
-
"@graphcommerce/react-hook-form": "^3.0.
|
|
31
|
-
"type-fest": "^2.12.0"
|
|
25
|
+
"@graphcommerce/graphql": "^3.0.6",
|
|
26
|
+
"@graphcommerce/image": "^3.1.2",
|
|
27
|
+
"@graphcommerce/magento-cart": "^4.2.2",
|
|
28
|
+
"@graphcommerce/magento-cart-payment-method": "^3.0.6",
|
|
29
|
+
"@graphcommerce/magento-store": "^4.1.4",
|
|
30
|
+
"@graphcommerce/next-ui": "^4.5.0",
|
|
31
|
+
"@graphcommerce/react-hook-form": "^3.0.6"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@lingui/macro": "^3.13.2",
|
|
@@ -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('text=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('text=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
|
-
})
|