Skip to content

Commit

Permalink
build(test): remove obsolete jQuery gold files #840
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Nov 2, 2021
1 parent 5a6e090 commit f2d4073
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 183 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This list is detailed and covers changes in each pre-release version.
Unreleased
----------

Nothing yet.
- Fix: Removed another vestige of jQuery from the source tarball (`issue 840`_).


.. _changes_611:
Expand Down
38 changes: 23 additions & 15 deletions tests/gold/html/support/coverage_html.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,21 @@ coverage.pyfile_ready = function () {
coverage.set_sel(0);
}

document.querySelector(".button_toggle_run").addEventListener("click", coverage.toggle_lines);
document.querySelector(".button_toggle_mis").addEventListener("click", coverage.toggle_lines);
document.querySelector(".button_toggle_exc").addEventListener("click", coverage.toggle_lines);
document.querySelector(".button_toggle_par").addEventListener("click", coverage.toggle_lines);
const on_click = function(sel, fn) {
const elt = document.querySelector(sel);
if (elt) {
elt.addEventListener("click", fn);
}
}
on_click(".button_toggle_run", coverage.toggle_lines);
on_click(".button_toggle_mis", coverage.toggle_lines);
on_click(".button_toggle_exc", coverage.toggle_lines);
on_click(".button_toggle_par", coverage.toggle_lines);

document.querySelector(".button_next_chunk").addEventListener("click", coverage.to_next_chunk_nicely);
document.querySelector(".button_prev_chunk").addEventListener("click", coverage.to_prev_chunk_nicely);
document.querySelector(".button_top_of_page").addEventListener("click", coverage.to_top);
document.querySelector(".button_first_chunk").addEventListener("click", coverage.to_first_chunk);
on_click(".button_next_chunk", coverage.to_next_chunk_nicely);
on_click(".button_prev_chunk", coverage.to_prev_chunk_nicely);
on_click(".button_top_of_page", coverage.to_top);
on_click(".button_first_chunk", coverage.to_first_chunk);

coverage.filters = undefined;
try {
Expand Down Expand Up @@ -258,13 +264,15 @@ coverage.toggle_lines = function (event) {
coverage.set_line_visibilty = function (category, should_show) {
const cls = "show_" + category;
const btn = document.querySelector(".button_toggle_" + category);
if (should_show) {
document.querySelectorAll("#source ." + category).forEach(e => e.classList.add(cls));
btn.classList.add(cls);
}
else {
document.querySelectorAll("#source ." + category).forEach(e => e.classList.remove(cls));
btn.classList.remove(cls);
if (btn) {
if (should_show) {
document.querySelectorAll("#source ." + category).forEach(e => e.classList.add(cls));
btn.classList.add(cls);
}
else {
document.querySelectorAll("#source ." + category).forEach(e => e.classList.remove(cls));
btn.classList.remove(cls);
}
}
};

Expand Down
9 changes: 0 additions & 9 deletions tests/gold/html/support/jquery.ba-throttle-debounce.min.js

This file was deleted.

99 changes: 0 additions & 99 deletions tests/gold/html/support/jquery.hotkeys.js

This file was deleted.

53 changes: 0 additions & 53 deletions tests/gold/html/support/jquery.isonscreen.js

This file was deleted.

4 changes: 0 additions & 4 deletions tests/gold/html/support/jquery.min.js

This file was deleted.

Loading

0 comments on commit f2d4073

Please # to comment.