From 386a99a3b918bee5a86a713ad48e88314c15005b Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Mon, 8 Nov 2021 20:36:00 +0530 Subject: [PATCH 1/3] Add visible anchor links to project list page --- home/templates/home/round_page_with_communities.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/templates/home/round_page_with_communities.html b/home/templates/home/round_page_with_communities.html index 8e1d9c7d6..9920736dd 100644 --- a/home/templates/home/round_page_with_communities.html +++ b/home/templates/home/round_page_with_communities.html @@ -135,7 +135,7 @@

Final Applications Closed {{ current_round.contributions_close }} at 4pm UTC {% for participation, projects in ontime_projects %} {% with community=participation.community funded_interns=participation.interns_funded %} -

{{ community.name }} - {{ funded_interns }} intern{{ funded_interns|pluralize }}

+

{{ community.name }} - {{ funded_interns }} intern{{ funded_interns|pluralize }}

{{ community.description }}

{% if role.is_approved_applicant or role.is_volunteer %} {% if not current_round.contributions_close.has_passed %} From 87e15ec38662561656057fc06104e0bbc4092271 Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Mon, 8 Nov 2021 21:06:50 +0530 Subject: [PATCH 2/3] Fix tests --- home/templates/home/round_page_with_communities.html | 2 +- home/test_initial_application.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/home/templates/home/round_page_with_communities.html b/home/templates/home/round_page_with_communities.html index 9920736dd..b599bc97f 100644 --- a/home/templates/home/round_page_with_communities.html +++ b/home/templates/home/round_page_with_communities.html @@ -135,7 +135,7 @@

Final Applications Closed {{ current_round.contributions_close }} at 4pm UTC {% for participation, projects in ontime_projects %} {% with community=participation.community funded_interns=participation.interns_funded %} -

{{ community.name }} - {{ funded_interns }} intern{{ funded_interns|pluralize }}

+

{{ community.name }} - {{ funded_interns }} intern{{ funded_interns|pluralize }}

{{ community.description }}

{% if role.is_approved_applicant or role.is_volunteer %} {% if not current_round.contributions_close.has_passed %} diff --git a/home/test_initial_application.py b/home/test_initial_application.py index 36588ede6..c7e745766 100644 --- a/home/test_initial_application.py +++ b/home/test_initial_application.py @@ -326,7 +326,7 @@ def test_project_list_not_logged_in(self): response = self.client.get(reverse('project-selection')) self.assertEqual(response.status_code, 200) - self.assertContains(response, '

Debian - 2 interns

', html=True) + self.assertContains(response, '

Debian - 2 interns

', html=True) self.assertContains(response, 'Project details are hidden.') self.assertNotContains(response, 'Debian community landing page'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True) self.assertNotContains(response, '{}'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True) @@ -350,7 +350,7 @@ def test_project_list_general_time_align_rejection_before_contribution_opens(sel response = self.client.get(reverse('project-selection')) self.assertEqual(response.status_code, 200) - self.assertContains(response, '

Debian - 2 interns

', html=True) + self.assertContains(response, '

Debian - 2 interns

', html=True) self.assertContains(response, 'Project details are hidden.') self.assertNotContains(response, 'Debian community landing page'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True) self.assertNotContains(response, '{}'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True) @@ -374,7 +374,7 @@ def test_project_list_general_time_align_rejection_after_contribution_opens(self response = self.client.get(reverse('project-selection')) self.assertEqual(response.status_code, 200) - self.assertContains(response, '

Debian - 2 interns

', html=True) + self.assertContains(response, '

Debian - 2 interns

', html=True) self.assertContains(response, 'Project details are hidden.') self.assertNotContains(response, 'Debian community landing page'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True) self.assertNotContains(response, '{}'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True) @@ -394,7 +394,7 @@ def test_project_list_approved_before_contributions_open(self): response = self.client.get(reverse('project-selection')) self.assertEqual(response.status_code, 200) - self.assertContains(response, '

Debian - 2 interns

', html=True) + self.assertContains(response, '

Debian - 2 interns

', html=True) self.assertContains(response, 'Project details are hidden.') self.assertNotContains(response, 'Debian community landing page'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True) self.assertNotContains(response, '{}'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True) @@ -413,7 +413,7 @@ def test_project_list_approved_after_contributions_open(self): response = self.client.get(reverse('project-selection')) self.assertEqual(response.status_code, 200) - self.assertContains(response, '

Debian - 2 interns

', html=True) + self.assertContains(response, '

Debian - 2 interns

', html=True) self.assertNotContains(response, 'Project details are hidden.') self.assertContains(response, 'Debian community landing page'.format(reverse('community-landing', kwargs={'round_slug': project.project_round.participating_round.slug, 'community_slug': project.project_round.community.slug})), html=True) self.assertContains(response, '{}'.format(project.project_round.get_absolute_url(), project.slug, project.short_title), html=True) From 5bda6581c02d7ddea334dbf30692653655758114 Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Mon, 15 Nov 2021 13:52:22 +0530 Subject: [PATCH 3/3] Replace .name with .slug --- home/templates/home/round_page_with_communities.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/templates/home/round_page_with_communities.html b/home/templates/home/round_page_with_communities.html index b599bc97f..8d76aa291 100644 --- a/home/templates/home/round_page_with_communities.html +++ b/home/templates/home/round_page_with_communities.html @@ -135,7 +135,7 @@

Final Applications Closed {{ current_round.contributions_close }} at 4pm UTC {% for participation, projects in ontime_projects %} {% with community=participation.community funded_interns=participation.interns_funded %} -

{{ community.name }} - {{ funded_interns }} intern{{ funded_interns|pluralize }}

+

{{ community.name }} - {{ funded_interns }} intern{{ funded_interns|pluralize }}

{{ community.description }}

{% if role.is_approved_applicant or role.is_volunteer %} {% if not current_round.contributions_close.has_passed %}