Skip to content

Commit 969b984

Browse files
committed
PRO-18741 feat: add clearHover action
1 parent 349cbda commit 969b984

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

src/actions/clearHover.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {LogEventType} from '../constants/internal';
2+
import {step} from '../step';
3+
import {getPlaywrightPage} from '../useContext';
4+
5+
/**
6+
* Clears hover from all elements.
7+
*/
8+
export const clearHover = (): Promise<void> =>
9+
step(
10+
'Clear hover from all elements',
11+
async () => {
12+
const page = getPlaywrightPage();
13+
14+
await page.mouse.move(0, 0);
15+
},
16+
{type: LogEventType.Action},
17+
);

src/actions/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export {
77
export {blur} from './blur';
88
export {check} from './check';
99
export {clearCookies} from './clearCookies';
10+
export {clearHover} from './clearHover';
1011
export {clearInput} from './clearInput';
1112
export {click} from './click';
1213
export {dispatchEvent} from './dispatchEvent';

0 commit comments

Comments
 (0)