Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6410 jQuery Deprecations #6411

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b2ebd92
jQuery deprecations - submit
rfultz Aug 5, 2024
e36023c
jQuery deprecations - keyCode
rfultz Aug 5, 2024
205dd66
jQuery deprecations - change
rfultz Aug 5, 2024
4a3778d
jQuery deprecations - click
rfultz Aug 5, 2024
6d453c2
jQuery deprecations - focus
rfultz Aug 5, 2024
e68bc59
jQuery deprecations - blur
rfultz Aug 5, 2024
45265d9
jQuery deprecations - hover
rfultz Aug 5, 2024
711fbfc
jQuery deprecations - change
rfultz Aug 5, 2024
fa8dd62
jQuery deprecations - bind
rfultz Aug 5, 2024
ee16b66
jQuery deprecations - unbind
rfultz Aug 5, 2024
cf60484
jQuery deprecations
rfultz Aug 5, 2024
7c43130
jQuery deprecations
rfultz Aug 5, 2024
f0ae6e4
Merge branch 'develop' into feature/6410-jquery-deprecations
rfultz Aug 27, 2024
0d5e04e
Remove unused getCookie
rfultz Sep 5, 2024
ae48d5d
Documentation, formatting
rfultz Sep 6, 2024
c4bf2d2
Turn off failing tests, add TODO
rfultz Sep 6, 2024
934b00b
Merge branch 'develop' into feature/6410-jquery-deprecations
rfultz Sep 6, 2024
6c3f148
Merge branch 'develop' into feature/6410-jquery-deprecations
rfultz Oct 7, 2024
533a936
Merge branch 'develop' into feature/6410-jquery-deprecations
rfultz Oct 24, 2024
96fc917
Updating deprecated jQuery functions
rfultz Oct 24, 2024
a719175
Merge branch 'develop' into feature/6410-jquery-deprecations
rfultz Oct 31, 2024
8c823bf
Merge branch 'develop' into feature/6410-jquery-deprecations
rfultz Nov 27, 2024
fbe736d
Merge branch 'develop' into feature/6410-jquery-deprecations
rfultz Dec 11, 2024
ebbe743
Merge branch 'develop' into feature/6410-jquery-deprecations
rfultz Jan 6, 2025
b7f422d
Merge branch 'develop' into feature/6410-jquery-deprecations
rfultz Feb 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
jQuery deprecations - change
rfultz committed Aug 5, 2024
commit 711fbfcc6a857a82bcce07234188767ad8fda5c8
6 changes: 3 additions & 3 deletions fec/fec/tests/js/cycle-select.js
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ describe('cycle select', function() {
});

it('changes the query string on change', function() {
this.cycleSelect.$elm.val('2014').change(); // TODO: jQuery deprecation
this.cycleSelect.$elm.val('2014').trigger('change');
expect(CycleSelect.prototype.setUrl).to.have.been.calledWith(window.location.href + '?cycle=2014');
});
});
@@ -88,7 +88,7 @@ describe('cycle select', function() {
});

