Skip to content

Commit 77e9d54

Browse files
committed
Switch from BMI to Book an appointment
1 parent 4ee71ba commit 77e9d54

6 files changed

Lines changed: 21 additions & 21 deletions

File tree

features/check_need_appointment.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Feature: Check if you need an appointment page
1818
When I go to "/check-if-you-need-an-appointment"
1919
Then I see a back link to "/date-of-birth"
2020
When I check "Yes, one or more of these things applies to me and I need a face-to-face appointment" and submit
21-
Then I am on "/bmi-exit"
21+
Then I am on "/call-us-to-book-an-appointment"
2222

2323
Scenario: Navigating backwards and forwards
2424
Given I am logged in

lung_cancer_screening/questions/jinja2/bmi_exit.jinja renamed to lung_cancer_screening/questions/jinja2/book_an_appointment.jinja

File renamed without changes.

lung_cancer_screening/questions/tests/unit/views/test_check_need_appointment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ def test_post_redirects_to_the_next_page(self):
133133
# Assuming it redirects to the next question page - adjust as needed
134134
self.assertRedirects(response, reverse("questions:height"))
135135

136-
def test_post_redirects_to_bmi_exit_page(self):
136+
def test_post_redirects_to_book_an_appointment_page(self):
137137
response = self.client.post(
138138
reverse("questions:check_need_appointment"),
139139
{"value": True}
140140
)
141141

142142
# Assuming it redirects to the next question page - adjust as needed
143-
self.assertRedirects(response, reverse("questions:bmi_exit"))
143+
self.assertRedirects(response, reverse("questions:book_an_appointment"))
144144

145145
def test_post_responds_with_422_if_the_response_fails_to_create(self):
146146
response = self.client.post(

lung_cancer_screening/questions/urls.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
from .views.age_range_exit import AgeRangeExitView
2121
from .views.asbestos_exposure import AsbestosExposureView
22-
from .views.bmi_exit import BmiExitView
22+
from .views.book_an_appointment import BookAnAppointmentExitView
2323
from .views.cancer_diagnosis import CancerDiagnosisView
2424
from .views.check_need_appointment import CheckNeedAppointmentView
2525
from .views.date_of_birth import DateOfBirthView
@@ -40,24 +40,24 @@
4040

4141
urlpatterns = [
4242
path('', RedirectView.as_view(url='/start'), name='root'),
43-
path('start', StartView.as_view(), name='start'),
44-
path('have-you-ever-smoked', HaveYouEverSmokedView.as_view(), name='have_you_ever_smoked'),
45-
path('date-of-birth', DateOfBirthView.as_view(), name='date_of_birth'),
46-
path('check-if-you-need-an-appointment', CheckNeedAppointmentView.as_view(), name='check_need_appointment'),
47-
path('height', HeightView.as_view(), name='height'),
48-
path('weight', WeightView.as_view(), name='weight'),
49-
path('sex-at-birth', SexAtBirthView.as_view(), name='sex_at_birth'),
50-
path('gender', GenderView.as_view(), name='gender'),
51-
path('ethnicity', EthnicityView.as_view(), name='ethnicity'),
52-
path('education', EducationView.as_view(), name='education'),
53-
path('respiratory-conditions', RespiratoryConditionsView.as_view(), name='respiratory_conditions'),
43+
path('age-range-exit', AgeRangeExitView.as_view(), name='age_range_exit'),
5444
path('asbestos-exposure', AsbestosExposureView.as_view(), name='asbestos_exposure'),
45+
path('call-us-to-book-an-appointment', BookAnAppointmentExitView.as_view(), name='book_an_appointment'),
5546
path('cancer-diagnosis', CancerDiagnosisView.as_view(), name='cancer_diagnosis'),
47+
path('check-if-you-need-an-appointment', CheckNeedAppointmentView.as_view(), name='check_need_appointment'),
48+
path('date-of-birth', DateOfBirthView.as_view(), name='date_of_birth'),
49+
path('education', EducationView.as_view(), name='education'),
50+
path('ethnicity', EthnicityView.as_view(), name='ethnicity'),
5651
path('family-history-lung-cancer', FamilyHistoryLungCancerView.as_view(), name='family_history_lung_cancer'),
52+
path('gender', GenderView.as_view(), name='gender'),
53+
path('have-you-ever-smoked', HaveYouEverSmokedView.as_view(), name='have_you_ever_smoked'),
54+
path('height', HeightView.as_view(), name='height'),
55+
path('non-smoker-exit', NonSmokerExitView.as_view(), name='non_smoker_exit'),
5756
path('relatives-age-when-diagnosed', RelativesAgeWhenDiagnosedView.as_view(), name='relatives_age_when_diagnosed'),
57+
path('respiratory-conditions', RespiratoryConditionsView.as_view(), name='respiratory_conditions'),
5858
path('responses', ResponsesView.as_view(), name='responses'),
59-
path('age-range-exit', AgeRangeExitView.as_view(), name='age_range_exit'),
60-
path('bmi-exit', BmiExitView.as_view(), name='bmi_exit'),
61-
path('non-smoker-exit', NonSmokerExitView.as_view(), name='non_smoker_exit'),
59+
path('sex-at-birth', SexAtBirthView.as_view(), name='sex_at_birth'),
60+
path('start', StartView.as_view(), name='start'),
61+
path('weight', WeightView.as_view(), name='weight'),
6262
path('your-results', YourResultsView.as_view(), name='your_results'),
6363
]

lung_cancer_screening/questions/views/bmi_exit.py renamed to lung_cancer_screening/questions/views/book_an_appointment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from .mixins.ensure_response_set import EnsureResponseSet
66

77

8-
class BmiExitView(LoginRequiredMixin, EnsureResponseSet, View):
8+
class BookAnAppointmentExitView(LoginRequiredMixin, EnsureResponseSet, View):
99
def get(self, request):
1010
return render(
1111
request,
12-
"bmi_exit.jinja"
12+
"book_an_appointment.jinja"
1313
)

lung_cancer_screening/questions/views/check_need_appointment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def post(self, request):
2929
response.save()
3030

3131
if form.cleaned_data["value"] :
32-
return redirect(reverse("questions:bmi_exit"))
32+
return redirect(reverse("questions:book_an_appointment"))
3333
else :
3434
return redirect(reverse("questions:height"))
3535
else:

0 commit comments

Comments
 (0)