Skip to content

Commit 3ab679b

Browse files
committed
align page titles with the prototype
1 parent 065130f commit 3ab679b

8 files changed

+9
-64
lines changed

manage_breast_screening/mammograms/views/medical_history/cyst_history_item_views.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ def add_title(self, thing_name):
2727
def added_message(self, thing_name):
2828
return f"Details of {thing_name} added"
2929

30-
def get_context_data(self, **kwargs):
31-
context = super().get_context_data()
32-
33-
context.update(
34-
{"page_title": "Details of the cysts"},
35-
)
36-
37-
return context
38-
3930
def get_form_kwargs(self):
4031
kwargs = super().get_form_kwargs()
4132
kwargs["participant"] = self.participant
@@ -53,7 +44,7 @@ class UpdateCystHistoryView(MedicalInformationMixin, UpdateWithAuditView):
5344
thing_name = "cysts"
5445

5546
def update_title(self, thing_name):
56-
return f"Add details of {thing_name}"
47+
return f"Edit details of {thing_name}"
5748

5849
def updated_message(self, thing_name):
5950
return f"Details of {thing_name} updated"
@@ -72,12 +63,3 @@ def get_form_kwargs(self):
7263
kwargs = super().get_form_kwargs()
7364
kwargs["participant"] = self.participant
7465
return kwargs
75-
76-
def get_context_data(self, **kwargs):
77-
context = super().get_context_data()
78-
79-
context.update(
80-
{"page_title": "Details of the cysts"},
81-
)
82-
83-
return context

manage_breast_screening/mammograms/views/medical_history/implanted_medical_device_history_item_views.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ def add_title(self, thing_name):
2828
def added_message(self, thing_name):
2929
return f"{sentence_case(thing_name)} added"
3030

31-
def get_context_data(self, **kwargs):
32-
context = super().get_context_data()
33-
34-
context.update({"page_title": "Details of the implanted medical device"})
35-
36-
return context
37-
3831
def get_form_kwargs(self):
3932
kwargs = super().get_form_kwargs()
4033
kwargs["participant"] = self.participant
@@ -71,10 +64,3 @@ def get_form_kwargs(self):
7164
kwargs = super().get_form_kwargs()
7265
kwargs["participant"] = self.participant
7366
return kwargs
74-
75-
def get_context_data(self, **kwargs):
76-
context = super().get_context_data()
77-
78-
context.update({"page_title": "Details of the implanted medical device"})
79-
80-
return context

manage_breast_screening/mammograms/views/medical_history/mastectomy_or_lumpectomy_history_item_views.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ def get_object(self):
6565
def get_context_data(self, **kwargs):
6666
context = super().get_context_data()
6767

68-
context.update(
69-
{
70-
"page_title": "Details of the mastectomy or lumpectomy",
71-
"presenter": MedicalInformationPresenter(self.appointment),
72-
},
73-
)
68+
context.update({"presenter": MedicalInformationPresenter(self.appointment)})
7469

7570
return context

manage_breast_screening/mammograms/views/medical_history/other_procedure_history_item_views.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,6 @@ def add_title(self, thing_name):
3030
def added_message(self, thing_name):
3131
return "Details of other procedure added"
3232

33-
def get_context_data(self, **kwargs):
34-
context = super().get_context_data()
35-
36-
context.update(
37-
{"page_title": "Details of the other procedure"},
38-
)
39-
40-
return context
41-
4233
def get_form_kwargs(self):
4334
kwargs = super().get_form_kwargs()
4435
kwargs["participant"] = self.participant
@@ -86,15 +77,6 @@ def get_delete_url(self):
8677
},
8778
)
8879

89-
def get_context_data(self, **kwargs):
90-
context = super().get_context_data()
91-
92-
context.update(
93-
{"page_title": "Details of the other procedure"},
94-
)
95-
96-
return context
97-
9880

9981
class DeleteOtherProcedureHistoryView(DeleteWithAuditView):
10082
def get_thing_name(self, object):

manage_breast_screening/tests/system/clinical/test_cyst_history.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def when_i_click_on_cysts(self):
6161

6262
def then_i_see_the_add_cyst_form(self):
6363
expect(self.page.get_by_text("Add details of cysts")).to_be_visible()
64-
self.assert_page_title_contains("Details of the cysts")
64+
self.assert_page_title_contains("Add details of cysts")
6565

6666
def when_i_select_no_treatment(self):
6767
self.page.get_by_label("No treatment", exact=True).click()
@@ -88,7 +88,7 @@ def and_the_message_says_cyst_added(self):
8888

8989
def then_i_see_the_edit_cyst_form(self):
9090
expect(self.page.get_by_text("Edit details of cysts")).to_be_visible()
91-
self.assert_page_title_contains("Details of the cysts")
91+
self.assert_page_title_contains("Edit details of cysts")
9292

9393
def when_i_click_change(self):
9494
self.page.get_by_text("Change cyst item").click()

manage_breast_screening/tests/system/clinical/test_implanted_medical_device_history.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def then_i_see_the_add_a_implanted_medical_device_form(self):
7171
expect(
7272
self.page.get_by_text("Add details of implanted medical device")
7373
).to_be_visible()
74-
self.assert_page_title_contains("Details of the implanted medical device")
74+
self.assert_page_title_contains("Add details of implanted medical device")
7575

7676
def then_i_see_validation_errors_for_missing_implanted_medical_device_details(self):
7777
self.expect_validation_error(
@@ -130,7 +130,7 @@ def then_i_see_the_edit_implanted_medical_device_form(self):
130130
expect(
131131
self.page.get_by_text("Edit details of implanted medical device")
132132
).to_be_visible()
133-
self.assert_page_title_contains("Details of the implanted medical device")
133+
self.assert_page_title_contains("Edit details of implanted medical device")
134134

135135
def when_i_select_cardiac_device(self):
136136
self.page.get_by_label(

manage_breast_screening/tests/system/clinical/test_mastectomy_or_lumpectomy_history.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def then_i_see_the_edit_mastectomy_or_lumpectomy_form(self):
175175
expect(
176176
self.page.get_by_text("Edit details of mastectomy or lumpectomy")
177177
).to_be_visible()
178-
self.assert_page_title_contains("Details of the mastectomy or lumpectomy")
178+
self.assert_page_title_contains("Edit details of mastectomy or lumpectomy")
179179

180180
def when_i_update_additional_details(self):
181181
self.page.get_by_label("Additional details (optional)", exact=True).fill(

manage_breast_screening/tests/system/clinical/test_other_procedure_history.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def when_i_click_on_other_procedures(self):
7272

7373
def then_i_see_the_add_other_procedure_form(self):
7474
expect(self.page.get_by_text("Add details of other procedures")).to_be_visible()
75-
self.assert_page_title_contains("Details of the other procedure")
75+
self.assert_page_title_contains("Add details of other procedures")
7676

7777
def then_i_see_validation_error_for_missing_procedure(self):
7878
self.expect_validation_error(
@@ -123,7 +123,7 @@ def and_the_message_says_other_procedure_added(self):
123123

124124
def then_i_see_the_edit_other_procedure_form(self):
125125
expect(self.page.get_by_text("Edit details of other procedure")).to_be_visible()
126-
self.assert_page_title_contains("Details of the other procedure")
126+
self.assert_page_title_contains("Edit details of other procedures")
127127

128128
def when_i_click_change(self):
129129
self.page.get_by_text("Change other procedure item").click()

0 commit comments

Comments
 (0)