From 17608226f734ea2048b976e73bb2973dd4225c8e Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Tue, 22 Oct 2024 09:02:18 -0400 Subject: [PATCH] more system test tweaks --- app/views/student_view/process/review.html.erb | 6 +++--- test/system/students_test.rb | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/views/student_view/process/review.html.erb b/app/views/student_view/process/review.html.erb index 7e5d27e..873f967 100644 --- a/app/views/student_view/process/review.html.erb +++ b/app/views/student_view/process/review.html.erb @@ -61,7 +61,7 @@ <% end %>
- <%= f.input :lac_licence_agreement, as: :boolean, input_html: {class: ""}, label: "I agree to and I have signed LAC Form" %> + <%= f.input :lac_licence_agreement, as: :boolean, input_html: {class: ""}, label: "I agree to and I have signed LAC Form", required: true %>
@@ -83,7 +83,7 @@
- <%= f.input :yorkspace_licence_agreement, as: :boolean, label: "I agree to YorkSpace Distribution Licence" %> + <%= f.input :yorkspace_licence_agreement, as: :boolean, label: "I agree to YorkSpace Distribution Licence", required: true %>
@@ -105,7 +105,7 @@
- <%= f.input :etd_licence_agreement, as: :boolean, label: "I agree to ETD Licence" %> + <%= f.input :etd_licence_agreement, as: :boolean, label: "I agree to ETD Licence", required: true %>
diff --git a/test/system/students_test.rb b/test/system/students_test.rb index 73496c5..2d13b71 100644 --- a/test/system/students_test.rb +++ b/test/system/students_test.rb @@ -297,6 +297,9 @@ class StudentsTest < ApplicationSystemTestCase checkbox = find('#thesis_lac_licence_agreement') assert_not checkbox.disabled? checkbox.check + + check('I agree to and I have signed LAC Form', allow_label_click: true) + assert checkbox.checked?, "#thesis_lac_licence_agreement checkbox is not checked." @@ -309,6 +312,9 @@ class StudentsTest < ApplicationSystemTestCase assert page.has_selector?('#thesis_yorkspace_licence_agreement', visible: true), "#thesis_yorkspace_licence_agreement not found." checkbox = find('#thesis_yorkspace_licence_agreement', visible: true) checkbox.check + + check('I agree to YorkSpace Distribution Licence', allow_label_click: true) + assert checkbox.checked?, "#thesis_yorkspace_licence_agreement checkbox is not checked." # ETD Licence @@ -319,7 +325,9 @@ class StudentsTest < ApplicationSystemTestCase assert page.has_selector?('#etd-licence', visible: true), "#etd-licence not found." assert page.has_selector?('#thesis_etd_licence_agreement', visible: true), "#thesis_etd_licence_agreement not found." checkbox = find('#thesis_etd_licence_agreement', visible: true) - checkbox.click + checkbox.check + + check('I agree to ETD Licence', allow_label_click: true) save_screenshot