Skip to content

Commit 0efc9e3

Browse files
committed
Fixing tests for the new default value update on teaching confirmation checkbox
1 parent 0cefec2 commit 0efc9e3

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

spec/system/teacher_interface/back_links_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
# <- teacher_edit_qualification_page
4343

4444
when_i_click_qualifications
45+
and_i_check_teaching_qualification_confirmation
4546
and_i_click_continue
4647
then_i_see_the(:teacher_upload_document_page)
4748

@@ -58,6 +59,7 @@
5859
# -> teacher_part_of_degree_page
5960
# <- document_form_page <- document_form_page <- teacher_edit_qualification_page
6061

62+
and_i_check_teaching_qualification_confirmation
6163
when_i_click_continue
6264
then_i_see_the(:teacher_check_document_page)
6365

@@ -86,6 +88,7 @@
8688
# -> teacher_part_of_degree_page -> teacher_check_qualification_page
8789
# <- teacher_application_page
8890

91+
and_i_check_teaching_qualification_confirmation
8992
when_i_click_continue
9093
then_i_see_the(:teacher_check_document_page)
9194

@@ -124,6 +127,7 @@
124127
qualification_id: qualification.id,
125128
)
126129

130+
and_i_check_teaching_qualification_confirmation
127131
when_i_click_continue
128132
then_i_see_the(:teacher_check_qualifications_page)
129133

@@ -288,6 +292,11 @@ def when_i_click_change_certificate_document_title
288292
.click
289293
end
290294

295+
def and_i_check_teaching_qualification_confirmation
296+
check "I confirm this is the first qualification I have that qualifies me to teach.",
297+
visible: false
298+
end
299+
291300
def when_i_add_another_qualification
292301
teacher_add_another_qualification_page.submit_yes
293302
end

spec/system/teacher_interface/check_answers_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
when_i_click_change_links(:who_you_can_teach, :qualification) do
2727
if teacher_check_document_page.displayed?(0)
2828
and_i_dont_need_to_upload_another_file
29+
elsif teacher_edit_qualification_page.displayed?
30+
and_i_check_teaching_qualification_confirmation
31+
and_i_click_continue
2932
else
3033
and_i_click_continue
3134
end
@@ -164,6 +167,11 @@ def and_i_dont_need_to_upload_another_file
164167
teacher_check_document_page.form.continue_button.click
165168
end
166169

170+
def and_i_check_teaching_qualification_confirmation
171+
check "I confirm this is the first qualification I have that qualifies me to teach.",
172+
visible: false
173+
end
174+
167175
def when_i_click_change_link_for_english_language_proficiency
168176
find_change_link_summary_list(
169177
:your_english_language_proficiency,

0 commit comments

Comments
 (0)