diff --git a/tests/frontend/filter_list_controller_test.js b/tests/frontend/filter_list_controller_test.js new file mode 100644 index 000000000000..78525f9fcc6e --- /dev/null +++ b/tests/frontend/filter_list_controller_test.js @@ -0,0 +1,241 @@ +/* Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* global expect, beforeEach, afterEach, describe, it, jest */ + + +import {Application} from "@hotwired/stimulus"; +import FilterListController from "../../warehouse/static/js/warehouse/controllers/filter_list_controller"; + + +const testFixtureHTMLVisibilityToggle = ` +
Initially hidden, should end up shown.
+ +`; +const testFixtureHTMLShowing = ` + +`; +const testFixtureHTMLFilters = ` + + +`; +const testFixtureHTMLItems = ` + +{% trans href='https://packaging.python.org/tutorials/installing-packages/', title=gettext('External link') %}Download the file for your platform. If you're not sure which to choose, learn more about installing packages.{% endtrans %}
@@ -448,6 +474,74 @@+ {% trans %}Filter files by name, interpreter, ABI, and platform.{% endtrans %} +
+ ++ {% trans href='https://packaging.python.org/en/latest/specifications/binary-distribution-format/', title=gettext('External link') %}If you're not sure about the file name format, learn more about wheel file names.{% endtrans %} +
+ + + ++ {% trans %}Copy a direct link to the current filters {% endtrans %} + + +
+ ++ +
+ +