Skip to content

Commit

Permalink
more system test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
amtuannguyen committed Oct 22, 2024
1 parent ff778b2 commit 1760822
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/views/student_view/process/review.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<% end %>

<div class="bg-secondary-subtle p-2 fw-bold">
<%= 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 %>
</div>
</div>

Expand All @@ -83,7 +83,7 @@
</div>

<div class="bg-secondary-subtle p-2 fw-bold">
<%= 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 %>
</div>
</div>

Expand All @@ -105,7 +105,7 @@
</div>

<div class="bg-secondary-subtle p-2 fw-bold">
<%= 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 %>
</div>
</div>

Expand Down
10 changes: 9 additions & 1 deletion test/system/students_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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."


Expand All @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 1760822

Please sign in to comment.