File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " testcafe-angular-selectors" ,
3- "version" : " 0.3.0 " ,
3+ "version" : " 0.3.1 " ,
44 "description" : " Angular selectors for TestCafe" ,
55 "author" : {
66 "name" : " Developer Express Inc." ,
6666 ],
6767 "peerDependencies" : {
6868 "testcafe" : " >=0.18.0"
69- }
69+ },
70+ "types" : " ./ts-defs/index.d.ts"
7071}
Original file line number Diff line number Diff line change 1+ import { Selector , ClientFunction } from 'testcafe' ;
2+
3+ interface Dictionary {
4+ [ name : string ] : any ;
5+ }
6+
7+ export type State = object | Dictionary ;
8+
9+ export type AngularComponent <
10+ S extends State = { } ,
11+ > = {
12+ state : S ,
13+ } ;
14+
15+ type DefaultAngularComponent = AngularComponent < State > ;
16+
17+ declare global {
18+ type AngularComponent <
19+ S extends State = { } ,
20+ > = {
21+ state : S ,
22+ } ;
23+ interface Selector {
24+ getAngular < C extends DefaultAngularComponent = DefaultAngularComponent > ( ) : Promise < C > ;
25+ getAngular < C extends DefaultAngularComponent = DefaultAngularComponent , T = any > ( filter ?: ( angularInternal : C ) => T ) : Promise < T > ;
26+ }
27+ }
28+
29+ export function waitForAngular ( timeout ?: number ) : Promise < void > ;
30+
31+ export function AngularSelector ( selector : string ) : Selector ;
32+ export function AngularSelector ( ) : Selector ;
33+
34+ export namespace AngularJSSelector {
35+ function byModel ( model : string , parentSelector ?: Selector ) : Selector ;
36+ function byBinding ( binding : string , parentSelector ?: Selector ) : Selector ;
37+ function byExactBinding ( exactBinding : string , parentSelector ?: Selector ) : Selector ;
38+ function byOptions ( options : string , parentSelector ?: Selector ) : Selector ;
39+ function byRepeater ( repeater : string , parentSelector ?: Selector ) : Selector ;
40+ function byExactRepeater ( exactRepeater : string , parentSelector ?: Selector ) : Selector ;
41+ }
You can’t perform that action at this time.
0 commit comments