)
);
+ // Remove excluded params from the url
+ uri.query = this.filtersModel.removeExcludedParams( uri.query );
+
// Reapply unrecognized params and url version
uri.query = $.extend( true, {}, uri.query, unrecognizedParams, { urlversion: '2' } );
{ name: 'filter5', cssClass: 'filter5class' },
{ name: 'filter6' } // Not supporting highlights
]
+ }, {
+ name: 'group4',
+ title: 'Group 4',
+ type: 'boolean',
+ isSticky: true,
+ filters: [
+ { name: 'stickyFilter7', cssClass: 'filter7class' },
+ { name: 'stickyFilter8', cssClass: 'filter8class' }
+ ]
} ],
minimalDefaultParams = {
filter1: '1',
{ urlversion: '2', filter2: '1', group3: 'filter5', foo: 'bar' },
'Model state is reflected in the updated URI with existing uri params'
);
+
+ // Update the model with sticky filter
+ filtersModel.toggleFiltersSelected( {
+ group4__stickyFilter7: true
+ } );
+
+ assert.deepEqual(
+ ( uriProcessor.getUpdatedUri( {} ) ).query,
+ { urlversion: '2', filter2: '1', group3: 'filter5' },
+ 'Sticky parameters are not reflected in the URI query'
+ );
} );
QUnit.test( 'updateModelBasedOnQuery', function ( assert ) {