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

fix: classic template did not pass base_url to macro #741

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion share/jupyter/voila/templates/classic/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
{% endblock body_header %}

{% block footer_js %}
{{ voila_setup() }}
{{ voila_setup(resources.base_url, resources.nbextensions) }}
{% endblock footer_js %}

19 changes: 19 additions & 0 deletions tests/app/template_sanity_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# tests basic things the templates should have
import pytest

import os

BASE_DIR = os.path.dirname(__file__)


@pytest.fixture(params=['lab', 'classic'])
def voila_args_extra(request):
return [f'--template={request.param}']


async def test_lists_extension(http_server_client, base_url, voila_app):
response = await http_server_client.fetch(base_url)
assert response.code == 200
html_text = response.body.decode('utf-8')
assert f'/voila/templates/{voila_app.voila_configuration.template}/static/voila.js' in html_text
assert '/voila/static/require.min.js' in html_text