File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
packages/browser-webdriverio/src/commands Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import type { UserEventCommand } from './utils'
44export const click : UserEventCommand < UserEvent [ 'click' ] > = async (
55 context ,
66 selector ,
7- options = { } ,
7+ options ,
88) => {
99 const browser = context . browser
10- await browser . $ ( selector ) . click ( options as any )
10+ await browser . $ ( selector ) . click ( options )
1111}
1212
1313export const dblClick : UserEventCommand < UserEvent [ 'dblClick' ] > = async (
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ describe('userEvent.click', () => {
2929
3030 expect ( onClick ) . toHaveBeenCalled ( )
3131 expect ( dblClick ) . not . toHaveBeenCalled ( )
32+
33+ onClick . mockClear ( )
34+ await userEvent . click ( button , { button : 'right' } )
35+ expect ( onClick ) . toHaveBeenCalled ( )
3236 } )
3337
3438 test ( 'correctly doesn\'t click on a disabled button' , async ( ) => {
You can’t perform that action at this time.
0 commit comments