-
Notifications
You must be signed in to change notification settings - Fork 327
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
fix: version selector JS #1305
fix: version selector JS #1305
Changes from all commits
459ceda
318be61
5570a4f
f18590a
655a966
b979d2f
5fca8ee
d4b37c6
544f6ba
ca643be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -646,12 +646,14 @@ def test_show_nav_level(sphinx_build_factory) -> None: | |
assert "checked" in checkbox.attrs | ||
|
||
|
||
# the switcher files tested in test_version_switcher_error_states, not all of them exist | ||
switcher_files = ["switcher.json", "http://a.b/switcher.json", "missing_url.json"] | ||
"the switcher files tested in test_version_switcher, not all of them exist" | ||
|
||
|
||
@pytest.mark.parametrize("url", switcher_files) | ||
def test_version_switcher(sphinx_build_factory, file_regression, url) -> None: | ||
def test_version_switcher_error_states( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is just a rename to make the test name more specific, since I'm adding another related test. |
||
sphinx_build_factory, file_regression, url | ||
) -> None: | ||
"""Regression test the version switcher dropdown HTML. | ||
|
||
Note that a lot of the switcher HTML gets populated by JavaScript, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is used in our tests to make sure the version switcher component gets embedded correctly (prior to any JS adding the actual entries). Changes here simply mirror the changes to the template so that test still passes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trallard In a follow-up PR I'd like to add a
@requires_playwright
decorator so that I can move this test out oftest_a11y.py
intotest_build.py
. Something similar tohttps://github.com/mne-tools/mne-python/blob/68e4f89763135637110859ee0e05e594955815f1/mne/utils/_testing.py#L67-L81
OK with you if this non-a11y test squats in the
test_a11y.py
file for now until that gets done? (did it this way because of theimportorskip
issue; didn't want toimportorskip
the entire other tests file when only one test needed playwright)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, this makes sense to me