From 426763159eaf900ce34eef719f335b06c1ccd6a6 Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Wed, 11 Aug 2021 15:04:34 -0300 Subject: [PATCH] reset settings before cart, checkout tests --- tests/e2e/core-tests/specs/shopper/front-end-cart.test.js | 5 ++++- .../e2e/core-tests/specs/shopper/front-end-checkout.test.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/e2e/core-tests/specs/shopper/front-end-cart.test.js b/tests/e2e/core-tests/specs/shopper/front-end-cart.test.js index e9bc8c8445c..c11636fa68d 100644 --- a/tests/e2e/core-tests/specs/shopper/front-end-cart.test.js +++ b/tests/e2e/core-tests/specs/shopper/front-end-cart.test.js @@ -1,9 +1,9 @@ -/* eslint-disable jest/no-export, jest/no-disabled-tests, jest/expect-expect */ /** * Internal dependencies */ const { shopper, + withRestApi, createSimpleProduct, uiUnblocked } = require( '@woocommerce/e2e-utils' ); @@ -26,6 +26,9 @@ const runCartPageTest = () => { describe('Cart page', () => { beforeAll(async () => { await createSimpleProduct(); + await withRestApi.resetSettingsGroupToDefault('general'); + await withRestApi.resetSettingsGroupToDefault('products'); + await withRestApi.resetSettingsGroupToDefault('tax'); }); it('should display no item in the cart', async () => { diff --git a/tests/e2e/core-tests/specs/shopper/front-end-checkout.test.js b/tests/e2e/core-tests/specs/shopper/front-end-checkout.test.js index 812d7385d25..fb73d94b565 100644 --- a/tests/e2e/core-tests/specs/shopper/front-end-checkout.test.js +++ b/tests/e2e/core-tests/specs/shopper/front-end-checkout.test.js @@ -1,10 +1,10 @@ -/* eslint-disable jest/no-export, jest/no-disabled-tests, jest/expect-expect, jest/no-standalone-expect */ /** * Internal dependencies */ const { shopper, merchant, + withRestApi, createSimpleProduct, setCheckbox, settingsPageSaveChanges, @@ -28,6 +28,9 @@ const runCheckoutPageTest = () => { describe('Checkout page', () => { beforeAll(async () => { await createSimpleProduct(); + await withRestApi.resetSettingsGroupToDefault('general'); + await withRestApi.resetSettingsGroupToDefault('products'); + await withRestApi.resetSettingsGroupToDefault('tax'); // Set free shipping within California await merchant.login();