diff --git a/tests/e2e/core-tests/specs/index.js b/tests/e2e/core-tests/specs/index.js index 6ebeeb6e3ee..b496bc0d5ed 100644 --- a/tests/e2e/core-tests/specs/index.js +++ b/tests/e2e/core-tests/specs/index.js @@ -19,6 +19,7 @@ const runSingleProductPageTest = require( './shopper/front-end-single-product.te const runVariableProductUpdateTest = require( './shopper/front-end-variable-product-updates.test' ); // Merchant tests +const runOrderSearchingTest = require( './merchant/wp-admin-order-searching.test' ); const runCreateCouponTest = require( './merchant/wp-admin-coupon-new.test' ); const runCreateOrderTest = require( './merchant/wp-admin-order-new.test' ); const runEditOrderTest = require( './merchant/wp-admin-order-edit.test' ); @@ -32,7 +33,6 @@ const runOrderApplyCouponTest = require( './merchant/wp-admin-order-apply-coupon const runProductEditDetailsTest = require( './merchant/wp-admin-product-edit-details.test' ); const runProductSearchTest = require( './merchant/wp-admin-product-search.test' ); const runMerchantOrdersCustomerPaymentPage = require( './merchant/wp-admin-order-customer-payment-page.test' ); -const runOrderSearchingTest = require( './merchant/wp-admin-order-searching.test' ); // REST API tests const runExternalProductAPITest = require( './api/external-product.test' ); diff --git a/tests/e2e/core-tests/specs/merchant/wp-admin-order-searching.test.js b/tests/e2e/core-tests/specs/merchant/wp-admin-order-searching.test.js index 3106665c526..0d270057952 100644 --- a/tests/e2e/core-tests/specs/merchant/wp-admin-order-searching.test.js +++ b/tests/e2e/core-tests/specs/merchant/wp-admin-order-searching.test.js @@ -28,7 +28,6 @@ const runOrderSearchingTest = () => { await page.select('#order_status', 'Pending payment'); await page.waitForSelector('#customer_user'); await page.click('#customer_user'); - await page.waitForSelector('input.select2-search__field'); await selectOptionInSelect2('Customer', 'input.select2-search__field'); // Change the shipping data @@ -39,17 +38,15 @@ const runOrderSearchingTest = () => { await clearAndFillInput('#_shipping_address_2', 'Linwood Ave'); await clearAndFillInput('#_shipping_city', 'Buffalo'); await clearAndFillInput('#_shipping_postcode', '14201'); - await page.waitFor(1000); // to avoid flakiness await page.keyboard.press('Tab'); - await page.waitFor(1000); // to avoid flakiness await page.keyboard.press('Tab'); - await page.waitFor(1000); // to avoid flakiness await page.keyboard.press('Enter'); - await page.waitFor(1000); // to avoid flakiness await selectOptionInSelect2('New York', 'input.select2-search__field'); // Save new order + await page.waitFor(1000); // to avoid flakiness await page.click('button.save_order'); + await page.waitFor(2000); // to avoid flakiness await page.waitForSelector('#message'); // Get the post id