File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/material-experimental/mdc-button/testing Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,18 @@ export class MatButtonHarness extends ComponentHarness {
37
37
( harness , text ) => HarnessPredicate . stringMatches ( harness . getText ( ) , text ) ) ;
38
38
}
39
39
40
+ /**
41
+ * Clicks the button at the given position relative to its top-left.
42
+ * @param relativeX The relative x position of the click.
43
+ * @param relativeY The relative y position of the click.
44
+ */
45
+ click ( relativeX : number , relativeY : number ) : Promise < void > ;
46
+ /** Clicks the button at its center. */
47
+ click ( location : 'center' ) : Promise < void > ;
40
48
/** Clicks the button. */
41
- async click ( ) : Promise < void > {
42
- return ( await this . host ( ) ) . click ( ) ;
49
+ click ( ) : Promise < void > ;
50
+ async click ( ...args : [ 'center' ] | [ number , number ] ) : Promise < void > {
51
+ return ( await this . host ( ) ) . click ( ...( args as [ any ] ) ) ;
43
52
}
44
53
45
54
/** Gets a boolean promise indicating if the button is disabled. */
You can’t perform that action at this time.
0 commit comments