remove unused product import function from jest setup script

This commit is contained in:
Ron Rennick 2021-04-26 10:41:46 -03:00
parent aab56d84e0
commit 2511fce3a7
1 changed files with 0 additions and 31 deletions

View File

@ -51,37 +51,6 @@ async function setupBrowser() {
await setBrowserViewport( 'large' );
}
/**
* Navigates to woocommerce import page and imports sample products.
*
* @return {Promise} Promise resolving once products have been imported.
*/
async function importSampleProducts() {
await switchUserToAdmin();
// Visit Import Products page.
await visitAdminPage(
'edit.php',
'post_type=product&page=product_importer'
);
await page.click( 'a.woocommerce-importer-toggle-advanced-options' );
await page.focus( '#woocommerce-importer-file-url' );
// local path for sample data that is included with woo.
await page.keyboard.type(
'wp-content/plugins/woocommerce/sample-data/sample_products.csv'
);
await page.click( '.wc-actions .button-next' );
await page.waitForSelector( '.wc-importer-mapping-table' );
await page.select(
'.wc-importer-mapping-table tr:nth-child(29) select',
''
);
await page.click( '.wc-actions .button-next' );
await page.waitForXPath(
"//*[@class='woocommerce-importer-done' and contains(., 'Import complete! ')]"
);
await switchUserToTest();
}
/**
* Adds an event listener to the page to handle additions of page event
* handlers, to assure that they are removed at test teardown.