Update test and util
This commit is contained in:
parent
26be0bf713
commit
b2a395c918
|
@ -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');
|
||||
|
|
|
@ -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 );
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue