Skip to content

Commit

Permalink
fix tabBar tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Bradley committed Feb 20, 2014
1 parent d5c4860 commit a0492f3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions js/ext/angular/test/directive/ionicTabBar.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ describe('tabs', function() {

it('Default icon works', function() {
scope.$digest();
var i = element[0].querySelectorAll('i')[1];
expect(angular.element(i).hasClass('icon-default')).toEqual(true);
var span = element[0].querySelectorAll('span')[1];
expect(angular.element(span).hasClass('icon-default')).toEqual(true);
});

it('Badge works', function() {
Expand All @@ -215,8 +215,8 @@ describe('tabs', function() {
it('Badge updates', function() {
scope.badgeValue = 10;
scope.$digest();
var i = element[0].querySelectorAll('i')[0];
expect(i.innerHTML).toEqual('10');
var span = element[0].querySelectorAll('span')[0];
expect(span.innerHTML).toEqual('10');
});

it('Click sets correct tab index', function() {
Expand Down Expand Up @@ -266,7 +266,10 @@ describe('tabs', function() {
}));

it('Icon title works as html', function() {
expect(element.find('a').find('span').html()).toEqual('Icon <b>title</b>');
var a = element.find('a');
var spans = a.find('span');
var lastSpan = spans.eq(spans.length - 1);
expect(lastSpan.html()).toEqual('Icon <b>title</b>');
});

it('Icon classes works', function() {
Expand Down

0 comments on commit a0492f3

Please sign in to comment.