it('changes the query string on change', function() {
this.cycleSelect.$cycles.find('[name="cycle-toggle-cycle-1"]').val('2014').change(); // TODO: jQuery deprecation
this.cycleSelect.$cycles.find('[name="cycle-toggle-cycle-1"]').val('2014').trigger('change');
expect(
CycleSelect.prototype.setUrl
).to.have.been.calledWith(
@@ -128,7 +128,7 @@ describe('cycle select', function() {
});

it('changes the query string on change', function() {
this.cycleSelect.$elm.val('2014').change(); // TODO: jQuery deprecation
this.cycleSelect.$elm.val('2014').trigger('change');
var url = URI(window.location.href);
url.path('2014/');
expect(CycleSelect.prototype.setUrl).to.have.been.calledWith(url.toString());
6 changes: 3 additions & 3 deletions fec/fec/tests/js/date-filter.js
Original file line number Diff line number Diff line change
@@ -122,7 +122,7 @@ describe('date filter', function() {
});

it('triggers an add event with all the right properties', function() {
this.filter.$minDate.val('01/01/2015').change(); // TODO: jQuery deprecation
this.filter.$minDate.val('01/01/2015').trigger('change');
expect(this.trigger).to.have.been.calledWith('filter:added', [
{
key: 'min_date',
@@ -139,14 +139,14 @@ describe('date filter', function() {

it('triggers a remove event if the field has no value', function() {
this.filter.$minDate.val('01/01/2015');
this.filter.$minDate.val('').change(); // TODO: jQuery deprecation
this.filter.$minDate.val('').trigger('change');
expect(this.trigger).to.have.been.calledWith('filter:removed');
});

it('triggers a rename event if the field had a value', function() {
this.filter.$minDate.val('01/01/2015');
this.filter.$minDate.data('had-value', true);
this.filter.$minDate.val('02/01/2015').change(); // TODO: jQuery deprecation
this.filter.$minDate.val('02/01/2015').trigger('change');
expect(this.trigger).to.have.been.calledWith('filter:renamed');
expect(this.filter.$minDate.data('loaded-once')).to.be.true;
});
10 changes: 5 additions & 5 deletions fec/fec/tests/js/election-search.js
Original file line number Diff line number Diff line change
@@ -67,22 +67,22 @@ describe('election search', function() {
});

it('should disable the district select when state is not set', function() {
this.el.$state.val('').change(); // TODO: jQuery deprecation
this.el.$state.val('').trigger('change');
expect(this.el.$district.prop('disabled')).to.be.true;
});

it('should disable the district select when state is set and the state does not have districts', function() {
this.el.$state.val('AS').change(); // TODO: jQuery deprecation
this.el.$state.val('AS').trigger('change');
expect(this.el.$district.prop('disabled')).to.be.true;
});

it('should enable the district select when state is set and the state has districts', function() {
this.el.$state.val('VA').change(); // TODO: jQuery deprecation
this.el.$state.val('VA').trigger('change');
expect(this.el.$district.prop('disabled')).to.be.false;
});

it('should clear the state select and disable the district select when the zip select is set', function() {
this.el.$zip.val('19041').change(); // TODO: jQuery deprecation
this.el.$zip.val('19041').trigger('change');
expect(this.el.$state.val()).to.equal('');
expect(this.el.$district.prop('disabled')).to.be.true;
});
@@ -93,7 +93,7 @@ describe('election search', function() {
});

it('should serialize state and district inputs', function() {
this.el.$state.val('VA').change(); // TODO: jQuery deprecation
this.el.$state.val('VA').trigger('change');
this.el.$district.val('01');
expect(this.el.serialize()).to.deep.equal({
cycle: '2016',
4 changes: 2 additions & 2 deletions fec/fec/tests/js/statistical-summary-archive.js
Original file line number Diff line number Diff line change
@@ -83,8 +83,8 @@ describe('Tablefilter', function() {
describe('disableNonPresYears', function() {
beforeEach(function() {
this.disableNonPresYears = spy(Tablefilter.prototype, 'disableNonPresYears');
this.chooseYear.val('1982').change(); // TODO: jQuery deprecation
this.chooseFiler.val('presidential').change(); // TODO: jQuery deprecation
this.chooseYear.val('1982').trigger('change');
this.chooseFiler.val('presidential').trigger('change');
this.filter.showTable();

});
4 changes: 2 additions & 2 deletions fec/fec/tests/js/toggle-filter.js
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ describe('toggle filters', function() {
});

it('calls handleChange() on change', function() {
this.filter.$elm.find('#efiling').prop('checked', true).change(); // TODO: jQuery deprecation
this.filter.$elm.find('#efiling').prop('checked', true).trigger('change');
expect(this.handleChange).to.have.been.called;
});

@@ -94,7 +94,7 @@ describe('toggle filters', function() {
});

it('triggers rename event on changing the toggle', function() {
this.$fixture.find('#efiling').prop('checked', true).change(); // TODO: jQuery deprecation
this.$fixture.find('#efiling').prop('checked', true).trigger('change');
expect(this.trigger).to.have.been.calledWith('filter:renamed', [
{
key: 'data_type-toggle',
4 changes: 2 additions & 2 deletions fec/fec/tests/js/typeahead-filter.js
Original file line number Diff line number Diff line change
@@ -121,10 +121,10 @@ describe('FilterTypeahead', function() {
var enableButton = spy(this.FilterTypeahead, 'enableButton');
var disableButton = spy(this.FilterTypeahead, 'disableButton');

// this.FilterTypeahead.$field.typeahead('val', 'FAKE CANDIDATE').change(); // TODO: jQuery deprecation
// this.FilterTypeahead.$field.typeahead('val', 'FAKE CANDIDATE').trigger('change');
// expect(enableButton).to.have.been.called;

// this.FilterTypeahead.$field.typeahead('val', '').change(); // TODO: jQuery deprecation
// this.FilterTypeahead.$field.typeahead('val', '').trigger('change');
// expect(disableButton).to.have.been.called;

// this.FilterTypeahead.enableButton.restore();