Merge pull request #30481 from woocommerce/e2e/add-test-resets
reset settings before cart, checkout tests
This commit is contained in:
commit
595aca9e59
|
@ -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 () => {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue