Merge pull request #29763 from woocommerce/e2e/remove-unused-product-import

remove unused product import function from jest setup script
This commit is contained in:
Greg 2021-04-29 11:58:27 -06:00 committed by GitHub
commit c47009c8f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.