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 () => {
|
const setMaxPrice = async () => {
|
||||||
await page.waitForSelector( selectors.frontend.priceMaxAmount );
|
await page.waitForSelector( selectors.frontend.priceMaxAmount );
|
||||||
await page.focus( selectors.frontend.priceMaxAmount );
|
await page.focus( selectors.frontend.priceMaxAmount );
|
||||||
await page.$eval(
|
await page.keyboard.down( 'Shift' );
|
||||||
selectors.frontend.priceMaxAmount,
|
await page.keyboard.press( 'Home' );
|
||||||
( el ) => ( ( el as HTMLInputElement ).value = '' )
|
await page.keyboard.up( 'Shift' );
|
||||||
);
|
await page.keyboard.press( 'Backspace' );
|
||||||
await page.keyboard.type( '1.99' );
|
await page.keyboard.type( '1.99' );
|
||||||
await page.keyboard.press( 'Tab' );
|
await page.keyboard.press( 'Tab' );
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue