diff --git a/app/views/committee_members/_committee_member.html.erb b/app/views/committee_members/_committee_member.html.erb index 9c2a586..d34fb89 100644 --- a/app/views/committee_members/_committee_member.html.erb +++ b/app/views/committee_members/_committee_member.html.erb @@ -3,7 +3,7 @@ <%= hidden_field_tag "committee_member_ids[]", committee_member.id %> <% if @thesis.id && can?(:destroy, committee_member) && @thesis.status != Thesis::PUBLISHED %> <%= link_to student_thesis_committee_member_path(@student, @thesis, committee_member), - method: :delete, class: "btn btn-close", remote: true, "title": "Remove #{committee_member.name} (#{committee_member.role})", "data-delete": "#{committee_member.name} (#{committee_member.role})" do %> + method: :delete, class: "btn btn-close", remote: true do %> Remove <%= "#{committee_member.name} (#{committee_member.role})" %> <% end %> <% end %> diff --git a/test/system/students_test.rb b/test/system/students_test.rb index 4443e4e..946812a 100644 --- a/test/system/students_test.rb +++ b/test/system/students_test.rb @@ -225,9 +225,6 @@ class StudentsTest < ApplicationSystemTestCase login_as(@thesis.student) visit root_url - # Set Page size - page.driver.browser.manage.window.resize_to(1920, 2500) - ## Page 1 click_link("My ETD Submission") assert_selector "input#student_email_external" @@ -343,9 +340,6 @@ class StudentsTest < ApplicationSystemTestCase login_as(@thesis.student) visit root_url - # Set Page size - page.driver.browser.manage.window.resize_to(1920, 2500) - ## Page 1 click_link("My ETD Submission") assert_selector "input#student_email_external" diff --git a/test/system/theses_test.rb b/test/system/theses_test.rb index 35b2c11..797fe64 100644 --- a/test/system/theses_test.rb +++ b/test/system/theses_test.rb @@ -70,19 +70,37 @@ class ThesesTest < ApplicationSystemTestCase visit root_url click_link(@thesis_01.title) click_on('Make Changes') + click_on('Add committee member') - - fill_in('First Name', with: 'test1') - fill_in('Last Name', with: 'test2') + fill_in('First Name', with: 'f1') + fill_in('Last Name', with: 'l1') choose('Committee Member') click_on('Add') - assert_selector 'span', text: 'test2, test1' + assert_selector 'span', text: 'l1, f1' - assert_selector 'a[data-delete="test2, test1 (Committee Member)"]', visible: true - - click_link('Remove test2, test1 (Committee Member)') + click_on('Add committee member') + fill_in('First Name', with: 'f2') + fill_in('Last Name', with: 'l2') + choose('Chair') + click_on('Add') + assert_selector 'span', text: 'l2, f2' + + remove1 = 'Remove l1, f1 (Committee Member)' + remove2 = 'Remove l2, f2 (Chair)' + + assert has_link?(remove1) + assert has_link?(remove2) + + pp find_link(remove1).rect + + click_link(remove1) + + assert_no_selector 'span', text: 'l1, f1' + assert_no_link(remove1) + + assert_selector 'span', text: 'l2, f2' - assert_no_selector 'span', text: 'test2, test1' + assert has_link?(remove2) end test 'Edit a thesis' do