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 401f5d02055..6eb84759d01 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 @@ -24,10 +24,8 @@ const runOrderSearchingTest = () => { // Create new order for testing await merchant.openNewOrder(), await page.waitForSelector('#order_status'), - await page.select('#order_status', 'Pending payment'), - await page.waitForSelector('#customer_user'), await page.click('#customer_user'), - await selectOptionInSelect2('Customer', 'input.select2-search__field'), + await selectOptionInSelect2('Customer'), ]); await Promise.all([ @@ -43,7 +41,7 @@ const runOrderSearchingTest = () => { await page.keyboard.press('Tab'), await page.keyboard.press('Tab'), await page.keyboard.press('Enter'), - await selectOptionInSelect2('New York', 'input.select2-search__field'), + await selectOptionInSelect2('New York'), ]); // Get the post id diff --git a/tests/e2e/utils/src/page-utils.js b/tests/e2e/utils/src/page-utils.js index 9b7dabd276c..ffa22bd0680 100644 --- a/tests/e2e/utils/src/page-utils.js +++ b/tests/e2e/utils/src/page-utils.js @@ -206,7 +206,7 @@ const evalAndClick = async ( selector ) => { const selectOptionInSelect2 = async ( value, selector = 'input.select2-search__field' ) => { await page.waitForSelector(selector); await page.type(selector, value); - await page.waitFor(2000); // to avoid flakyness, must wait before pressing Enter + await page.waitFor(3000); // to avoid flakyness, must wait before pressing Enter await page.keyboard.press('Enter'); };