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-02-04 19:49:55 +00:00
|
|
|
const runProductBrowseSearchSortTest = require( './shopper/front-end-product-browse-search-sort.test' );
|
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' );
|
2021-02-01 17:29:15 +00:00
|
|
|
const runMyAccountPayOrderTest = require( './shopper/front-end-my-account-pay-order.test' );
|
2021-04-01 13:38:53 +00:00
|
|
|
const runMyAccountCreateAccountTest = require( './shopper/front-end-my-account-create-account.test' );
|
2020-09-30 17:41:31 +00:00
|
|
|
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' );
|
2021-03-25 12:17:42 +00:00
|
|
|
const runCheckoutCreateAccountTest = require( './shopper/front-end-checkout-create-account.test' );
|
2021-04-01 09:10:43 +00:00
|
|
|
const runCheckoutLoginAccountTest = require( './shopper/front-end-checkout-login-account.test' );
|
2021-04-07 15:50:09 +00:00
|
|
|
const runCartCalculateShippingTest = require( './shopper/front-end-cart-calculate-shipping.test' );
|
2021-04-05 13:53:49 +00:00
|
|
|
const runCartRedirectionTest = require( './shopper/front-end-cart-redirection.test' );
|
2021-04-15 11:28:25 +00:00
|
|
|
const runOrderEmailReceivingTest = require( './shopper/front-end-order-email-receiving.test' );
|
2020-11-27 21:49:20 +00:00
|
|
|
|
|
|
|
// Merchant tests
|
2021-03-13 11:26:28 +00:00
|
|
|
const runAddNewShippingZoneTest = require ( './merchant/wp-admin-settings-shipping-zones.test' );
|
2021-03-21 12:17:37 +00:00
|
|
|
const runAddShippingClassesTest = require('./merchant/wp-admin-settings-shipping-classes.test')
|
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' );
|
2021-11-19 21:24:35 +00:00
|
|
|
const runOrderRefundRestockTest = require( './merchant/wp-admin-order-refund-restock.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' );
|
2021-03-03 16:45:16 +00:00
|
|
|
const runMerchantOrderEmailsTest = require( './merchant/wp-admin-order-emails.test' );
|
2021-03-13 11:59:33 +00:00
|
|
|
const runOrderSearchingTest = require( './merchant/wp-admin-order-searching.test' );
|
2021-03-25 09:21:32 +00:00
|
|
|
const runAnalyticsPageLoadsTest = require( './merchant/wp-admin-analytics-page-loads.test' );
|
2021-03-18 16:27:50 +00:00
|
|
|
const runImportProductsTest = require( './merchant/wp-admin-product-import-csv.test' );
|
2021-04-22 10:42:50 +00:00
|
|
|
const runInitiateWccomConnectionTest = require( './merchant/wp-admin-extensions-connect-wccom.test' );
|
2021-11-25 18:17:09 +00:00
|
|
|
const runAdminPageLoadTests = require( './merchant/wp-admin-page-loads.test.js' );
|
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:33:30 +00:00
|
|
|
const runGroupedProductAPITest = require( './api/grouped-product.test' );
|
2021-03-02 22:47:01 +00:00
|
|
|
const runVariableProductAPITest = require( './api/variable-product.test' );
|
2021-05-04 02:21:00 +00:00
|
|
|
const runOrderApiTest = require( './api/order.test' );
|
2021-08-26 18:36:11 +00:00
|
|
|
const runTelemetryAPITest = require( './api/telemetry.test' );
|
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 = () => {
|
2021-02-04 19:49:55 +00:00
|
|
|
runProductBrowseSearchSortTest();
|
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();
|
2021-02-01 17:29:15 +00:00
|
|
|
runMyAccountPayOrderTest();
|
2021-04-01 13:38:53 +00:00
|
|
|
runMyAccountCreateAccountTest();
|
2020-09-29 20:00:34 +00:00
|
|
|
runSingleProductPageTest();
|
2021-02-10 18:23:56 +00:00
|
|
|
runVariableProductUpdateTest();
|
2021-03-25 12:17:42 +00:00
|
|
|
runCheckoutCreateAccountTest();
|
2021-04-01 09:10:43 +00:00
|
|
|
runCheckoutLoginAccountTest();
|
2021-04-07 15:50:09 +00:00
|
|
|
runCartCalculateShippingTest();
|
2021-04-22 10:42:50 +00:00
|
|
|
runCartRedirectionTest();
|
2021-04-15 11:28:25 +00:00
|
|
|
runOrderEmailReceivingTest();
|
2020-09-29 20:00:34 +00:00
|
|
|
};
|
|
|
|
|
2020-09-30 17:41:31 +00:00
|
|
|
const runMerchantTests = () => {
|
2021-04-04 08:20:59 +00:00
|
|
|
runAddShippingClassesTest();
|
2021-03-19 10:58:20 +00:00
|
|
|
runImportProductsTest();
|
2021-03-13 12:56:38 +00:00
|
|
|
runOrderSearchingTest();
|
2021-03-13 12:49:06 +00:00
|
|
|
runAddNewShippingZoneTest();
|
2020-09-30 17:41:31 +00:00
|
|
|
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();
|
2021-11-19 21:24:35 +00:00
|
|
|
runOrderRefundRestockTest();
|
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();
|
2021-03-25 09:21:32 +00:00
|
|
|
runAnalyticsPageLoadsTest();
|
2021-04-22 10:42:50 +00:00
|
|
|
runInitiateWccomConnectionTest();
|
2021-11-26 16:06:00 +00:00
|
|
|
runAdminPageLoadTests();
|
2020-09-30 17:41:31 +00:00
|
|
|
}
|
|
|
|
|
2021-03-01 18:36:04 +00:00
|
|
|
const runApiTests = () => {
|
|
|
|
runExternalProductAPITest();
|
2021-03-03 16:25:24 +00:00
|
|
|
runGroupedProductAPITest();
|
2021-03-02 22:47:01 +00:00
|
|
|
runVariableProductAPITest();
|
2021-03-01 18:36:04 +00:00
|
|
|
runCouponApiTest();
|
2021-05-04 02:21:00 +00:00
|
|
|
runOrderApiTest();
|
2021-08-26 18:36:11 +00:00
|
|
|
runTelemetryAPITest();
|
2021-03-01 18:36:04 +00:00
|
|
|
}
|
|
|
|
|
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-02 22:47:01 +00:00
|
|
|
runVariableProductAPITest,
|
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,
|
2021-02-01 17:29:15 +00:00
|
|
|
runMyAccountPayOrderTest,
|
2020-09-29 20:00:34 +00:00
|
|
|
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,
|
2021-05-04 02:21:00 +00:00
|
|
|
runOrderApiTest,
|
2020-12-06 03:30:42 +00:00
|
|
|
runOrderStatusFiltersTest,
|
2020-12-11 04:27:04 +00:00
|
|
|
runOrderRefundTest,
|
2021-11-19 21:24:35 +00:00
|
|
|
runOrderRefundRestockTest,
|
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,
|
2021-03-03 16:45:16 +00:00
|
|
|
runMerchantOrderEmailsTest,
|
2020-09-30 17:41:31 +00:00
|
|
|
runMerchantTests,
|
2021-02-18 20:53:30 +00:00
|
|
|
runOrderSearchingTest,
|
2021-02-11 16:47:58 +00:00
|
|
|
runAddNewShippingZoneTest,
|
2021-02-04 13:44:23 +00:00
|
|
|
runProductBrowseSearchSortTest,
|
2021-03-01 18:36:04 +00:00
|
|
|
runApiTests,
|
2021-04-04 08:47:33 +00:00
|
|
|
runAddShippingClassesTest,
|
2021-03-25 09:21:32 +00:00
|
|
|
runAnalyticsPageLoadsTest,
|
2021-03-25 12:17:42 +00:00
|
|
|
runCheckoutCreateAccountTest,
|
2021-04-15 11:28:25 +00:00
|
|
|
runImportProductsTest,
|
2021-04-01 09:10:43 +00:00
|
|
|
runCheckoutLoginAccountTest,
|
2021-04-07 15:50:09 +00:00
|
|
|
runCartCalculateShippingTest,
|
2021-04-05 13:53:49 +00:00
|
|
|
runCartRedirectionTest,
|
2021-04-13 07:23:18 +00:00
|
|
|
runMyAccountCreateAccountTest,
|
2021-04-15 11:28:25 +00:00
|
|
|
runOrderEmailReceivingTest,
|
2021-04-22 10:42:50 +00:00
|
|
|
runInitiateWccomConnectionTest,
|
2021-08-26 18:36:11 +00:00
|
|
|
runTelemetryAPITest,
|
2021-11-25 00:18:56 +00:00
|
|
|
runAdminPageLoadTests,
|
2020-09-29 18:22:20 +00:00
|
|
|
};
|