From 5f85a42057c74ac26a432f6d5f3dfd9cd9d7e0f4 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 13 Dec 2021 18:29:00 -0500 Subject: [PATCH 01/19] Updated CHANGELOG.md --- packages/js/e2e-environment/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/js/e2e-environment/CHANGELOG.md b/packages/js/e2e-environment/CHANGELOG.md index 781c66330cb..c82ad0737cd 100644 --- a/packages/js/e2e-environment/CHANGELOG.md +++ b/packages/js/e2e-environment/CHANGELOG.md @@ -2,6 +2,11 @@ ## Added +- Added a `config` export to the `@woocommerce/e2e-environment` package that has all data and methods of the [config](https://github.com/lorenwest/node-config) package + - it provides its own `get()` method that accepts an extra optional default parameter to be used if the property is not found in the config file. + +## Added + - Added `await` for every call to `shopper.logout` ## Fixed From ae2e004c0e916e01c7979270b1db2956581efe06 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 13 Dec 2021 18:32:15 -0500 Subject: [PATCH 02/19] Added custom config.js to e2e-environment package This custom config.js provides all the functionality of the config package along with extending the `get` method to accept an optional second argument that will be used if the property is not found in the config file. --- packages/js/e2e-environment/config/config.js | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 packages/js/e2e-environment/config/config.js diff --git a/packages/js/e2e-environment/config/config.js b/packages/js/e2e-environment/config/config.js new file mode 100644 index 00000000000..7cb078255fd --- /dev/null +++ b/packages/js/e2e-environment/config/config.js @@ -0,0 +1,32 @@ +/** + * External Dependencies + */ +const config = require( 'config' ); + +/** + * Since the 'config' object is not extensible, we create an empty 'e2eConfig' object and map + * its prototype to the 'config' object. This allows us to extend the new 'e2eConfig' object + * while still having access to all the data and methods of 'config' + */ +const e2eConfig = Object.create( config ); + +/** + * + * @param property { string } - the property to be fetched from the config file + * @param defaultValue { string | number | boolean | null } - default value if 'property' is not found + * @returns { string | number | boolean } + * @throws Error + */ +e2eConfig.get = ( property, defaultValue = null ) => { + if ( config.has( property ) ) { + return config.get( property ); + } else if ( defaultValue ) { + return defaultValue; + } + + throw new Error( + `Configuration property "${ property }" is not defined and no defaultValue has been provided` + ); +}; + +module.exports = e2eConfig; From e789dbeada318e275fffdefa76865f2ef1e6d066 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 13 Dec 2021 18:33:17 -0500 Subject: [PATCH 03/19] Added config to e2e-environment exports --- packages/js/e2e-environment/config/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/js/e2e-environment/config/index.js b/packages/js/e2e-environment/config/index.js index ba96035504a..b4fd540211c 100644 --- a/packages/js/e2e-environment/config/index.js +++ b/packages/js/e2e-environment/config/index.js @@ -1,6 +1,7 @@ /** * Internal dependencies */ +const config = require('./config'); const jestConfig = require( './jest.config' ); const jestPuppeteerConfig = require( './jest-puppeteer.config' ); const jestobjectConfig = require('./jest-object.config'); @@ -12,6 +13,7 @@ const { } = require( './use-config' ); module.exports = { + config, jestConfig, ...jestobjectConfig, jestPuppeteerConfig, From 84f98b5ae9edf61355995ef697d477536ccf59f0 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 13 Dec 2021 18:36:18 -0500 Subject: [PATCH 04/19] Required `config` from @woocommerce/e2e-environment package --- .../specs/activate-and-setup/onboarding-tasklist.test.js | 2 +- packages/js/e2e-core-tests/specs/api/coupon.test.js | 2 +- .../js/e2e-core-tests/specs/api/external-product.test.js | 2 +- .../js/e2e-core-tests/specs/api/grouped-product.test.js | 2 +- packages/js/e2e-core-tests/specs/api/order.test.js | 2 +- .../specs/merchant/wp-admin-order-apply-coupon.test.js | 4 ++-- .../merchant/wp-admin-order-customer-payment-page.test.js | 4 ++-- .../specs/merchant/wp-admin-order-emails.test.js | 6 +++--- .../specs/merchant/wp-admin-order-new.test.js | 2 +- .../specs/merchant/wp-admin-order-refund.test.js | 4 ++-- .../specs/merchant/wp-admin-product-new.test.js | 4 ++-- .../specs/merchant/wp-admin-product-search.test.js | 4 ++-- .../merchant/wp-admin-settings-shipping-zones.test.js | 4 ++-- .../shopper/front-end-cart-calculate-shipping.test.js | 4 ++-- .../specs/shopper/front-end-cart-redirection.test.js | 2 +- .../e2e-core-tests/specs/shopper/front-end-cart.test.js | 4 ++-- .../shopper/front-end-checkout-create-account.test.js | 2 +- .../specs/shopper/front-end-checkout.test.js | 4 ++-- .../specs/shopper/front-end-my-account-pay-order.test.js | 2 +- .../specs/shopper/front-end-order-email-receiving.test.js | 2 +- .../shopper/front-end-product-browse-search-sort.test.js | 8 ++++---- .../specs/shopper/front-end-single-product.test.js | 4 ++-- 22 files changed, 37 insertions(+), 37 deletions(-) diff --git a/packages/js/e2e-core-tests/specs/activate-and-setup/onboarding-tasklist.test.js b/packages/js/e2e-core-tests/specs/activate-and-setup/onboarding-tasklist.test.js index a54fabc13c7..c6e03feb6cd 100644 --- a/packages/js/e2e-core-tests/specs/activate-and-setup/onboarding-tasklist.test.js +++ b/packages/js/e2e-core-tests/specs/activate-and-setup/onboarding-tasklist.test.js @@ -12,7 +12,7 @@ const { /** * External dependencies */ -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); import deprecated from '@wordpress/deprecated'; const { it, diff --git a/packages/js/e2e-core-tests/specs/api/coupon.test.js b/packages/js/e2e-core-tests/specs/api/coupon.test.js index 512cb6d8249..d41dbb958ba 100644 --- a/packages/js/e2e-core-tests/specs/api/coupon.test.js +++ b/packages/js/e2e-core-tests/specs/api/coupon.test.js @@ -6,7 +6,7 @@ const { HTTPClientFactory, Coupon } = require( '@woocommerce/api' ); /** * External dependencies */ -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const { it, describe, beforeAll } = require( '@jest/globals' ); /** diff --git a/packages/js/e2e-core-tests/specs/api/external-product.test.js b/packages/js/e2e-core-tests/specs/api/external-product.test.js index 6f8882aedf6..5e4b3ed3f83 100644 --- a/packages/js/e2e-core-tests/specs/api/external-product.test.js +++ b/packages/js/e2e-core-tests/specs/api/external-product.test.js @@ -6,7 +6,7 @@ const { HTTPClientFactory, ExternalProduct } = require( '@woocommerce/api' ); /** * External dependencies */ -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const { it, describe, beforeAll } = require( '@jest/globals' ); /** diff --git a/packages/js/e2e-core-tests/specs/api/grouped-product.test.js b/packages/js/e2e-core-tests/specs/api/grouped-product.test.js index 3a1cf785dd0..ad1d5717991 100644 --- a/packages/js/e2e-core-tests/specs/api/grouped-product.test.js +++ b/packages/js/e2e-core-tests/specs/api/grouped-product.test.js @@ -10,7 +10,7 @@ const { /** * External dependencies */ -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const { it, describe, beforeAll } = require( '@jest/globals' ); /** diff --git a/packages/js/e2e-core-tests/specs/api/order.test.js b/packages/js/e2e-core-tests/specs/api/order.test.js index 0f4b5d75bed..6bf560f10fa 100644 --- a/packages/js/e2e-core-tests/specs/api/order.test.js +++ b/packages/js/e2e-core-tests/specs/api/order.test.js @@ -6,7 +6,7 @@ const { HTTPClientFactory, Order } = require( '@woocommerce/api' ); /** * External dependencies */ -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const { it, describe, beforeAll } = require( '@jest/globals' ); /** diff --git a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-apply-coupon.test.js b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-apply-coupon.test.js index 6e70fa8f95a..1696fa6fecf 100644 --- a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-apply-coupon.test.js +++ b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-apply-coupon.test.js @@ -11,8 +11,8 @@ const { utils, } = require( '@woocommerce/e2e-utils' ); -const config = require( 'config' ); -const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99'; +const { config } = require( '@woocommerce/e2e-environment' ); +const simpleProductPrice = config.get( 'products.simple.price', '9.99' ); const discountedPrice = simpleProductPrice - 5.00; const couponDialogMessage = 'Enter a coupon code to apply. Discounts are applied to line totals, before taxes.'; diff --git a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-customer-payment-page.test.js b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-customer-payment-page.test.js index 988dc193d30..92e047962bc 100644 --- a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-customer-payment-page.test.js +++ b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-customer-payment-page.test.js @@ -9,9 +9,9 @@ const { } = require( '@woocommerce/e2e-utils' ); // TODO create a function for the logic below getConfigSimpleProduct(), see: https://github.com/woocommerce/woocommerce/issues/29072 -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); -const simpleProductPrice = config.has( 'products.simple.price' ) ? config.get( 'products.simple.price' ) : '9.99'; +const simpleProductPrice = config.get( 'products.simple.price', '9.99' ); const runMerchantOrdersCustomerPaymentPage = () => { let orderId; diff --git a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-emails.test.js b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-emails.test.js index 1fbb5a0099f..8d9b7e2fbc0 100644 --- a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-emails.test.js +++ b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-emails.test.js @@ -9,10 +9,10 @@ const { deleteAllEmailLogs, } = require( '@woocommerce/e2e-utils' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const customerEmail = config.get( 'addresses.customer.billing.email' ); -const adminEmail = config.has( 'users.admin.email' ) ? config.get( 'users.admin.email' ) : 'admin@woocommercecoree2etestsuite.com'; -const storeName = 'WooCommerce Core E2E Test Suite'; +const adminEmail = config.get( 'users.admin.email', 'admin@woocommercecoree2etestsuite.com' ); +const storeName = config.get( 'storeName', 'WooCommerce Core E2E Test Suite' ); let orderId; diff --git a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-new.test.js b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-new.test.js index 3dd15e2d758..39f510c437e 100644 --- a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-new.test.js +++ b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-new.test.js @@ -7,7 +7,7 @@ const { withRestApi, AdminEdit, } = require( '@woocommerce/e2e-utils' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const { HTTPClientFactory, VariableProduct, diff --git a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-refund.test.js b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-refund.test.js index a2cc152406f..f90f29ac36f 100644 --- a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-refund.test.js +++ b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-refund.test.js @@ -12,8 +12,8 @@ const { clickAndWaitForSelector, } = require( '@woocommerce/e2e-utils' ); -const config = require( 'config' ); -const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99'; +const { config } = require( '@woocommerce/e2e-environment' ); +const simpleProductPrice = config.get( 'products.simple.price', '9.99' ); const runRefundOrderTest = () => { describe('WooCommerce Orders > Refund an order', () => { diff --git a/packages/js/e2e-core-tests/specs/merchant/wp-admin-product-new.test.js b/packages/js/e2e-core-tests/specs/merchant/wp-admin-product-new.test.js index d22f6f33834..99cbe26d0c8 100644 --- a/packages/js/e2e-core-tests/specs/merchant/wp-admin-product-new.test.js +++ b/packages/js/e2e-core-tests/specs/merchant/wp-admin-product-new.test.js @@ -25,11 +25,11 @@ const { describe, beforeAll, } = require( '@jest/globals' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const VirtualProductName = 'Virtual Product Name'; const NonVirtualProductName = 'Non-Virtual Product Name'; -const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99'; +const simpleProductPrice = config.get( 'products.simple.price', '9.99' ); const openNewProductAndVerify = async () => { // Go to "add product" page diff --git a/packages/js/e2e-core-tests/specs/merchant/wp-admin-product-search.test.js b/packages/js/e2e-core-tests/specs/merchant/wp-admin-product-search.test.js index d397c5685dc..a4f39b9ae03 100644 --- a/packages/js/e2e-core-tests/specs/merchant/wp-admin-product-search.test.js +++ b/packages/js/e2e-core-tests/specs/merchant/wp-admin-product-search.test.js @@ -8,9 +8,9 @@ const { createSimpleProduct } = require( '@woocommerce/e2e-utils' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); -const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99'; +const simpleProductPrice = config.get( 'products.simple.price', '9.99' ); const runProductSearchTest = () => { describe('Products > Search and View a product', () => { diff --git a/packages/js/e2e-core-tests/specs/merchant/wp-admin-settings-shipping-zones.test.js b/packages/js/e2e-core-tests/specs/merchant/wp-admin-settings-shipping-zones.test.js index ec59ac1df15..53716c179a5 100644 --- a/packages/js/e2e-core-tests/specs/merchant/wp-admin-settings-shipping-zones.test.js +++ b/packages/js/e2e-core-tests/specs/merchant/wp-admin-settings-shipping-zones.test.js @@ -21,8 +21,8 @@ const { beforeAll, } = require( '@jest/globals' ); -const config = require( 'config' ); -const simpleProductPrice = config.has( 'products.simple.price' ) ? config.get( 'products.simple.price' ) : '9.99'; +const { config } = require( '@woocommerce/e2e-environment' ); +const simpleProductPrice = config.get( 'products.simple.price', '9.99' ); const california = 'state:US:CA'; const sanFranciscoZIP = '94107'; const shippingZoneNameUS = 'US with Flat rate'; diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-cart-calculate-shipping.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-cart-calculate-shipping.test.js index 98add6b0d52..45a537c3db4 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-cart-calculate-shipping.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-cart-calculate-shipping.test.js @@ -18,8 +18,8 @@ const { beforeAll, } = require( '@jest/globals' ); -const config = require( 'config' ); -const firstProductPrice = config.has( 'products.simple.price' ) ? config.get( 'products.simple.price' ) : '9.99'; +const { config } = require( '@woocommerce/e2e-environment' ); +const firstProductPrice = config.get( 'products.simple.price', '9.99' ); const secondProductPrice = '4.99'; const fourProductPrice = firstProductPrice * 4; var twoProductsPrice = (+firstProductPrice) + (+secondProductPrice); diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-cart-redirection.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-cart-redirection.test.js index e91262de4cd..f83f3948362 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-cart-redirection.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-cart-redirection.test.js @@ -21,7 +21,7 @@ afterAll, } = require( '@jest/globals' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); const runCartRedirectionTest = () => { diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-cart.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-cart.test.js index fea98893cf7..fa70f769e39 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-cart.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-cart.test.js @@ -17,9 +17,9 @@ const { beforeAll, } = require( '@jest/globals' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); -const singleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99'; +const singleProductPrice = config.get( 'products.simple.price', '9.99' ); const twoProductPrice = singleProductPrice * 2; const runCartPageTest = () => { diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-checkout-create-account.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-checkout-create-account.test.js index 71dc37a1bdf..629185ada8e 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-checkout-create-account.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-checkout-create-account.test.js @@ -21,7 +21,7 @@ const { beforeAll, } = require( '@jest/globals' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const customerBilling = config.get( 'addresses.customer.billing' ); const runCheckoutCreateAccountTest = () => { diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-checkout.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-checkout.test.js index 47999a5d07d..ea00b8911b3 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-checkout.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-checkout.test.js @@ -9,9 +9,9 @@ const { uiUnblocked, } = require( '@woocommerce/e2e-utils' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); -const singleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99'; +const singleProductPrice = config.get( 'products.simple.price', '9.99' ); const twoProductPrice = singleProductPrice * 2; const threeProductPrice = singleProductPrice * 3; const fourProductPrice = singleProductPrice * 4; diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-my-account-pay-order.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-my-account-pay-order.test.js index 4b6e9ca6609..f0ed8206fa7 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-my-account-pay-order.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-my-account-pay-order.test.js @@ -11,7 +11,7 @@ const { let simplePostIdValue; let orderNum; -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); const runMyAccountPayOrderTest = () => { diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-order-email-receiving.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-order-email-receiving.test.js index 45961523c36..095122e2861 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-order-email-receiving.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-order-email-receiving.test.js @@ -12,7 +12,7 @@ let simplePostIdValue; let orderId; -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); const customerEmail = config.get( 'addresses.customer.billing.email' ); const storeName = 'WooCommerce Core E2E Test Suite'; diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js index a0a1a298582..73c4526f5ff 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js @@ -17,11 +17,11 @@ const { beforeAll, } = require( '@jest/globals' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); -const singleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99'; -const singleProductPrice2 = config.has('products.simple.price') ? '1' + singleProductPrice : '19.99'; -const singleProductPrice3 = config.has('products.simple.price') ? '2' + singleProductPrice : '29.99'; +const singleProductPrice = config.get( 'products.simple.price', '9.99' ); +const singleProductPrice2 = config.get( 'products.simple.price', '19.99' ); +const singleProductPrice3 = config.get( 'products.simple.price', '29.99' ); const clothing = 'Clothing'; const audio = 'Audio'; const hardware = 'Hardware'; diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-single-product.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-single-product.test.js index 6a04850ca52..213e2d52aa6 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-single-product.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-single-product.test.js @@ -9,7 +9,7 @@ const { uiUnblocked } = require( '@woocommerce/e2e-utils' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); // Variables for simple product const simpleProductName = config.get( 'products.simple.name' ); @@ -20,7 +20,7 @@ const defaultVariableProduct = config.get( 'products.variable' ); let variableProductId; // Variables for grouped product -const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99'; +const simpleProductPrice = config.get( 'products.simple.price', '9.99' ); const simple1 = { name: simpleProductName + ' 1', regularPrice: simpleProductPrice From f132a10129839eb2b12409584af230cf192b4daa Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 13 Dec 2021 19:10:04 -0500 Subject: [PATCH 05/19] Required `config` from @woocommerce/e2e-environment package --- packages/js/e2e-core-tests/specs/api/telemetry.test.js | 2 +- packages/js/e2e-core-tests/specs/api/variable-product.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/js/e2e-core-tests/specs/api/telemetry.test.js b/packages/js/e2e-core-tests/specs/api/telemetry.test.js index 7def25552ba..139f1c0d376 100644 --- a/packages/js/e2e-core-tests/specs/api/telemetry.test.js +++ b/packages/js/e2e-core-tests/specs/api/telemetry.test.js @@ -6,7 +6,7 @@ const { HTTPClientFactory } = require( '@woocommerce/api' ); /** * External dependencies */ -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const { it, describe, beforeAll } = require( '@jest/globals' ); /** diff --git a/packages/js/e2e-core-tests/specs/api/variable-product.test.js b/packages/js/e2e-core-tests/specs/api/variable-product.test.js index 3fcea7a8792..4579b6222fe 100644 --- a/packages/js/e2e-core-tests/specs/api/variable-product.test.js +++ b/packages/js/e2e-core-tests/specs/api/variable-product.test.js @@ -7,7 +7,7 @@ const { HTTPClientFactory, VariableProduct, ProductVariation } = require( '@wooc /** * External dependencies */ -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const { it, describe, From c34dde8714b991841d89e7db0fa7ceb93cbefa22 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 13 Dec 2021 19:10:15 -0500 Subject: [PATCH 06/19] Removed unused import --- .../specs/merchant/wp-admin-order-status-filters.test.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-status-filters.test.js b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-status-filters.test.js index 5a2740774cd..75b970184c1 100644 --- a/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-status-filters.test.js +++ b/packages/js/e2e-core-tests/specs/merchant/wp-admin-order-status-filters.test.js @@ -1,8 +1,6 @@ /** * Internal dependencies */ -const config = require( 'config' ); - const { merchant, withRestApi, From ac7c1e1ad6a4246764fa821d95a7159b402e523c Mon Sep 17 00:00:00 2001 From: jamelreid Date: Tue, 14 Dec 2021 12:48:07 -0500 Subject: [PATCH 07/19] Updated README.md --- packages/js/e2e-environment/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/js/e2e-environment/README.md b/packages/js/e2e-environment/README.md index 85a2e0a76a9..42447605cab 100644 --- a/packages/js/e2e-environment/README.md +++ b/packages/js/e2e-environment/README.md @@ -85,6 +85,22 @@ The E2E environment has the following methods to let us control Jest's overall b E2E_RETRY_TIMES=2 pnpx wc-e2e test:e2e ``` +### Default Environment Configurations + +The E2E environment exports a config object which provides all the functionality of the [config](https://www.npmjs.com/package/config) package along with extending the `get` method to accept an optional second argument that will be used if the property is not found in the config file. + +```js +const { config } = require( '@woocommerce/e2e-environment' ); + +// 'users.admin.email' doesn't exist +const adminEmail = config.get( 'users.admin.email', 'admin@woocommercecoree2etestsuite.com' ); + +console.log( adminEmail ); +// admin@woocommercecoree2etestsuite.com +``` + +**Note**: If the default parameter is not found and no optional parameter is provided, an error will be thrown. + #### Test Screenshots The test sequencer provides a screenshot function for test failures. To enable screenshots on test failure use From e9534034cb301390fd653c7af271d1e3a6eec835 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Wed, 15 Dec 2021 14:47:20 -0500 Subject: [PATCH 08/19] Added e2e-environment to peerDependencies --- packages/js/e2e-core-tests/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/js/e2e-core-tests/package.json b/packages/js/e2e-core-tests/package.json index 9ba215ddc21..09ad1b92f47 100644 --- a/packages/js/e2e-core-tests/package.json +++ b/packages/js/e2e-core-tests/package.json @@ -17,7 +17,8 @@ }, "peerDependencies": { "@woocommerce/api": "^0.2.0", - "@woocommerce/e2e-utils": "^0.1.6" + "@woocommerce/e2e-utils": "^0.1.6", + "@woocommerce/e2e-environment": "^0.2.3" }, "publishConfig": { "access": "public" From 2712e737a879a0fc08a0462572d74e5c135f0dab Mon Sep 17 00:00:00 2001 From: Jamel Noel Reid Date: Mon, 20 Dec 2021 11:49:16 -0500 Subject: [PATCH 09/19] Update packages/js/e2e-environment/CHANGELOG.md Co-authored-by: Ron Rennick --- packages/js/e2e-environment/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/js/e2e-environment/CHANGELOG.md b/packages/js/e2e-environment/CHANGELOG.md index 496a3b4d90c..2745e66e107 100644 --- a/packages/js/e2e-environment/CHANGELOG.md +++ b/packages/js/e2e-environment/CHANGELOG.md @@ -3,7 +3,7 @@ ## Added - Added a `config` export to the `@woocommerce/e2e-environment` package that has all data and methods of the [config](https://github.com/lorenwest/node-config) package - - it provides its own `get()` method that accepts an extra optional default parameter to be used if the property is not found in the config file. + - it provides its own `get()` method that accepts an optional default parameter to be used if the property is not found in the config file. ## Added From f252c4925bf2c199715ab71daa2937c2f0675e31 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Tue, 21 Dec 2021 14:52:47 -0500 Subject: [PATCH 10/19] Updated product price assignment --- .../shopper/front-end-product-browse-search-sort.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js index 73c4526f5ff..c0bf71466aa 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js @@ -20,8 +20,8 @@ const { const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); const singleProductPrice = config.get( 'products.simple.price', '9.99' ); -const singleProductPrice2 = config.get( 'products.simple.price', '19.99' ); -const singleProductPrice3 = config.get( 'products.simple.price', '29.99' ); +const singleProductPrice2 = '1' + config.get( 'products.simple.price', '19.99' ); +const singleProductPrice3 = '2' + config.get( 'products.simple.price', '29.99' ); const clothing = 'Clothing'; const audio = 'Audio'; const hardware = 'Hardware'; From f9cb8a7617d16e9730c1c00596f7454200697c8b Mon Sep 17 00:00:00 2001 From: jamelreid Date: Thu, 23 Dec 2021 12:05:59 -0500 Subject: [PATCH 11/19] Updated price assignment --- .../shopper/front-end-product-browse-search-sort.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js index c0bf71466aa..fab50e10b7d 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-product-browse-search-sort.test.js @@ -20,8 +20,8 @@ const { const { config } = require( '@woocommerce/e2e-environment' ); const simpleProductName = config.get( 'products.simple.name' ); const singleProductPrice = config.get( 'products.simple.price', '9.99' ); -const singleProductPrice2 = '1' + config.get( 'products.simple.price', '19.99' ); -const singleProductPrice3 = '2' + config.get( 'products.simple.price', '29.99' ); +const singleProductPrice2 = '1' + singleProductPrice; +const singleProductPrice3 = '2' + singleProductPrice; const clothing = 'Clothing'; const audio = 'Audio'; const hardware = 'Hardware'; From 9be997d36e1188b15c76e9a00b8d42980c61bae1 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Thu, 23 Dec 2021 18:02:37 -0500 Subject: [PATCH 12/19] Updated to always remove label after smoke test --- .github/workflows/pr-smoke-test.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index 72f6ad376fd..51e5a53399e 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -13,10 +13,10 @@ jobs: steps: - name: Create dirs. run: | - mkdir -p code/woocommerce - mkdir -p package/woocommerce - mkdir -p tmp/woocommerce - mkdir -p node_modules + mkdir -p code/woocommerce + mkdir -p package/woocommerce + mkdir -p tmp/woocommerce + mkdir -p node_modules - name: Checkout code. uses: actions/checkout@v2 @@ -32,7 +32,7 @@ jobs: pnpm nx composer-install-no-dev woocommerce pnpm nx build-assets woocommerce pnpm install jest - + - name: Run smoke test. working-directory: package/woocommerce/plugins/woocommerce if: steps.installation.outcome == 'success' @@ -55,7 +55,7 @@ jobs: - name: Post Smoke tests results comment on PR if: always() uses: actions/github-script@v5 - env: + env: TITLE: 'Smoke Test Results' SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }} with: @@ -86,7 +86,7 @@ jobs: - name: Post E2E tests results comment on PR if: always() uses: actions/github-script@v5 - env: + env: TITLE: 'E2E Test Results' SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }} with: @@ -96,7 +96,9 @@ jobs: await script({github, context}) - name: Remove label from pull request. - if: "${{ contains(github.event.pull_request.labels.*.name, 'run: smoke tests') }}" + if: | + ${{ contains(github.event.label.name, 'run: smoke tests') }} && + always() uses: actions-ecosystem/action-remove-labels@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} From 48dec9ea14ba54c4a1504761576447895d5a39f5 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Thu, 23 Dec 2021 18:14:40 -0500 Subject: [PATCH 13/19] Updated step condition --- .github/workflows/pr-smoke-test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index 51e5a53399e..d855bf67d2a 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -96,9 +96,7 @@ jobs: await script({github, context}) - name: Remove label from pull request. - if: | - ${{ contains(github.event.label.name, 'run: smoke tests') }} && - always() + if: always() uses: actions-ecosystem/action-remove-labels@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} From bd48783c2582d5ff4ca5fd9ea686e94f233c6a2c Mon Sep 17 00:00:00 2001 From: jamelreid Date: Thu, 23 Dec 2021 18:27:17 -0500 Subject: [PATCH 14/19] Updated test steps to always execute --- .github/workflows/pr-smoke-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index d855bf67d2a..a4a800077ff 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -35,7 +35,7 @@ jobs: - name: Run smoke test. working-directory: package/woocommerce/plugins/woocommerce - if: steps.installation.outcome == 'success' + if: always() env: SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }} SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }} @@ -66,7 +66,7 @@ jobs: - name: Run E2E tests. working-directory: package/woocommerce/plugins/woocommerce - if: steps.installation.outcome == 'success' + if: always() env: SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }} SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }} From 5c9032a3cc5c4b19d589f80f59639ed205f8aa0b Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 3 Jan 2022 17:39:04 -0500 Subject: [PATCH 15/19] Removed config dependency --- packages/js/e2e-core-tests/package.json | 1 - pnpm-lock.yaml | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/js/e2e-core-tests/package.json b/packages/js/e2e-core-tests/package.json index 09ad1b92f47..e63c58fea39 100644 --- a/packages/js/e2e-core-tests/package.json +++ b/packages/js/e2e-core-tests/package.json @@ -12,7 +12,6 @@ "dependencies": { "@jest/globals": "^26.4.2", "@wordpress/deprecated": "^3.2.3", - "config": "3.3.3", "faker": "^5.1.0" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 89b0cb723f2..b52496d01f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,12 +102,10 @@ importers: specifiers: '@jest/globals': ^26.4.2 '@wordpress/deprecated': ^3.2.3 - config: 3.3.3 faker: ^5.1.0 dependencies: '@jest/globals': 26.6.2 '@wordpress/deprecated': 3.2.3 - config: 3.3.3 faker: 5.5.3 packages/js/e2e-environment: @@ -195,7 +193,6 @@ importers: '@wordpress/browserslist-config': ^4.1.0 '@wordpress/deprecated': ^3.2.3 '@wordpress/e2e-test-utils': ^4.16.1 - config: 3.3.3 eslint: ^8.1.0 faker: ^5.1.0 fishery: ^1.2.0 @@ -203,7 +200,6 @@ importers: '@automattic/puppeteer-utils': github.com/Automattic/puppeteer-utils/0f3ec50 '@wordpress/deprecated': 3.2.3 '@wordpress/e2e-test-utils': 4.16.1_jest@27.3.1 - config: 3.3.3 faker: 5.5.3 fishery: 1.4.0 devDependencies: @@ -7549,6 +7545,7 @@ packages: engines: {node: '>= 6.0.0'} dependencies: json5: 2.2.0 + dev: true /config/3.3.6: resolution: {integrity: sha512-Hj5916C5HFawjYJat1epbyY2PlAgLpBtDUlr0MxGLgo3p5+7kylyvnRY18PqJHgnNWXcdd0eWDemT7eYWuFgwg==} From 7284163ce5855836c37949ff5b7e5b865c9b6d12 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 3 Jan 2022 17:40:43 -0500 Subject: [PATCH 16/19] Added @woocommerce/e2e-environment peer dependency Also removed config as a dependency --- packages/js/e2e-utils/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/js/e2e-utils/package.json b/packages/js/e2e-utils/package.json index 9ab299798d2..891c3d52630 100644 --- a/packages/js/e2e-utils/package.json +++ b/packages/js/e2e-utils/package.json @@ -14,7 +14,6 @@ "@automattic/puppeteer-utils": "github:Automattic/puppeteer-utils#0f3ec50", "@wordpress/deprecated": "^3.2.3", "@wordpress/e2e-test-utils": "^4.16.1", - "config": "3.3.3", "faker": "^5.1.0", "fishery": "^1.2.0" }, @@ -35,7 +34,8 @@ "eslint": "^8.1.0" }, "peerDependencies": { - "@woocommerce/api": "^0.2.0" + "@woocommerce/api": "^0.2.0", + "@woocommerce/e2e-environment": "^0.2.3" }, "publishConfig": { "access": "public" From 7ff7b14cb40f9bf341a4fb06d7bf5789e30f710a Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 3 Jan 2022 17:41:46 -0500 Subject: [PATCH 17/19] Required config from @woocommerce/e2e-environment --- .../specs/shopper/front-end-checkout-login-account.test.js | 2 +- .../specs/shopper/front-end-variable-product-updates.test.js | 4 ++-- packages/js/e2e-utils/src/factories.js | 2 +- packages/js/e2e-utils/src/flows/constants.js | 2 +- packages/js/e2e-utils/src/flows/merchant.js | 5 ++--- packages/js/e2e-utils/src/flows/shopper.js | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-checkout-login-account.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-checkout-login-account.test.js index b81d115cd36..33141c6495e 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-checkout-login-account.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-checkout-login-account.test.js @@ -19,7 +19,7 @@ const { beforeAll, } = require( '@jest/globals' ); -const config = require('config'); +const { config } = require( '@woocommerce/e2e-environment' ); const runCheckoutLoginAccountTest = () => { describe('Shopper Checkout Login Account', () => { diff --git a/packages/js/e2e-core-tests/specs/shopper/front-end-variable-product-updates.test.js b/packages/js/e2e-core-tests/specs/shopper/front-end-variable-product-updates.test.js index 8c0ac5a9c5f..bb64ca46c89 100644 --- a/packages/js/e2e-core-tests/specs/shopper/front-end-variable-product-updates.test.js +++ b/packages/js/e2e-core-tests/specs/shopper/front-end-variable-product-updates.test.js @@ -6,7 +6,7 @@ const { shopper, createVariableProduct, } = require( '@woocommerce/e2e-utils' ); -const config = require('config'); +const { config } = require( '@woocommerce/e2e-environment' ); let variablePostIdValue; @@ -100,7 +100,7 @@ const runVariableProductUpdateTest = () => { }); }); - + }; module.exports = runVariableProductUpdateTest; diff --git a/packages/js/e2e-utils/src/factories.js b/packages/js/e2e-utils/src/factories.js index 4ebc5e38041..fb7f080f825 100644 --- a/packages/js/e2e-utils/src/factories.js +++ b/packages/js/e2e-utils/src/factories.js @@ -1,5 +1,5 @@ import { HTTPClientFactory } from '@woocommerce/api'; -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); import { simpleProductFactory } from './factories/simple-product'; import { variableProductFactory } from './factories/variable-product'; import { variationFactory } from './factories/variation'; diff --git a/packages/js/e2e-utils/src/flows/constants.js b/packages/js/e2e-utils/src/flows/constants.js index 118a207bdd6..17010823f52 100644 --- a/packages/js/e2e-utils/src/flows/constants.js +++ b/packages/js/e2e-utils/src/flows/constants.js @@ -1,7 +1,7 @@ /** * External dependencies */ -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); const baseUrl = config.get( 'url' ); /** diff --git a/packages/js/e2e-utils/src/flows/merchant.js b/packages/js/e2e-utils/src/flows/merchant.js index ab880f255de..ec5b2986492 100644 --- a/packages/js/e2e-utils/src/flows/merchant.js +++ b/packages/js/e2e-utils/src/flows/merchant.js @@ -1,7 +1,7 @@ /** * External dependencies */ -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); /** * Internal dependencies @@ -440,10 +440,9 @@ const merchant = { */ collapseAdminMenu: async ( collapse = true ) => { const collapseButton = await page.$( '.folded #collapse-button' ); - if ( ( ! collapseButton ) == collapse ) { + if ( ( ! collapse ) == collapseButton ) { await collapseButton.click(); } - }, }; diff --git a/packages/js/e2e-utils/src/flows/shopper.js b/packages/js/e2e-utils/src/flows/shopper.js index 3f9e2cb43ff..92fbecb291a 100644 --- a/packages/js/e2e-utils/src/flows/shopper.js +++ b/packages/js/e2e-utils/src/flows/shopper.js @@ -2,7 +2,7 @@ * External dependencies */ const { pressKeyWithModifier } = require( '@wordpress/e2e-test-utils' ); -const config = require( 'config' ); +const { config } = require( '@woocommerce/e2e-environment' ); /** * Internal dependencies From b95b3a11df272e33b6d4b8f79685a57628a07228 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 3 Jan 2022 18:11:26 -0500 Subject: [PATCH 18/19] Updated workflow if condition --- .github/workflows/pr-smoke-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index a4a800077ff..1bff56c666e 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -96,7 +96,7 @@ jobs: await script({github, context}) - name: Remove label from pull request. - if: always() + if: always() && ${{ contains(github.event.label.name, format( 'run{0} smoke tests', ':') ) }} uses: actions-ecosystem/action-remove-labels@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} From f16ee73f9872c0ae859c7c1bd338d237498c482e Mon Sep 17 00:00:00 2001 From: jamelreid Date: Mon, 3 Jan 2022 18:21:26 -0500 Subject: [PATCH 19/19] Updated CHANGELOG.md --- packages/js/e2e-core-tests/CHANGELOG.md | 4 ++++ packages/js/e2e-utils/CHANGELOG.md | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/packages/js/e2e-core-tests/CHANGELOG.md b/packages/js/e2e-core-tests/CHANGELOG.md index 03eebaf6d20..2fac1ad36d4 100644 --- a/packages/js/e2e-core-tests/CHANGELOG.md +++ b/packages/js/e2e-core-tests/CHANGELOG.md @@ -1,5 +1,9 @@ # Unreleased +## Changes + +- Removed the node-config dependency + ## Added - A `specs/data` folder to store page element data. diff --git a/packages/js/e2e-utils/CHANGELOG.md b/packages/js/e2e-utils/CHANGELOG.md index d5f40537e1c..490cf0e5cde 100644 --- a/packages/js/e2e-utils/CHANGELOG.md +++ b/packages/js/e2e-utils/CHANGELOG.md @@ -1,4 +1,9 @@ # Unreleased +## Changes + +- Removed node-config dependency +- Added @woocommerce/e2e-environment peerDependency +- Updated the package to use the custom node-config object from @woocommerce/e2e-environment ## Fixed