File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,12 @@ export class ProtractorElement implements TestElement {
80
80
return this . element . clear ( ) ;
81
81
}
82
82
83
- async click ( ...args : [ 'center' ] | [ number , number ] ) : Promise < void > {
83
+ async click ( ...args : [ location : 'center' ] | [ relativeX : number , relativeY : number ] ) :
84
+ Promise < void > {
84
85
// Omitting the offset argument to mouseMove results in clicking the center.
85
86
// This is the default behavior we want, so we use an empty array of offsetArgs if no args are
86
87
// passed to this method.
87
- const offsetArgs = args . length == 2 ? [ { x : args [ 0 ] , y : args [ 1 ] } ] : [ ] ;
88
+ const offsetArgs = args . length === 2 ? [ { x : args [ 0 ] , y : args [ 1 ] } ] : [ ] ;
88
89
89
90
await browser . actions ( )
90
91
. mouseMove ( await this . element . getWebElement ( ) , ...offsetArgs )
Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ export class UnitTestElement implements TestElement {
78
78
await this . _stabilize ( ) ;
79
79
}
80
80
81
- async click ( ...args : [ 'center' ] | [ number , number ] ) : Promise < void > {
81
+ async click ( ...args : [ location : 'center' ] | [ relativeX : number , relativeY : number ] ) :
82
+ Promise < void > {
82
83
let clientX : number | undefined = undefined ;
83
84
let clientY : number | undefined = undefined ;
84
85
if ( args . length ) {
You can’t perform that action at this time.
0 commit comments