diff --git a/js/ext/angular/test/directive/ionicList.unit.js b/js/ext/angular/test/directive/ionicList.unit.js index ed0a644e91..5b1a02076f 100644 --- a/js/ext/angular/test/directive/ionicList.unit.js +++ b/js/ext/angular/test/directive/ionicList.unit.js @@ -365,35 +365,3 @@ describe('Ionic Item Directive', function () { }); -describe('Ionic Link Item Directive', function () { - var $rootScope, $compile, listCtrl, options, listScope, itemScope, listElement, itemElement; - - beforeEach(module('ionic.ui.list')); - - beforeEach(inject(function (_$compile_, _$rootScope_) { - $rootScope = _$rootScope_; - $compile = _$compile_; - - listElement = angular.element(''); - listElement = _$compile_(listElement)($rootScope); - listScope = listElement.isolateScope(); - - listCtrl = listElement.controller('list'); - - itemElement = angular.element('').appendTo(listElement); - itemElement = _$compile_(itemElement)($rootScope); - - $rootScope.$digest(); - itemScope = itemElement.isolateScope(); - })); - - it('Should set link-item href', inject(function ($timeout) { - itemElement = angular.element('').appendTo(listElement); - itemElement = $compile(itemElement)($rootScope); - $rootScope.$digest(); - itemScope = itemElement.isolateScope(); - expect(itemScope.href).toBe("http://drifty.com/"); - expect(itemElement.attr('href')).toBe("http://drifty.com/"); - })); - -}); diff --git a/js/ext/angular/test/pullToRefresh.html b/js/ext/angular/test/pullToRefresh.html index 40f733e201..5608c13ffd 100644 --- a/js/ext/angular/test/pullToRefresh.html +++ b/js/ext/angular/test/pullToRefresh.html @@ -58,16 +58,16 @@ + on-refresh="refreshItems()"> - + + item="item"> Item: {{ item.text }} diff --git a/js/ext/angular/test/tabs.html b/js/ext/angular/test/tabs.html index e5f4cc6921..0098b4456e 100644 --- a/js/ext/angular/test/tabs.html +++ b/js/ext/angular/test/tabs.html @@ -61,25 +61,29 @@
- +

Tasks

- +
- + + + + item="item" + ng-class="{completed: item.isCompleted}"> {{item.title}} - @@ -102,14 +106,7 @@

Settings

- -
-

Settings

-
- -

Settings

-
-
+

Settings

@@ -149,7 +146,6 @@ .controller('HomeCtrl', function($scope, $timeout, Modal, ActionSheet) { - $scope.items = []; Modal.fromTemplateUrl('newTask.html', function(modal) { $scope.settingsModal = modal; @@ -182,6 +178,7 @@ console.log('ON REFRESH'); $timeout(function() { + buildMockData(); $scope.$broadcast('scroll.refreshComplete'); }, 1000); } @@ -195,21 +192,16 @@ $scope.settingsModal.show(); }; - // Create the items - for(var i = 0; i < 25; i++) { - $scope.items.push({ - title: 'Task ' + (i + 1), - buttons: [{ - text: 'Done', - type: 'button-success', - onButtonClicked: completeItem, - }, { - text: 'Delete', - type: 'button-danger', - onButtonClicked: removeItem, - }] - }); + function buildMockData() { + // Create the items + $scope.items = []; + for(var i = 0; i < 25; i++) { + $scope.items.push({ + title: 'Task ' + (i + 1) + }); + } } + buildMockData(); })