Skip to content

Commit c14573b

Browse files
authored
Merge pull request #2254 from davidmillen50/fix-failing-integration-tests
fix: failing integration tests
2 parents 5850edd + 413f004 commit c14573b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

spec/features/admin/manage_workshop_attendances_spec.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,18 @@
5050
expect(page).to have_content('1 are attending as students')
5151
expect(page).to_not have_selector('i.fa-magic')
5252

53-
find('span', text: 'Select a member to RSVP').click
54-
find("li", text: "#{other_invitation.member.full_name} (#{other_invitation.role})").click
53+
dropdown_text = 'Select a member to RSVP'
54+
dropdown = find('span', text: dropdown_text, visible: true)
55+
if dropdown.visible?
56+
begin
57+
dropdown.click
58+
rescue Selenium::WebDriver::Error::ElementClickInterceptedError
59+
puts "Dropdown is visible but cannot be clicked."
60+
end
61+
end
62+
63+
find('span', text: dropdown_text).click
64+
find('li', text: "#{other_invitation.member.full_name} (#{other_invitation.role})", visible: true).click
5565

5666
expect(page).to have_content('2 are attending as students')
5767

spec/features/member_feedback_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,12 @@
6161
context 'Submitting a feedback request' do
6262
scenario 'I can see success page with message and link to homepage when valid data is given', js: true do
6363
visit feedback_path(valid_token)
64-
6564
within('.rating') { all('li').at(3).click }
6665
select_from_chosen(coach.full_name, from: 'feedback_coach_id')
6766
select_from_chosen(@tutorial.title, from: 'feedback_tutorial_id')
6867
click_button('Submit feedback')
6968

70-
expect(current_path).to eq(root_path)
69+
expect(page).to have_current_path(root_path)
7170

7271
expect(page).to have_content(feedback_submited_message)
7372
end

0 commit comments

Comments
 (0)