@@ -61,10 +61,10 @@ describe('tabs', function() {
6161 it ( 'should create clickable titles' , function ( ) {
6262 var t = titles ( ) ;
6363 expect ( t . length ) . toBe ( 2 ) ;
64- expect ( t . find ( 'a ' ) . eq ( 0 ) . text ( ) ) . toBe ( 'First Tab 1' ) ;
64+ expect ( t . find ( '> div ' ) . eq ( 0 ) . text ( ) ) . toBe ( 'First Tab 1' ) ;
6565 //It should put the uib-tab-heading element into the 'a' title
66- expect ( t . find ( 'a ' ) . eq ( 1 ) . children ( ) . is ( 'uib-tab-heading' ) ) . toBe ( true ) ;
67- expect ( t . find ( 'a ' ) . eq ( 1 ) . children ( ) . html ( ) ) . toBe ( '<b>Second</b> Tab 2' ) ;
66+ expect ( t . find ( '> div ' ) . eq ( 1 ) . children ( ) . is ( 'uib-tab-heading' ) ) . toBe ( true ) ;
67+ expect ( t . find ( '> div ' ) . eq ( 1 ) . children ( ) . html ( ) ) . toBe ( '<b>Second</b> Tab 2' ) ;
6868 } ) ;
6969
7070 it ( 'should bind tabs content and set first tab active' , function ( ) {
@@ -76,7 +76,7 @@ describe('tabs', function() {
7676 } ) ;
7777
7878 it ( 'should change active on click' , function ( ) {
79- titles ( ) . eq ( 1 ) . find ( 'a ' ) . click ( ) ;
79+ titles ( ) . eq ( 1 ) . find ( '> div ' ) . click ( ) ;
8080 expect ( contents ( ) . eq ( 1 ) ) . toHaveClass ( 'active' ) ;
8181 expect ( titles ( ) . eq ( 0 ) ) . not . toHaveClass ( 'active' ) ;
8282 expect ( titles ( ) . eq ( 1 ) ) . toHaveClass ( 'active' ) ;
@@ -85,17 +85,17 @@ describe('tabs', function() {
8585 } ) ;
8686
8787 it ( 'should call select callback on select' , function ( ) {
88- titles ( ) . eq ( 1 ) . find ( 'a ' ) . click ( ) ;
88+ titles ( ) . eq ( 1 ) . find ( '> div ' ) . click ( ) ;
8989 expect ( scope . selectSecond ) . toHaveBeenCalled ( ) ;
90- titles ( ) . eq ( 0 ) . find ( 'a ' ) . click ( ) ;
90+ titles ( ) . eq ( 0 ) . find ( '> div ' ) . click ( ) ;
9191 expect ( scope . selectFirst ) . toHaveBeenCalled ( ) ;
9292 } ) ;
9393
9494 it ( 'should call deselect callback on deselect' , function ( ) {
95- titles ( ) . eq ( 1 ) . find ( 'a ' ) . click ( ) ;
96- titles ( ) . eq ( 0 ) . find ( 'a ' ) . click ( ) ;
95+ titles ( ) . eq ( 1 ) . find ( '> div ' ) . click ( ) ;
96+ titles ( ) . eq ( 0 ) . find ( '> div ' ) . click ( ) ;
9797 expect ( scope . deselectSecond ) . toHaveBeenCalled ( ) ;
98- titles ( ) . eq ( 1 ) . find ( 'a ' ) . click ( ) ;
98+ titles ( ) . eq ( 1 ) . find ( '> div ' ) . click ( ) ;
9999 expect ( scope . deselectFirst ) . toHaveBeenCalled ( ) ;
100100 } ) ;
101101 } ) ;
@@ -181,13 +181,13 @@ describe('tabs', function() {
181181 execOrder = [ ] ;
182182
183183 // Select second tab
184- titles ( ) . eq ( 1 ) . find ( 'a ' ) . click ( ) ;
184+ titles ( ) . eq ( 1 ) . find ( '> div ' ) . click ( ) ;
185185 expect ( execOrder ) . toEqual ( [ 'deselect1' , 'select2' ] ) ;
186186
187187 execOrder = [ ] ;
188188
189189 // Select again first tab
190- titles ( ) . eq ( 0 ) . find ( 'a ' ) . click ( ) ;
190+ titles ( ) . eq ( 0 ) . find ( '> div ' ) . click ( ) ;
191191 expect ( execOrder ) . toEqual ( [ 'deselect2' , 'select1' ] ) ;
192192 } ) ;
193193 } ) ;
@@ -250,7 +250,7 @@ describe('tabs', function() {
250250 } ) ;
251251
252252 it ( 'should switch active when clicking' , function ( ) {
253- titles ( ) . eq ( 3 ) . find ( 'a ' ) . click ( ) ;
253+ titles ( ) . eq ( 3 ) . find ( '> div ' ) . click ( ) ;
254254 expectTabActive ( scope . tabs [ 3 ] ) ;
255255 } ) ;
256256
@@ -317,7 +317,7 @@ describe('tabs', function() {
317317 } ) ) ;
318318
319319 function heading ( ) {
320- return elm . find ( 'ul li a ' ) . children ( ) ;
320+ return elm . find ( 'ul li > div ' ) . children ( ) ;
321321 }
322322
323323 it ( 'should create a heading bound to myHtml' , function ( ) {
@@ -379,7 +379,7 @@ describe('tabs', function() {
379379
380380 it ( 'should preserve correct ordering' , function ( ) {
381381 function titles ( ) {
382- return elm . find ( 'ul.nav-tabs li a ' ) ;
382+ return elm . find ( 'ul.nav-tabs li > div ' ) ;
383383 }
384384 scope . $apply ( ) ;
385385 expect ( titles ( ) . length ) . toBe ( 9 ) ;
@@ -522,7 +522,7 @@ describe('tabs', function() {
522522 expectContents ( [ 'Hello' , 'content 1' , 'content 2' , 'content 3' ] ) ;
523523
524524 // Select last tab
525- titles ( ) . find ( 'a ' ) . eq ( 3 ) . click ( ) ;
525+ titles ( ) . find ( '> div ' ) . eq ( 3 ) . click ( ) ;
526526 expect ( contents ( ) . eq ( 3 ) ) . toHaveClass ( 'active' ) ;
527527 expect ( titles ( ) . eq ( 3 ) ) . toHaveClass ( 'active' ) ;
528528
@@ -536,7 +536,7 @@ describe('tabs', function() {
536536 expect ( contents ( ) . eq ( 2 ) ) . toHaveClass ( 'active' ) ;
537537
538538 // Select 2nd tab ("tab 1")
539- titles ( ) . find ( 'a ' ) . eq ( 1 ) . click ( ) ;
539+ titles ( ) . find ( '> div ' ) . eq ( 1 ) . click ( ) ;
540540 expect ( titles ( ) . eq ( 1 ) ) . toHaveClass ( 'active' ) ;
541541 expect ( contents ( ) . eq ( 1 ) ) . toHaveClass ( 'active' ) ;
542542
@@ -632,10 +632,10 @@ describe('tabs', function() {
632632 }
633633
634634 it ( 'should not switch active when clicking on title' , function ( ) {
635- titles ( ) . eq ( 2 ) . find ( 'a ' ) . click ( ) ;
635+ titles ( ) . eq ( 2 ) . find ( '> div ' ) . click ( ) ;
636636 expectTabActive ( scope . tabs [ 2 ] ) ;
637637
638- titles ( ) . eq ( 3 ) . find ( 'a ' ) . click ( ) ;
638+ titles ( ) . eq ( 3 ) . find ( '> div ' ) . click ( ) ;
639639 expectTabActive ( scope . tabs [ 2 ] ) ;
640640 } ) ;
641641
0 commit comments