From cab15383ecbaff53f78082334eaff7507ba6504a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 10:58:01 +0000 Subject: [PATCH 1/3] Initial plan From 86bab6374915e8b1550b7e9695ee155834cbd5eb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 11:05:57 +0000 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20centrar=20t=C3=ADtulo=20de=20bienven?= =?UTF-8?q?ida=20en=20vista=20m=C3=B3vil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/dsaub/proyecto-final/sessions/8cb9755f-d00d-45ae-ab08-9799aa769175 Co-authored-by: dsaub <54474838+dsaub@users.noreply.github.com> --- tienda/templates/tienda/home.html | 9 +++++++++ tienda/tests.py | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/tienda/templates/tienda/home.html b/tienda/templates/tienda/home.html index ff4e691..98b5896 100644 --- a/tienda/templates/tienda/home.html +++ b/tienda/templates/tienda/home.html @@ -118,6 +118,15 @@ font-size: 1.1rem; opacity: 0.9; } + + @media (max-width: 767.98px) { + .hero-section h1 { + margin-left: auto; + margin-right: auto; + text-align: center; + text-wrap: balance; + } + } {% endblock %} diff --git a/tienda/tests.py b/tienda/tests.py index 1f6b083..ced6966 100644 --- a/tienda/tests.py +++ b/tienda/tests.py @@ -1358,6 +1358,12 @@ class EndpointViewTests(TestCase): response = self.client.get(url) self.assertEqual(response.status_code, 200) + def test_home_includes_mobile_centering_rule_for_welcome_title(self): + response = self.client.get(reverse("home")) + self.assertContains(response, "@media (max-width: 767.98px)") + self.assertContains(response, ".hero-section h1") + self.assertContains(response, "text-align: center;") + def test_login_required_endpoints_redirect_anonymous(self): secured_get_routes = [ reverse("mis_productos"), From 9a32ee364ee58c17038f70f58b1fca5c956155f6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 11:13:28 +0000 Subject: [PATCH 3/3] =?UTF-8?q?test:=20robustecer=20validaci=C3=B3n=20del?= =?UTF-8?q?=20centrado=20responsive=20en=20home?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/dsaub/proyecto-final/sessions/8cb9755f-d00d-45ae-ab08-9799aa769175 Co-authored-by: dsaub <54474838+dsaub@users.noreply.github.com> --- tienda/templates/tienda/home.html | 2 -- tienda/tests.py | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tienda/templates/tienda/home.html b/tienda/templates/tienda/home.html index 98b5896..4465721 100644 --- a/tienda/templates/tienda/home.html +++ b/tienda/templates/tienda/home.html @@ -121,8 +121,6 @@ @media (max-width: 767.98px) { .hero-section h1 { - margin-left: auto; - margin-right: auto; text-align: center; text-wrap: balance; } diff --git a/tienda/tests.py b/tienda/tests.py index ced6966..eb6b8e1 100644 --- a/tienda/tests.py +++ b/tienda/tests.py @@ -1358,11 +1358,21 @@ class EndpointViewTests(TestCase): response = self.client.get(url) self.assertEqual(response.status_code, 200) - def test_home_includes_mobile_centering_rule_for_welcome_title(self): + def test_home_mobile_welcome_title_centered(self): response = self.client.get(reverse("home")) - self.assertContains(response, "@media (max-width: 767.98px)") - self.assertContains(response, ".hero-section h1") - self.assertContains(response, "text-align: center;") + html = response.content.decode() + media_idx = html.find("@media (max-width: 767.98px)") + self.assertNotEqual(media_idx, -1) + + rule_idx = html.find(".hero-section h1", media_idx) + self.assertNotEqual(rule_idx, -1) + + block_end_idx = html.find("}", rule_idx) + self.assertNotEqual(block_end_idx, -1) + rule_block = html[rule_idx:block_end_idx] + + self.assertIn("text-align: center", rule_block) + self.assertIn("text-wrap: balance", rule_block) def test_login_required_endpoints_redirect_anonymous(self): secured_get_routes = [