Skip to content

Commit de1fec4

Browse files
authored
Merge pull request #2610 from mroderick/fix/flaky-tests
Fix: Flaky tests in CI
2 parents e764d98 + 8022f08 commit de1fec4

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

spec/features/admin/manage_workshop_attendances_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
scenario 'can remove a member from the attendee list' do
2626
visit admin_workshop_path(workshop)
27+
expect(page).to have_css('.cancel_attendance', wait: 5)
2728
find('.cancel_attendance').click
2829

2930
expect(page).to have_content('0 are attending as students')

spec/features/listing_coaches_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
RSpec.feature 'when visiting the coaches page', type: :feature do
22
scenario 'I can see the most active coaches' do
3-
coach = Fabricate(:attended_coach).member
3+
# Use a past workshop date in the current year to ensure the coach is counted
4+
workshop = Fabricate(:workshop, date_and_time: Time.zone.today.beginning_of_year + 1.month)
5+
coach = Fabricate(:attended_coach, workshop: workshop).member
46
visit coaches_path
5-
expect(page).to have_content coach.name
7+
expect(page).to have_content(coach.name, wait: 5)
68
end
79

810
scenario 'I can see the top coaches by year' do

0 commit comments

Comments
 (0)