diff --git a/tests/e2e/core-tests/specs/index.js b/tests/e2e/core-tests/specs/index.js index b2e1c69c552..87ac5c70668 100644 --- a/tests/e2e/core-tests/specs/index.js +++ b/tests/e2e/core-tests/specs/index.js @@ -64,6 +64,7 @@ const runShopperTests = () => { }; const runMerchantTests = () => { + runImportProductsTest(); runOrderSearchingTest(); runAddNewShippingZoneTest(); runCreateCouponTest(); @@ -80,7 +81,6 @@ const runMerchantTests = () => { runProductEditDetailsTest(); runProductSearchTest(); runMerchantOrdersCustomerPaymentPage(); - runImportProductsTest(); } const runApiTests = () => { diff --git a/tests/e2e/core-tests/specs/merchant/wp-admin-product-import-csv.test.js b/tests/e2e/core-tests/specs/merchant/wp-admin-product-import-csv.test.js index ddff9113284..21db05d46fb 100644 --- a/tests/e2e/core-tests/specs/merchant/wp-admin-product-import-csv.test.js +++ b/tests/e2e/core-tests/specs/merchant/wp-admin-product-import-csv.test.js @@ -4,7 +4,8 @@ */ const { merchant, - setCheckbox + setCheckbox, + moveAllItemsToTrash } = require( '@woocommerce/e2e-utils' ); /** @@ -108,6 +109,17 @@ const runImportProductsTest = () => { // Compare overriden product prices expect(productPrices.sort()).toEqual(productPricesOverride.sort()); }); + + afterAll(async () => { + // Remove all the imported products + await page.waitForSelector('#cb-select-all-1', {visible:true}); + await moveAllItemsToTrash(); + await page.waitForSelector('ul.subsubsub li.trash a', {visible:true}); + await page.click('ul.subsubsub li.trash a'); + await page.waitForSelector('#delete_all', {visible:true}); + await page.click('#delete_all'); + await page.waitForSelector('a.woocommerce-BlankState-cta.button-primary.button ~ a', {visible:true}); + }); }); };