Update test and util

This commit is contained in:
Veljko 2021-03-05 09:07:23 +01:00
parent 26be0bf713
commit b2a395c918
2 changed files with 3 additions and 2 deletions

View File

@ -36,8 +36,7 @@ const runOrderSearchingTest = () => {
await clearAndFillInput('#_shipping_city', 'Buffalo');
await clearAndFillInput('#_shipping_postcode', '14201');
await page.waitFor(1000); // to avoid flakiness
await page.click('#select2-_shipping_state-container');
await selectOptionInSelect2('New York');
await page.select('#_shipping_state', 'NY');
// Save new order
await page.click('button.save_order');

View File

@ -11,7 +11,9 @@ import { pressKeyWithModifier } from '@wordpress/e2e-test-utils';
*/
const clearAndFillInput = async ( selector, value ) => {
await page.focus( selector );
await page.waitFor(2000); // avoiding flakiness
await pressKeyWithModifier( 'primary', 'a' );
await page.waitFor(2000); // avoiding flakiness
await page.type( selector, value );
};