Fix: flaky tests related to setMaxPrice (https://github.com/woocommerce/woocommerce-blocks/pull/6856)
This commit is contained in:
parent
c252e7a907
commit
fcedd5174f
|
@ -52,10 +52,10 @@ const goToShopPage = () =>
|
|||
const setMaxPrice = async () => {
|
||||
await page.waitForSelector( selectors.frontend.priceMaxAmount );
|
||||
await page.focus( selectors.frontend.priceMaxAmount );
|
||||
await page.$eval(
|
||||
selectors.frontend.priceMaxAmount,
|
||||
( el ) => ( ( el as HTMLInputElement ).value = '' )
|
||||
);
|
||||
await page.keyboard.down( 'Shift' );
|
||||
await page.keyboard.press( 'Home' );
|
||||
await page.keyboard.up( 'Shift' );
|
||||
await page.keyboard.press( 'Backspace' );
|
||||
await page.keyboard.type( '1.99' );
|
||||
await page.keyboard.press( 'Tab' );
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue