Skip to content

Commit

Permalink
Issue was CSS changed H3 to uppercase but system test was looking for…
Browse files Browse the repository at this point in the history
… sentence case. Updated systests
  • Loading branch information
asadaqain committed Jul 18, 2024
1 parent 7b5e675 commit adea974
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions test/system/students_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class StudentsTest < ApplicationSystemTestCase
login_as(@thesis.student)
visit root_url
click_link("My ETD Submission")
assert_selector "h3", text: "Hello #{@thesis.student.first_name}"
assert_text(/#{Regexp.escape("Hello #{@thesis.student.first_name}")}/i)
assert_selector "h6", text: "Email", visible: :all
assert_selector "p", text: "#{@thesis.student.email}", visible: :all
end
Expand All @@ -49,7 +49,7 @@ class StudentsTest < ApplicationSystemTestCase
login_as(@thesis.student)
visit root_url
click_link("My ETD Submission")
assert_selector "h3", text: "Hello #{@thesis.student.first_name}"
assert_text(/#{Regexp.escape("Hello #{@thesis.student.first_name}")}/i)
assert_no_selector "input#student_first_name"
assert_no_selector "input#student_middle_name"
assert_no_selector "input#student_last_name"
Expand Down Expand Up @@ -159,7 +159,9 @@ class StudentsTest < ApplicationSystemTestCase

## Page 4

assert_text "LAC Supplementary Licence File Upload"
# assert_text "LAC Supplementary Licence File Upload".upcase
assert_text(/#{Regexp.escape("LAC Supplementary Licence File Upload")}/i)


# Initially, checkboxes should be disabled if not checked
assert page.has_unchecked_field?('thesis_yorkspace_licence_agreement', disabled: true)
Expand Down
4 changes: 2 additions & 2 deletions test/system/theses_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class ThesesTest < ApplicationSystemTestCase

test 'Check thesis Under review and Overview on nav-tabs' do
visit root_url
assert_selector 'h3', text: @thesis_01.title
assert_selector 'h3', text: (/#{Regexp.escape("#{@thesis_01.title}")}/i)
click_link(@thesis_01.title)
click_link('Overview')
click_link('Under Review')
assert_selector 'h3', text: @thesis_02.title
assert_selector 'h3', text: (/#{Regexp.escape("#{@thesis_02.title}")}/i)
click_link(@thesis_02.title)
end

Expand Down

0 comments on commit adea974

Please sign in to comment.