|
@@ -5,6 +5,7 @@ import {
|
|
|
defaultShippingCalculator,
|
|
defaultShippingCalculator,
|
|
|
defaultShippingEligibilityChecker,
|
|
defaultShippingEligibilityChecker,
|
|
|
manualFulfillmentHandler,
|
|
manualFulfillmentHandler,
|
|
|
|
|
+ mergeConfig,
|
|
|
} from '@vendure/core';
|
|
} from '@vendure/core';
|
|
|
import {
|
|
import {
|
|
|
createErrorResultGuard,
|
|
createErrorResultGuard,
|
|
@@ -16,7 +17,7 @@ import gql from 'graphql-tag';
|
|
|
import path from 'path';
|
|
import path from 'path';
|
|
|
|
|
|
|
|
import { initialData } from '../../../e2e-common/e2e-initial-data';
|
|
import { initialData } from '../../../e2e-common/e2e-initial-data';
|
|
|
-import { testConfig, TEST_SETUP_TIMEOUT_MS } from '../../../e2e-common/test-config';
|
|
|
|
|
|
|
+import { TEST_SETUP_TIMEOUT_MS, testConfig } from '../../../e2e-common/test-config';
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
failsToSettlePaymentMethod,
|
|
failsToSettlePaymentMethod,
|
|
@@ -82,9 +83,9 @@ import {
|
|
|
DELETE_SHIPPING_METHOD,
|
|
DELETE_SHIPPING_METHOD,
|
|
|
GET_CUSTOMER_LIST,
|
|
GET_CUSTOMER_LIST,
|
|
|
GET_ORDER,
|
|
GET_ORDER,
|
|
|
- GET_ORDERS_LIST,
|
|
|
|
|
GET_ORDER_FULFILLMENTS,
|
|
GET_ORDER_FULFILLMENTS,
|
|
|
GET_ORDER_HISTORY,
|
|
GET_ORDER_HISTORY,
|
|
|
|
|
+ GET_ORDERS_LIST,
|
|
|
GET_PRODUCT_WITH_VARIANTS,
|
|
GET_PRODUCT_WITH_VARIANTS,
|
|
|
GET_STOCK_MOVEMENT,
|
|
GET_STOCK_MOVEMENT,
|
|
|
SETTLE_PAYMENT,
|
|
SETTLE_PAYMENT,
|
|
@@ -104,17 +105,18 @@ import { assertThrowsWithMessage } from './utils/assert-throws-with-message';
|
|
|
import { addPaymentToOrder, proceedToArrangingPayment, sortById } from './utils/test-order-utils';
|
|
import { addPaymentToOrder, proceedToArrangingPayment, sortById } from './utils/test-order-utils';
|
|
|
|
|
|
|
|
describe('Orders resolver', () => {
|
|
describe('Orders resolver', () => {
|
|
|
- const { server, adminClient, shopClient } = createTestEnvironment({
|
|
|
|
|
- ...testConfig,
|
|
|
|
|
- paymentOptions: {
|
|
|
|
|
- paymentMethodHandlers: [
|
|
|
|
|
- twoStagePaymentMethod,
|
|
|
|
|
- failsToSettlePaymentMethod,
|
|
|
|
|
- singleStageRefundablePaymentMethod,
|
|
|
|
|
- partialPaymentMethod,
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ const { server, adminClient, shopClient } = createTestEnvironment(
|
|
|
|
|
+ mergeConfig(testConfig, {
|
|
|
|
|
+ paymentOptions: {
|
|
|
|
|
+ paymentMethodHandlers: [
|
|
|
|
|
+ twoStagePaymentMethod,
|
|
|
|
|
+ failsToSettlePaymentMethod,
|
|
|
|
|
+ singleStageRefundablePaymentMethod,
|
|
|
|
|
+ partialPaymentMethod,
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ }),
|
|
|
|
|
+ );
|
|
|
let customers: GetCustomerList.Items[];
|
|
let customers: GetCustomerList.Items[];
|
|
|
const password = 'test';
|
|
const password = 'test';
|
|
|
|
|
|