reset settings before cart, checkout tests

This commit is contained in:
Ron Rennick 2021-08-11 15:04:34 -03:00
parent a361e5420a
commit 426763159e
2 changed files with 8 additions and 2 deletions

View File

@ -1,9 +1,9 @@
/* eslint-disable jest/no-export, jest/no-disabled-tests, jest/expect-expect */
/** /**
* Internal dependencies * Internal dependencies
*/ */
const { const {
shopper, shopper,
withRestApi,
createSimpleProduct, createSimpleProduct,
uiUnblocked uiUnblocked
} = require( '@woocommerce/e2e-utils' ); } = require( '@woocommerce/e2e-utils' );
@ -26,6 +26,9 @@ const runCartPageTest = () => {
describe('Cart page', () => { describe('Cart page', () => {
beforeAll(async () => { beforeAll(async () => {
await createSimpleProduct(); await createSimpleProduct();
await withRestApi.resetSettingsGroupToDefault('general');
await withRestApi.resetSettingsGroupToDefault('products');
await withRestApi.resetSettingsGroupToDefault('tax');
}); });
it('should display no item in the cart', async () => { it('should display no item in the cart', async () => {

View File

@ -1,10 +1,10 @@
/* eslint-disable jest/no-export, jest/no-disabled-tests, jest/expect-expect, jest/no-standalone-expect */
/** /**
* Internal dependencies * Internal dependencies
*/ */
const { const {
shopper, shopper,
merchant, merchant,
withRestApi,
createSimpleProduct, createSimpleProduct,
setCheckbox, setCheckbox,
settingsPageSaveChanges, settingsPageSaveChanges,
@ -28,6 +28,9 @@ const runCheckoutPageTest = () => {
describe('Checkout page', () => { describe('Checkout page', () => {
beforeAll(async () => { beforeAll(async () => {
await createSimpleProduct(); await createSimpleProduct();
await withRestApi.resetSettingsGroupToDefault('general');
await withRestApi.resetSettingsGroupToDefault('products');
await withRestApi.resetSettingsGroupToDefault('tax');
// Set free shipping within California // Set free shipping within California
await merchant.login(); await merchant.login();