Update jQuery to 3.3.1. Fixes #3271

Patch by Aditya, with test enhancements from Anthony and Joao at Pivotal.
This commit is contained in:
Aditya Toshniwal
2018-05-25 16:26:37 +01:00
committed by Dave Page
parent 61d8072a8c
commit 9f13865777
32 changed files with 120 additions and 154 deletions

View File

@@ -273,7 +273,7 @@ describe('ColumnSelector', function () {
describe('when the column is not selectable', function () {
it('does not select the column', function () {
$(container.find('.slick-header-column:contains(some-non-selectable-column)')).click();
$(container.find('.slick-header-column:contains(some-non-selectable-column)')).trigger('click');
var selectedRanges = cellSelectionModel.getSelectedRanges();
expect(selectedRanges.length).toEqual(0);

View File

@@ -68,7 +68,7 @@ describe('GridSelector', function () {
describe('when the cell for the select/deselect all is clicked', function () {
it('selects the whole grid', function () {
container.find('[title=\'Select/Deselect All\']').parent().click();
container.find('[title=\'Select/Deselect All\']').parent().trigger('click');
var selectedRanges = xCellSelectionModel.getSelectedRanges();
expect(selectedRanges.length).toBe(1);
@@ -80,7 +80,7 @@ describe('GridSelector', function () {
});
it('adds selected class', function () {
container.find('[title=\'Select/Deselect All\']').parent().click();
container.find('[title=\'Select/Deselect All\']').parent().trigger('click');
expect($(container.find('[data-id=\'select-all\']')).hasClass('selected')).toBeTruthy();
});
@@ -89,7 +89,7 @@ describe('GridSelector', function () {
describe('when the select all button in the corner gets selected', function () {
it('selects all the cells', function () {
container.find('[title=\'Select/Deselect All\']').click();
container.find('[title=\'Select/Deselect All\']').trigger('click');
var selectedRanges = xCellSelectionModel.getSelectedRanges();
expect(selectedRanges.length).toBe(1);
@@ -102,11 +102,11 @@ describe('GridSelector', function () {
describe('when the select all button in the corner gets deselected', function () {
beforeEach(function () {
container.find('[title=\'Select/Deselect All\']').click();
container.find('[title=\'Select/Deselect All\']').trigger('click');
});
it('deselects all the cells', function () {
container.find('[title=\'Select/Deselect All\']').click();
container.find('[title=\'Select/Deselect All\']').trigger('click');
var selectedRanges = xCellSelectionModel.getSelectedRanges();
expect(selectedRanges.length).toBe(0);
@@ -115,11 +115,11 @@ describe('GridSelector', function () {
describe('and then the underlying selection changes', function () {
beforeEach(function () {
container.find('[title=\'Select/Deselect All\']').click();
container.find('[title=\'Select/Deselect All\']').trigger('click');
});
it('removes the selected class', function () {
container.find('[title=\'Select/Deselect All\']').parent().click();
container.find('[title=\'Select/Deselect All\']').parent().trigger('click');
expect($(container.find('[data-id=\'select-all\']')).hasClass('selected')).toBeFalsy();
});