File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
module ( "tooltip: core" ) ;
4
4
5
+ test ( "markup structure" , function ( ) {
6
+ expect ( 6 ) ;
7
+ var element = $ ( "#tooltipped1" ) . tooltip ( ) ,
8
+ tooltip = $ ( ".ui-tooltip" ) ;
5
9
10
+ equal ( element . attr ( "aria-describedby" ) , undefined , "no aria-describedby on init" ) ;
11
+ equal ( tooltip . length , 0 , "no tooltip on init" ) ;
12
+
13
+ element . tooltip ( "open" ) ;
14
+ tooltip = $ ( "#" + element . attr ( "aria-describedby" ) ) ;
15
+ equal ( tooltip . length , 1 , "tooltip exists" ) ;
16
+ ok ( tooltip . hasClass ( "ui-tooltip" ) , "tooltip is .ui-tooltip" ) ;
17
+ equal ( tooltip . length , 1 , ".ui-tooltip exists" ) ;
18
+ equal ( tooltip . find ( ".ui-tooltip-content" ) . length , 1 ,
19
+ ".ui-tooltip-content exists" ) ;
20
+ } ) ;
21
+
22
+ test ( "accessibility" , function ( ) {
23
+ // TODO: add tests
24
+ } ) ;
6
25
7
26
} ( jQuery ) ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ test( "items", function() {
16
16
} ) ;
17
17
18
18
test ( "content: default" , function ( ) {
19
- var element = $ ( "#tooltipped1" ) . tooltip ( ) . tooltip ( "open" ) ;
19
+ var element = $ ( "#tooltipped1" ) . tooltip ( ) . tooltip ( "open" ) ;
20
20
same ( $ ( "#" + element . attr ( "aria-describedby" ) ) . text ( ) , "anchortitle" ) ;
21
21
} ) ;
22
22
You can’t perform that action at this time.
0 commit comments