From 51495ff32c89f3477224021707735565069be865 Mon Sep 17 00:00:00 2001 From: Tarun Vijwani Date: Thu, 5 May 2022 12:19:38 +0400 Subject: [PATCH] Meaningful comment for skipping the e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/6353) * Added meaningful comment for skipping the tests if it's a WooCommerce Core process environment. * Fixed the flag number for MiniCart --- .../tests/e2e/specs/shopper/cart-checkout/account.test.js | 1 + .../tests/e2e/specs/shopper/cart-checkout/cart.test.js | 1 + .../tests/e2e/specs/shopper/cart-checkout/checkout.test.js | 1 + .../tests/e2e/specs/shopper/cart-checkout/tax.test.js | 1 + .../tests/e2e/specs/shopper/cart-checkout/translations.test.js | 1 + .../tests/e2e/specs/shopper/mini-cart.test.js | 3 ++- 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/account.test.js b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/account.test.js index c57d7f69d89..a1357eecb49 100644 --- a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/account.test.js +++ b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/account.test.js @@ -26,6 +26,7 @@ const block = { if ( process.env.WOOCOMMERCE_BLOCKS_PHASE < 2 ) { // Skips all the tests if it's a WooCommerce Core process environment. + // eslint-disable-next-line jest/no-focused-tests test.only( 'Skipping Cart & Checkout tests', () => {} ); } diff --git a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/cart.test.js b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/cart.test.js index d8e2106f586..dd6b9f7ff8c 100644 --- a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/cart.test.js +++ b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/cart.test.js @@ -4,6 +4,7 @@ import { shopper, SIMPLE_VIRTUAL_PRODUCT_NAME } from '../../../../utils'; if ( process.env.WOOCOMMERCE_BLOCKS_PHASE < 2 ) { + // Skips all the tests if it's a WooCommerce Core process environment. // eslint-disable-next-line jest/no-focused-tests test.only( `Skipping Cart & Checkout tests`, () => {} ); } diff --git a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/checkout.test.js b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/checkout.test.js index bd89ccd659c..453bfedca60 100644 --- a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/checkout.test.js +++ b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/checkout.test.js @@ -31,6 +31,7 @@ import { import { createCoupon } from '../../../utils'; if ( process.env.WOOCOMMERCE_BLOCKS_PHASE < 2 ) { + // Skips all the tests if it's a WooCommerce Core process environment. // eslint-disable-next-line jest/no-focused-tests test.only( 'Skipping Cart & Checkout tests', () => {} ); } diff --git a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/tax.test.js b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/tax.test.js index 61992c39ae8..a806fc71619 100644 --- a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/tax.test.js +++ b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/tax.test.js @@ -17,6 +17,7 @@ const productWooSingle1 = Products().find( ); if ( process.env.WOOCOMMERCE_BLOCKS_PHASE < 2 ) { + // Skips all the tests if it's a WooCommerce Core process environment. // eslint-disable-next-line jest/no-focused-tests test.only( `Skipping Cart & Checkout tests`, () => {} ); } diff --git a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/translations.test.js b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/translations.test.js index effd2b3b4ce..5b7076edcda 100644 --- a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/translations.test.js +++ b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/cart-checkout/translations.test.js @@ -4,6 +4,7 @@ import { merchant, shopper } from '../../../../utils'; if ( process.env.WOOCOMMERCE_BLOCKS_PHASE < 2 ) { + // Skips all the tests if it's a WooCommerce Core process environment. // eslint-disable-next-line jest/no-focused-tests test.only( 'Skipping Cart & Checkout tests', () => {} ); } diff --git a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/mini-cart.test.js b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/mini-cart.test.js index 128c0ee9835..f8c880ebcb8 100644 --- a/plugins/woocommerce-blocks/tests/e2e/specs/shopper/mini-cart.test.js +++ b/plugins/woocommerce-blocks/tests/e2e/specs/shopper/mini-cart.test.js @@ -54,7 +54,8 @@ const WooCommerce = new WooCommerceRestApi( { }, } ); -if ( process.env.WOOCOMMERCE_BLOCKS_PHASE < 3 ) { +if ( process.env.WOOCOMMERCE_BLOCKS_PHASE < 2 ) { + // Skips all the tests if it's a WooCommerce Core process environment. // eslint-disable-next-line jest/no-focused-tests test.only( `Skipping ${ block.name } tests`, () => {} ); }