@@ -10,7 +10,7 @@ describe('pager directive', function() {
10
10
$document = _$document_ ;
11
11
$templateCache = _$templateCache_ ;
12
12
body = $document . find ( 'body' ) ;
13
- element = $compile ( '<uib-pager total-items="total" ng-model="currentPage"></uib-pager >' ) ( $rootScope ) ;
13
+ element = $compile ( '<ul uib-pager total-items="total" ng-model="currentPage"></ul >' ) ( $rootScope ) ;
14
14
$rootScope . $digest ( ) ;
15
15
} ) ) ;
16
16
@@ -56,7 +56,7 @@ describe('pager directive', function() {
56
56
it ( 'exposes the controller on the template' , function ( ) {
57
57
$templateCache . put ( 'uib/template/pager/pager.html' , '<div>{{pager.text}}</div>' ) ;
58
58
59
- element = $compile ( '<uib-pager></uib-pager>' ) ( $rootScope ) ;
59
+ element = $compile ( '<ul uib-pager></ul uib-pager>' ) ( $rootScope ) ;
60
60
$rootScope . $digest ( ) ;
61
61
62
62
var ctrl = element . controller ( 'uibPager' ) ;
@@ -65,7 +65,7 @@ describe('pager directive', function() {
65
65
ctrl . text = 'foo' ;
66
66
$rootScope . $digest ( ) ;
67
67
68
- expect ( element . html ( ) ) . toBe ( 'foo' ) ;
68
+ expect ( element . html ( ) ) . toBe ( '<div class="ng-binding"> foo</div> ' ) ;
69
69
} ) ;
70
70
71
71
it ( 'disables the "previous" link if current page is 1' , function ( ) {
@@ -102,7 +102,7 @@ describe('pager directive', function() {
102
102
103
103
it ( 'executes the `ng-change` expression when an element is clicked' , function ( ) {
104
104
$rootScope . selectPageHandler = jasmine . createSpy ( 'selectPageHandler' ) ;
105
- element = $compile ( '<uib-pager total-items="total" ng-model="currentPage" ng-change="selectPageHandler()"></uib-pager >' ) ( $rootScope ) ;
105
+ element = $compile ( '<ul uib-pager total-items="total" ng-model="currentPage" ng-change="selectPageHandler()"></ul >' ) ( $rootScope ) ;
106
106
$rootScope . $digest ( ) ;
107
107
108
108
clickPaginationEl ( - 1 ) ;
@@ -147,16 +147,16 @@ describe('pager directive', function() {
147
147
it ( 'allows custom templates' , function ( ) {
148
148
$templateCache . put ( 'foo/bar.html' , '<div>baz</div>' ) ;
149
149
150
- element = $compile ( '<uib-pager template-url="foo/bar.html"></uib-pager >' ) ( $rootScope ) ;
150
+ element = $compile ( '<ul uib-pager template-url="foo/bar.html"></ul >' ) ( $rootScope ) ;
151
151
$rootScope . $digest ( ) ;
152
152
153
- expect ( element . html ( ) ) . toBe ( 'baz' ) ;
153
+ expect ( element . html ( ) ) . toBe ( '<div> baz</div> ' ) ;
154
154
} ) ;
155
155
156
156
describe ( '`items-per-page`' , function ( ) {
157
157
beforeEach ( function ( ) {
158
158
$rootScope . perpage = 5 ;
159
- element = $compile ( '<uib-pager total-items="total" items-per-page="perpage" ng-model="currentPage"></uib-pager >' ) ( $rootScope ) ;
159
+ element = $compile ( '<ul uib-pager total-items="total" items-per-page="perpage" ng-model="currentPage"></ul >' ) ( $rootScope ) ;
160
160
$rootScope . $digest ( ) ;
161
161
} ) ;
162
162
@@ -190,7 +190,7 @@ describe('pager directive', function() {
190
190
describe ( '`num-pages`' , function ( ) {
191
191
beforeEach ( function ( ) {
192
192
$rootScope . numpg = null ;
193
- element = $compile ( '<uib-pager total-items="total" ng-model="currentPage" num-pages="numpg"></uib-pager >' ) ( $rootScope ) ;
193
+ element = $compile ( '<ul uib-pager total-items="total" ng-model="currentPage" num-pages="numpg"></ul >' ) ( $rootScope ) ;
194
194
$rootScope . $digest ( ) ;
195
195
} ) ;
196
196
@@ -206,7 +206,7 @@ describe('pager directive', function() {
206
206
uibPagerConfig . previousText = 'PR' ;
207
207
uibPagerConfig . nextText = 'NE' ;
208
208
uibPagerConfig . align = false ;
209
- element = $compile ( '<uib-pager total-items="total" ng-model="currentPage"></uib-pager >' ) ( $rootScope ) ;
209
+ element = $compile ( '<ul uib-pager total-items="total" ng-model="currentPage"></ul >' ) ( $rootScope ) ;
210
210
$rootScope . $digest ( ) ;
211
211
} ) ) ;
212
212
afterEach ( inject ( function ( uibPagerConfig ) {
@@ -227,7 +227,7 @@ describe('pager directive', function() {
227
227
228
228
describe ( 'override configuration from attributes' , function ( ) {
229
229
beforeEach ( function ( ) {
230
- element = $compile ( '<uib-pager align="false" previous-text="<" next-text=">" total-items="total" ng-model="currentPage"></uib-pager >' ) ( $rootScope ) ;
230
+ element = $compile ( '<ul uib-pager align="false" previous-text="<" next-text=">" total-items="total" ng-model="currentPage"></ul >' ) ( $rootScope ) ;
231
231
$rootScope . $digest ( ) ;
232
232
} ) ;
233
233
@@ -248,7 +248,7 @@ describe('pager directive', function() {
248
248
it ( 'changes "previous" & "next" text from interpolated attributes' , function ( ) {
249
249
$rootScope . previousText = '<<' ;
250
250
$rootScope . nextText = '>>' ;
251
- element = $compile ( '<uib-pager align="false" previous-text="{{previousText}}" next-text="{{nextText}}" total-items="total" ng-model="currentPage"></uib-pager >' ) ( $rootScope ) ;
251
+ element = $compile ( '<ul uib-pager align="false" previous-text="{{previousText}}" next-text="{{nextText}}" total-items="total" ng-model="currentPage"></ul >' ) ( $rootScope ) ;
252
252
$rootScope . $digest ( ) ;
253
253
254
254
expect ( getPaginationEl ( 0 ) . text ( ) ) . toBe ( '<<' ) ;
@@ -259,7 +259,7 @@ describe('pager directive', function() {
259
259
it ( 'disables the component when ng-disabled is true' , function ( ) {
260
260
$rootScope . disable = true ;
261
261
262
- element = $compile ( '<uib-pager total-items="total" ng-disabled="disable" ng-model="currentPage"></uib-pager >' ) ( $rootScope ) ;
262
+ element = $compile ( '<ul uib-pager total-items="total" ng-disabled="disable" ng-model="currentPage"></ul >' ) ( $rootScope ) ;
263
263
$rootScope . $digest ( ) ;
264
264
updateCurrentPage ( 2 ) ;
265
265
0 commit comments