File tree Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ describe('Autoscroll', function () {
4
4
this . searchTest = fixture . load ( 'mock/searchTestResponse.json' ) ;
5
5
//setup document to hold search results
6
6
document . body . innerHTML = __html__ [ 'index.html' ] ;
7
-
8
- window . config . isAutoScroll = true ;
9
- window . config . isPagination = false ;
10
- window . config . isClickNScroll = false ;
7
+ var searchConfig = jQuery . extend ( { } , window . config ) ;
8
+ searchConfig . isAutoScroll = true ;
9
+ searchConfig . isPagination = false ;
10
+ searchConfig . isClickNScroll = false ;
11
11
12
12
//initialize search
13
- this . searchobj = new window . Unbxd . setSearch ( window . config ) ;
13
+ this . searchobj = new window . Unbxd . setSearch ( searchConfig ) ;
14
14
15
15
//stub search ajax call with mock response
16
16
this . stub = sinon . stub ( jQuery , 'ajax' ) . yieldsTo ( 'success' , this . searchTest ) ;
Original file line number Diff line number Diff line change @@ -7,12 +7,13 @@ describe('clickNScroll', function () {
7
7
document . body . innerHTML = __html__ [ 'index.html' ] ;
8
8
9
9
//change configuration to pagination from autoscroll
10
- window . config . isAutoScroll = false ;
11
- window . config . isPagination = false ;
12
- window . config . isClickNScroll = true ;
10
+ var searchConfig = jQuery . extend ( { } , window . config ) ;
11
+ searchConfig . isAutoScroll = false ;
12
+ searchConfig . isPagination = false ;
13
+ searchConfig . isClickNScroll = true ;
13
14
14
15
//initialize search
15
- this . searchobj = new window . Unbxd . setSearch ( window . config ) ;
16
+ this . searchobj = new window . Unbxd . setSearch ( searchConfig ) ;
16
17
17
18
//stub search ajax call with mock response
18
19
this . stub = sinon . stub ( jQuery , 'ajax' )
Original file line number Diff line number Diff line change @@ -5,11 +5,12 @@ describe('PageSize', function () {
5
5
//setup document to hold search results
6
6
document . body . innerHTML = __html__ [ 'index.html' ] ;
7
7
8
- window . config . isAutoScroll = false ;
9
- window . config . isPagination = true ;
8
+ var searchConfig = jQuery . extend ( { } , window . config ) ;
9
+ searchConfig . isAutoScroll = false ;
10
+ searchConfig . isPagination = true ;
10
11
11
12
//initialize search
12
- this . searchobj = new window . Unbxd . setSearch ( window . config ) ;
13
+ this . searchobj = new window . Unbxd . setSearch ( searchConfig ) ;
13
14
14
15
//stub search ajax call with mock response
15
16
this . stub = sinon . stub ( jQuery , 'ajax' ) . yieldsTo ( 'success' , this . searchTest ) ;
Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ describe('Pagination', function () {
7
7
document . body . innerHTML = __html__ [ 'index.html' ] ;
8
8
9
9
//change configuration to pagination from autoscroll
10
- window . config . isAutoScroll = false ;
11
- window . config . isPagination = true ;
10
+ var searchConfig = jQuery . extend ( { } , window . config ) ;
11
+ searchConfig . isAutoScroll = false ;
12
+ searchConfig . isPagination = true ;
12
13
13
14
//initialize search
14
- this . searchobj = new window . Unbxd . setSearch ( window . config ) ;
15
+ this . searchobj = new window . Unbxd . setSearch ( searchConfig ) ;
15
16
16
17
//stub search ajax call with mock response
17
18
this . stub = sinon . stub ( jQuery , 'ajax' ) . yieldsTo ( 'success' , this . searchTest ) ;
You can’t perform that action at this time.
0 commit comments