Add file missing from merge

This commit is contained in:
Greg 2021-10-29 15:33:37 -06:00
parent a28840b1d9
commit e45c270a51
1 changed files with 10 additions and 4 deletions

View File

@ -12,7 +12,7 @@ const getCoreTestsRoot = require( '../../core-tests-root' );
/**
* External dependencies
*/
const { it, describe, beforeAll } = require( '@jest/globals' );
const { it, describe, beforeAll, afterAll } = require( '@jest/globals' );
const path = require( 'path' );
const coreTestsPath = getCoreTestsRoot();
@ -103,6 +103,15 @@ const runImportProductsTest = () => {
await merchant.openAllProductsView();
await merchant.openImportProducts();
} );
afterAll(async () => {
// Delete imported products
await withRestApi.deleteAllProducts();
await withRestApi.deleteAllProductAttributes();
await withRestApi.deleteAllProductCategories();
await withRestApi.deleteAllProductTags();
});
it( 'should show error message if you go without providing CSV file', async () => {
// Verify the error message if you go without providing CSV file
await Promise.all( [
@ -212,9 +221,6 @@ const runImportProductsTest = () => {
expect( productPrices.sort() ).toEqual(
productPricesOverride.sort()
);
// Delete imported products
await withRestApi.deleteAllProducts();
} );
} );
};