diff --git a/tienda/templates/tienda/index.html b/tienda/templates/tienda/index.html index 8aecd0e..2193743 100644 --- a/tienda/templates/tienda/index.html +++ b/tienda/templates/tienda/index.html @@ -2,7 +2,23 @@ {% load vat_filters %} {% block content %}
-
+
+ +
+
    + {% if categories %} + {% for category in categories %} +
  • + {{ category.name }} +
  • + {% endfor %} + {% endif %} +
+
+
+
Categorias
    {% if categories %} @@ -14,7 +30,7 @@ {% endif %}
-
+
{% if products %} {% for producto in products %}
@@ -39,4 +55,4 @@ {% endif %}
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/tienda/tests.py b/tienda/tests.py index 1f6b083..d258e3e 100644 --- a/tienda/tests.py +++ b/tienda/tests.py @@ -1358,6 +1358,14 @@ class EndpointViewTests(TestCase): response = self.client.get(url) self.assertEqual(response.status_code, 200) + def test_index_shows_mobile_categories_toggle(self): + response = self.client.get(reverse("index")) + + self.assertEqual(response.status_code, 200) + self.assertContains(response, 'data-bs-target="#mobileCategoriasCollapse"') + self.assertContains(response, 'id="mobileCategoriasCollapse"') + self.assertContains(response, ">Categorias<") + def test_login_required_endpoints_redirect_anonymous(self): secured_get_routes = [ reverse("mis_productos"),