2020-09-29 18:22:20 +00:00
|
|
|
/* eslint-disable jest/expect-expect */
|
|
|
|
/*
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2020-11-27 21:49:20 +00:00
|
|
|
|
|
|
|
// Setup and onboarding tests
|
2020-09-29 20:00:34 +00:00
|
|
|
const runActivationTest = require( './activate-and-setup/activate.test' );
|
|
|
|
const { runOnboardingFlowTest, runTaskListTest } = require( './activate-and-setup/onboarding-tasklist.test' );
|
|
|
|
const runInitialStoreSettingsTest = require( './activate-and-setup/setup.test' );
|
2020-11-27 21:49:20 +00:00
|
|
|
|
|
|
|
// Shopper tests
|
2021-01-09 17:53:12 +00:00
|
|
|
const runCartApplyCouponsTest = require( './shopper/front-end-cart-coupons.test');
|
2020-09-30 17:41:31 +00:00
|
|
|
const runCartPageTest = require( './shopper/front-end-cart.test' );
|
2021-01-09 17:49:59 +00:00
|
|
|
const runCheckoutApplyCouponsTest = require( './shopper/front-end-checkout-coupons.test');
|
2020-09-30 17:41:31 +00:00
|
|
|
const runCheckoutPageTest = require( './shopper/front-end-checkout.test' );
|
|
|
|
const runMyAccountPageTest = require( './shopper/front-end-my-account.test' );
|
|
|
|
const runSingleProductPageTest = require( './shopper/front-end-single-product.test' );
|
2021-02-10 18:23:56 +00:00
|
|
|
const runVariableProductUpdateTest = require( './shopper/front-end-variable-product-updates.test' );
|
2020-11-27 21:49:20 +00:00
|
|
|
|
|
|
|
// Merchant tests
|
2020-09-30 17:41:31 +00:00
|
|
|
const runCreateCouponTest = require( './merchant/wp-admin-coupon-new.test' );
|
|
|
|
const runCreateOrderTest = require( './merchant/wp-admin-order-new.test' );
|
2020-12-19 00:28:27 +00:00
|
|
|
const runEditOrderTest = require( './merchant/wp-admin-order-edit.test' );
|
2020-09-30 17:41:31 +00:00
|
|
|
const { runAddSimpleProductTest, runAddVariableProductTest } = require( './merchant/wp-admin-product-new.test' );
|
|
|
|
const runUpdateGeneralSettingsTest = require( './merchant/wp-admin-settings-general.test' );
|
|
|
|
const runProductSettingsTest = require( './merchant/wp-admin-settings-product.test' );
|
|
|
|
const runTaxSettingsTest = require( './merchant/wp-admin-settings-tax.test' );
|
2020-12-06 03:30:42 +00:00
|
|
|
const runOrderStatusFiltersTest = require( './merchant/wp-admin-order-status-filters.test' );
|
2020-12-11 04:27:04 +00:00
|
|
|
const runOrderRefundTest = require( './merchant/wp-admin-order-refund.test' );
|
2020-12-16 03:14:02 +00:00
|
|
|
const runOrderApplyCouponTest = require( './merchant/wp-admin-order-apply-coupon.test' );
|
2021-01-20 23:19:07 +00:00
|
|
|
const runProductEditDetailsTest = require( './merchant/wp-admin-product-edit-details.test' );
|
|
|
|
const runProductSearchTest = require( './merchant/wp-admin-product-search.test' );
|
2021-02-09 00:01:21 +00:00
|
|
|
const runMerchantOrdersCustomerPaymentPage = require( './merchant/wp-admin-order-customer-payment-page.test' );
|
2020-09-29 18:22:20 +00:00
|
|
|
|
2021-03-01 18:36:04 +00:00
|
|
|
// REST API tests
|
|
|
|
const runExternalProductAPITest = require( './api/external-product.test' );
|
|
|
|
const runCouponApiTest = require( './api/coupon.test' );
|
2021-03-02 18:28:16 +00:00
|
|
|
const runGroupedProductAPITest = require( './api/grouped-product' );
|
2021-03-01 18:36:04 +00:00
|
|
|
|
2020-09-29 18:22:20 +00:00
|
|
|
const runSetupOnboardingTests = () => {
|
|
|
|
runActivationTest();
|
|
|
|
runOnboardingFlowTest();
|
|
|
|
runTaskListTest();
|
|
|
|
runInitialStoreSettingsTest();
|
|
|
|
};
|
|
|
|
|
2020-09-30 17:41:31 +00:00
|
|
|
const runShopperTests = () => {
|
2020-12-23 14:04:14 +00:00
|
|
|
runCartApplyCouponsTest();
|
2020-09-29 20:00:34 +00:00
|
|
|
runCartPageTest();
|
2020-12-23 15:51:25 +00:00
|
|
|
runCheckoutApplyCouponsTest();
|
2020-09-29 20:00:34 +00:00
|
|
|
runCheckoutPageTest();
|
|
|
|
runMyAccountPageTest();
|
|
|
|
runSingleProductPageTest();
|
2021-02-10 18:23:56 +00:00
|
|
|
runVariableProductUpdateTest();
|
2020-09-29 20:00:34 +00:00
|
|
|
};
|
|
|
|
|
2020-09-30 17:41:31 +00:00
|
|
|
const runMerchantTests = () => {
|
|
|
|
runCreateCouponTest();
|
|
|
|
runCreateOrderTest();
|
2020-12-19 00:28:27 +00:00
|
|
|
runEditOrderTest();
|
2020-09-30 17:41:31 +00:00
|
|
|
runAddSimpleProductTest();
|
|
|
|
runAddVariableProductTest();
|
|
|
|
runUpdateGeneralSettingsTest();
|
|
|
|
runProductSettingsTest();
|
|
|
|
runTaxSettingsTest();
|
2020-12-06 03:30:42 +00:00
|
|
|
runOrderStatusFiltersTest();
|
2020-12-11 04:27:04 +00:00
|
|
|
runOrderRefundTest();
|
2020-12-16 03:14:02 +00:00
|
|
|
runOrderApplyCouponTest();
|
2021-01-20 23:19:07 +00:00
|
|
|
runProductEditDetailsTest();
|
|
|
|
runProductSearchTest();
|
2021-02-09 00:01:21 +00:00
|
|
|
runMerchantOrdersCustomerPaymentPage();
|
2020-09-30 17:41:31 +00:00
|
|
|
}
|
|
|
|
|
2021-03-01 18:36:04 +00:00
|
|
|
const runApiTests = () => {
|
|
|
|
runExternalProductAPITest();
|
|
|
|
runCouponApiTest();
|
|
|
|
}
|
|
|
|
|
2020-09-29 18:22:20 +00:00
|
|
|
module.exports = {
|
|
|
|
runActivationTest,
|
|
|
|
runOnboardingFlowTest,
|
|
|
|
runTaskListTest,
|
|
|
|
runInitialStoreSettingsTest,
|
|
|
|
runSetupOnboardingTests,
|
2021-02-23 08:17:45 +00:00
|
|
|
runExternalProductAPITest,
|
2021-02-24 19:16:38 +00:00
|
|
|
runGroupedProductAPITest,
|
2021-03-01 18:36:04 +00:00
|
|
|
runCouponApiTest,
|
2020-12-23 14:04:14 +00:00
|
|
|
runCartApplyCouponsTest,
|
2020-09-29 20:00:34 +00:00
|
|
|
runCartPageTest,
|
2020-12-23 15:51:25 +00:00
|
|
|
runCheckoutApplyCouponsTest,
|
2020-09-29 20:00:34 +00:00
|
|
|
runCheckoutPageTest,
|
|
|
|
runMyAccountPageTest,
|
|
|
|
runSingleProductPageTest,
|
2021-02-10 18:23:56 +00:00
|
|
|
runVariableProductUpdateTest,
|
2020-09-30 17:41:31 +00:00
|
|
|
runShopperTests,
|
|
|
|
runCreateCouponTest,
|
|
|
|
runCreateOrderTest,
|
2020-12-19 00:28:27 +00:00
|
|
|
runEditOrderTest,
|
2020-09-30 17:41:31 +00:00
|
|
|
runAddSimpleProductTest,
|
|
|
|
runAddVariableProductTest,
|
|
|
|
runUpdateGeneralSettingsTest,
|
|
|
|
runProductSettingsTest,
|
|
|
|
runTaxSettingsTest,
|
2020-12-06 03:30:42 +00:00
|
|
|
runOrderStatusFiltersTest,
|
2020-12-11 04:27:04 +00:00
|
|
|
runOrderRefundTest,
|
2020-12-16 03:14:02 +00:00
|
|
|
runOrderApplyCouponTest,
|
2021-01-20 23:19:07 +00:00
|
|
|
runProductEditDetailsTest,
|
|
|
|
runProductSearchTest,
|
2021-02-09 00:01:21 +00:00
|
|
|
runMerchantOrdersCustomerPaymentPage,
|
2020-09-30 17:41:31 +00:00
|
|
|
runMerchantTests,
|
2021-03-01 18:36:04 +00:00
|
|
|
runApiTests,
|
2020-09-29 18:22:20 +00:00
|
|
|
};
|