Skip to content

Commit 24a49a5

Browse files
refactor(payment): cleaned up paypal commerce tests from unused fastlane shipping callback experiment (#2845)
1 parent 3556324 commit 24a49a5

File tree

4 files changed

+0
-48
lines changed

4 files changed

+0
-48
lines changed

packages/paypal-commerce-integration/src/paypal-commerce-credit/paypal-commerce-credit-button-strategy.spec.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
getBuyNowCart,
1212
getBuyNowCartRequestBody,
1313
getCart,
14-
getConfig,
1514
getConsignment,
1615
getShippingOption,
1716
PaymentIntegrationServiceMock,
@@ -60,7 +59,6 @@ describe('PayPalCommerceCreditButtonStrategy', () => {
6059
const paypalOrderId = 'ORDER_ID';
6160

6261
const paypalCommerceSdkRenderMock = jest.fn();
63-
const storeConfig = getConfig().storeConfig;
6462

6563
const buyNowCartRequestBody = getBuyNowCartRequestBody();
6664

@@ -189,16 +187,6 @@ describe('PayPalCommerceCreditButtonStrategy', () => {
189187
render: paypalCommerceSdkRenderMock,
190188
}));
191189

192-
jest.spyOn(paymentIntegrationService.getState(), 'getStoreConfig').mockReturnValue({
193-
...storeConfig,
194-
checkoutSettings: {
195-
...storeConfig.checkoutSettings,
196-
features: {
197-
'PAYPAL-4387.paypal_shipping_callbacks': true,
198-
},
199-
},
200-
});
201-
202190
jest.spyOn(paypalSdk, 'Buttons').mockImplementation(
203191
(options: PayPalCommerceButtonsOptions) => {
204192
eventEmitter.on('createOrder', () => {

packages/paypal-commerce-integration/src/paypal-commerce-credit/paypal-commerce-credit-customer-strategy.spec.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
PaymentMethod,
99
} from '@bigcommerce/checkout-sdk/payment-integration-api';
1010
import {
11-
getConfig,
1211
getConsignment,
1312
getShippingOption,
1413
PaymentIntegrationServiceMock,
@@ -59,8 +58,6 @@ describe('PayPalCommerceCreditCustomerStrategy', () => {
5958
paypalcommercecredit: paypalCommerceCreditOptions,
6059
};
6160

62-
const storeConfig = getConfig().storeConfig;
63-
6461
beforeEach(() => {
6562
eventEmitter = new EventEmitter();
6663

@@ -105,15 +102,6 @@ describe('PayPalCommerceCreditCustomerStrategy', () => {
105102
jest.spyOn(paypalCommerceIntegrationService, 'getShippingOptionOrThrow').mockReturnValue(
106103
getShippingOption(),
107104
);
108-
jest.spyOn(paymentIntegrationService.getState(), 'getStoreConfig').mockReturnValue({
109-
...storeConfig,
110-
checkoutSettings: {
111-
...storeConfig.checkoutSettings,
112-
features: {
113-
'PAYPAL-4387.paypal_shipping_callbacks': true,
114-
},
115-
},
116-
});
117105

118106
jest.spyOn(paypalSdk, 'Buttons').mockImplementation(
119107
(options: PayPalCommerceButtonsOptions) => {

packages/paypal-commerce-integration/src/paypal-commerce/paypal-commerce-button-strategy.spec.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
getBuyNowCart,
1212
getBuyNowCartRequestBody,
1313
getCart,
14-
getConfig,
1514
getConsignment,
1615
getShippingOption,
1716
PaymentIntegrationServiceMock,
@@ -102,8 +101,6 @@ describe('PayPalCommerceButtonStrategy', () => {
102101
type: 'type_shipping',
103102
};
104103

105-
const storeConfig = getConfig().storeConfig;
106-
107104
beforeEach(() => {
108105
buyNowCart = getBuyNowCart();
109106
cart = getCart();
@@ -162,16 +159,6 @@ describe('PayPalCommerceButtonStrategy', () => {
162159
jest.spyOn(paypalCommerceIntegrationService, 'getShippingOptionOrThrow').mockReturnValue(
163160
getShippingOption(),
164161
);
165-
jest.spyOn(paymentIntegrationService.getState(), 'getStoreConfig').mockReturnValue({
166-
...storeConfig,
167-
checkoutSettings: {
168-
...storeConfig.checkoutSettings,
169-
features: {
170-
// TODO: remove this experiment
171-
'PAYPAL-4387.paypal_shipping_callbacks': true,
172-
},
173-
},
174-
});
175162

176163
jest.spyOn(paypalSdk, 'Buttons').mockImplementation(
177164
(options: PayPalCommerceButtonsOptions) => {

packages/paypal-commerce-integration/src/paypal-commerce/paypal-commerce-customer-strategy.spec.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
PaymentMethod,
99
} from '@bigcommerce/checkout-sdk/payment-integration-api';
1010
import {
11-
getConfig,
1211
getConsignment,
1312
getShippingOption,
1413
PaymentIntegrationServiceMock,
@@ -44,7 +43,6 @@ describe('PayPalCommerceCustomerStrategy', () => {
4443
const methodId = 'paypalcommerce';
4544
const defaultContainerId = 'paypal-commerce-container-mock-id';
4645
const approveDataOrderId = 'ORDER_ID';
47-
const storeConfig = getConfig().storeConfig;
4846

4947
const paypalCommerceOptions: PayPalCommerceCustomerInitializeOptions = {
5048
container: defaultContainerId,
@@ -100,15 +98,6 @@ describe('PayPalCommerceCustomerStrategy', () => {
10098
jest.spyOn(paypalCommerceIntegrationService, 'getShippingOptionOrThrow').mockReturnValue(
10199
getShippingOption(),
102100
);
103-
jest.spyOn(paymentIntegrationService.getState(), 'getStoreConfig').mockReturnValue({
104-
...storeConfig,
105-
checkoutSettings: {
106-
...storeConfig.checkoutSettings,
107-
features: {
108-
'PAYPAL-4387.paypal_shipping_callbacks': true,
109-
},
110-
},
111-
});
112101

113102
jest.spyOn(paypalSdk, 'Buttons').mockImplementation(
114103
(options: PayPalCommerceButtonsOptions) => {

0 commit comments

Comments
 (0)