Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 9 additions & 130 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,133 +1,30 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit`
# on 2026-07-28 06:52:06 UTC using RuboCop version 1.88.2.
# on 2026-07-28 07:06:57 UTC using RuboCop version 1.88.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 17
# This cop supports safe autocorrection (--autocorrect).
Capybara/RSpec/CurrentPathExpectation:
Exclude:
- 'spec/features/admin/workshops_spec.rb'
- 'spec/features/member_feedback_spec.rb'
- 'spec/features/view_event_spec.rb'
- 'spec/support/shared_examples/behaves_like_an_invitation_route.rb'

# Offense count: 339
# This cop supports safe autocorrection (--autocorrect).
Capybara/RSpec/HaveContent:
Exclude:
- 'spec/components/event_card_component_spec.rb'
- 'spec/features/accepting_invitation_spec.rb'
- 'spec/features/accepting_terms_and_conditions_spec.rb'
- 'spec/features/admin/accessing_portal_spec.rb'
- 'spec/features/admin/add_user_to_workshop_spec.rb'
- 'spec/features/admin/announcements_spec.rb'
- 'spec/features/admin/chapter/feedback_spec.rb'
- 'spec/features/admin/chapters_spec.rb'
- 'spec/features/admin/event_spec.rb'
- 'spec/features/admin/feedback_spec.rb'
- 'spec/features/admin/filtering_sponsors_list_spec.rb'
- 'spec/features/admin/groups_spec.rb'
- 'spec/features/admin/manage_event_spec.rb'
- 'spec/features/admin/manage_sponsor_spec.rb'
- 'spec/features/admin/manage_workshop_attendances_spec.rb'
- 'spec/features/admin/managing_meeting_invitations_spec.rb'
- 'spec/features/admin/managing_organisers_spec.rb'
- 'spec/features/admin/managing_testimonials_spec.rb'
- 'spec/features/admin/meeting_spec.rb'
- 'spec/features/admin/member_search_spec.rb'
- 'spec/features/admin/members_spec.rb'
- 'spec/features/admin/sponsor_spec.rb'
- 'spec/features/admin/tom_select_member_lookup_spec.rb'
- 'spec/features/admin/workshops_spec.rb'
- 'spec/features/chapter_spec.rb'
- 'spec/features/internationalization_spec.rb'
- 'spec/features/listing_coaches_spec.rb'
- 'spec/features/listing_events_spec.rb'
- 'spec/features/manage_contact_preferences_spec.rb'
- 'spec/features/member/login_spec.rb'
- 'spec/features/member_feedback_spec.rb'
- 'spec/features/member_joining_spec.rb'
- 'spec/features/member_portal_spec.rb'
- 'spec/features/member_updating_details_spec.rb'
- 'spec/features/subscribing_to_emails_spec.rb'
- 'spec/features/subscribing_to_newsletter_spec.rb'
- 'spec/features/view_event_spec.rb'
- 'spec/features/viewing_a_meeting_spec.rb'
- 'spec/features/viewing_a_workshop_invitation_spec.rb'
- 'spec/features/viewing_a_workshop_spec.rb'
- 'spec/features/viewing_pages_spec.rb'
- 'spec/features/visiting_homepage_spec.rb'
- 'spec/support/shared_examples/behaves_like_an_invitation_route.rb'
- 'spec/support/shared_examples/behaves_like_managing_workshop_attendance.rb'
- 'spec/support/shared_examples/behaves_like_viewing_workshop_actions.rb'
- 'spec/support/shared_examples/behaves_like_viewing_workshop_details.rb'

# Offense count: 21
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: DefaultSelector.
Capybara/RSpec/HaveSelector:
Exclude:
- 'spec/features/admin/manage_workshop_attendances_spec.rb'
- 'spec/features/admin/members_spec.rb'
- 'spec/features/listing_events_spec.rb'
- 'spec/features/member_feedback_spec.rb'
- 'spec/features/member_joining_spec.rb'
- 'spec/features/member_portal_spec.rb'
- 'spec/features/member_updating_details_spec.rb'
- 'spec/support/shared_examples/behaves_like_an_invitation_route.rb'
- 'spec/views/dashboard/show.html.haml_spec.rb'

# Offense count: 49
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: have_no, not_to
Capybara/RSpec/NegationMatcher:
# Offense count: 4
Capybara/RSpec/NegationMatcherAfterVisit:
Exclude:
- 'spec/components/event_card_component_spec.rb'
- 'spec/features/accepting_invitation_spec.rb'
- 'spec/features/accepting_terms_and_conditions_spec.rb'
- 'spec/features/admin/accessing_portal_spec.rb'
- 'spec/features/admin/announcements_spec.rb'
- 'spec/features/admin/chapter/feedback_spec.rb'
- 'spec/features/admin/chapters_spec.rb'
- 'spec/features/admin/manage_workshop_attendances_spec.rb'
- 'spec/features/admin/managing_organisers_spec.rb'
- 'spec/features/admin/meeting_spec.rb'
- 'spec/features/admin/sponsor_spec.rb'
- 'spec/features/admin/tom_select_member_lookup_spec.rb'
- 'spec/features/admin/workshops_spec.rb'
- 'spec/features/chapter_spec.rb'
- 'spec/features/member_portal_spec.rb'
- 'spec/features/sponsors_spec.rb'
- 'spec/features/view_event_spec.rb'
- 'spec/features/viewing_a_workshop_invitation_spec.rb'
- 'spec/features/visiting_homepage_spec.rb'
- 'spec/support/shared_examples/behaves_like_an_invitation_route.rb'
- 'spec/support/shared_examples/behaves_like_managing_workshop_attendance.rb'
- 'spec/support/shared_examples/behaves_link_member_viewing_workshop.rb'

# Offense count: 1
Capybara/RSpec/NegationMatcherAfterVisit:
Exclude:
- 'spec/features/admin/chapters_spec.rb'

# Offense count: 1
Capybara/RSpec/VisibilityMatcher:
Exclude:
- 'spec/components/chapters_sidebar_component_spec.rb'

# Offense count: 6
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Capybara/SpecificFinders:
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
Layout/ArgumentAlignment:
Exclude:
- 'spec/features/admin/tom_select_member_lookup_spec.rb'
- 'spec/features/member_feedback_spec.rb'
- 'spec/features/member_joining_spec.rb'
- 'spec/features/subscribing_to_newsletter_spec.rb'
- 'spec/features/member_portal_spec.rb'

# Offense count: 14
# This cop supports safe autocorrection (--autocorrect).
Expand Down Expand Up @@ -258,14 +155,6 @@ Lint/UnusedBlockArgument:
- 'spec/fabricators/member_fabricator.rb'
- 'spec/fabricators/sponsor_fabricator.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
# NotImplementedExceptions: NotImplementedError
Lint/UnusedMethodArgument:
Exclude:
- 'spec/support/select_from_tom_select.rb'

# Offense count: 9
# This cop supports safe autocorrection (--autocorrect).
Lint/UselessAssignment:
Expand Down Expand Up @@ -874,21 +763,12 @@ RSpec/NamedSubject:
- 'spec/policies/testimonial_policy_spec.rb'
- 'spec/policies/workshop_policy_spec.rb'

# Offense count: 42
# Offense count: 21
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: not_to, to_not
RSpec/NotToNot:
Exclude:
- 'spec/features/admin/accessing_portal_spec.rb'
- 'spec/features/admin/chapter/feedback_spec.rb'
- 'spec/features/admin/manage_workshop_attendances_spec.rb'
- 'spec/features/admin/managing_organisers_spec.rb'
- 'spec/features/admin/sponsor_spec.rb'
- 'spec/features/member_portal_spec.rb'
- 'spec/features/sponsors_spec.rb'
- 'spec/features/view_event_spec.rb'
- 'spec/features/viewing_a_workshop_invitation_spec.rb'
- 'spec/lib/tasks/mailing_list_rake_spec.rb'
- 'spec/models/ban_spec.rb'
- 'spec/models/event_spec.rb'
Expand All @@ -898,7 +778,6 @@ RSpec/NotToNot:
- 'spec/models/tutorial_spec.rb'
- 'spec/support/shared_examples/behaves_like_an_invitation_route.rb'
- 'spec/support/shared_examples/behaves_like_invitable.rb'
- 'spec/support/shared_examples/behaves_link_member_viewing_workshop.rb'

# Offense count: 4
RSpec/RepeatedExample:
Expand Down
8 changes: 4 additions & 4 deletions spec/components/event_card_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
render_inline(described_class.new(event_card: presenter))
expect(page).to have_css("[data-test='event']")
expect(page).to have_link(presenter.to_s)
expect(page).to have_content(presenter.date)
expect(page).to have_text(presenter.date)
end

it "does not render user-specific badges without a user" do
render_inline(described_class.new(event_card: presenter))
expect(page).not_to have_text("Attending")
expect(page).not_to have_text("Manage")
expect(page).to have_no_text("Attending")
expect(page).to have_no_text("Manage")
end

it "renders chapter badge" do
Expand All @@ -46,7 +46,7 @@
it "does not render sponsor logos for meetings" do
render_inline(described_class.new(event_card: presenter))
# Venue image has sponsor-sm class, so check for mx-1 spacing (used only by sponsors)
expect(page).not_to have_css(".mx-1")
expect(page).to have_no_css(".mx-1")
end
end

Expand Down
16 changes: 8 additions & 8 deletions spec/features/accepting_invitation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

visit invitation_route

expect(page).to have_content('The workshop is full')
expect(page).to have_text('The workshop is full')
expect(page).to have_button('Join the waiting list')
expect(page).not_to have_button('Attend')
expect(page).to have_no_button('Attend')
end
end

Expand All @@ -41,7 +41,7 @@
visit invitation_route
click_on 'Attend'

expect(page).to have_content('RSVPs for this workshop are now closed.')
expect(page).to have_text('RSVPs for this workshop are now closed.')
expect(invitation.reload.attending).not_to be(true)
end
end
Expand All @@ -54,7 +54,7 @@

click_on 'Attend'

expect(page).to have_content('Tutorial must be selected')
expect(page).to have_text('Tutorial must be selected')
end

scenario 'with an accepted invitation can edit the tutorial' do
Expand All @@ -64,7 +64,7 @@
select tutorial.title, from: :workshop_invitation_tutorial
click_on 'Update'

expect(page).to have_content('Invitation details successfully updated.')
expect(page).to have_text('Invitation details successfully updated.')
end
end

Expand All @@ -77,7 +77,7 @@

click_on 'Attend'

expect(page).to have_content("Thanks for getting back to us #{member.name}. See you at the workshop!")
expect(page).to have_text("Thanks for getting back to us #{member.name}. See you at the workshop!")
expect(page).to have_field('workshop_invitation_note', with: '')
end

Expand All @@ -87,7 +87,7 @@
fill_in 'Note', with: note
click_on 'Attend'

expect(page).to have_content("Thanks for getting back to us #{member.name}. See you at the workshop!")
expect(page).to have_text("Thanks for getting back to us #{member.name}. See you at the workshop!")
expect(page).to have_field('workshop_invitation_note', with: note)
end

Expand All @@ -102,7 +102,7 @@
click_on 'Update note'

expect(page).to have_field('workshop_invitation_note', with: note)
expect(page).to have_content("Invitation details successfully updated.")
expect(page).to have_text("Invitation details successfully updated.")
end
end
end
Expand Down
14 changes: 7 additions & 7 deletions spec/features/accepting_terms_and_conditions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

click_on 'Accept'
expect(page).to have_current_path(terms_and_conditions_path)
expect(page).to have_content('You have to accept the Terms and Conditions before you are able to proceed.')
expect(page).to have_text('You have to accept the Terms and Conditions before you are able to proceed.')
end

scenario 'they can read the Code of Conduct before accepting the ToCs', :js do
Expand All @@ -26,9 +26,9 @@
# When clicking a link that opens a new window/tab
new_window = window_opened_by { click_on I18n.t('terms_and_conditions.link_text') }
within_window new_window do
expect(page).to have_content(I18n.t('code_of_conduct.title'))
expect(page).to have_content(I18n.t('code_of_conduct.summary.title'))
expect(page).to have_content(I18n.t('code_of_conduct.content.title'))
expect(page).to have_text(I18n.t('code_of_conduct.title'))
expect(page).to have_text(I18n.t('code_of_conduct.summary.title'))
expect(page).to have_text(I18n.t('code_of_conduct.content.title'))
end
end

Expand Down Expand Up @@ -74,8 +74,8 @@

visit terms_and_conditions_path
expect(page).to have_current_path(terms_and_conditions_path)
expect(page).to have_content(/already accepted.*#{member.accepted_toc_at.strftime('%d %B %Y')}/)
expect(page).not_to have_button('Accept')
expect(page).to have_text(/already accepted.*#{member.accepted_toc_at.strftime('%d %B %Y')}/)
expect(page).to have_no_button('Accept')
end
end
end
Expand All @@ -84,7 +84,7 @@
scenario 'they see a login prompt and cannot accept the ToCs' do
visit terms_and_conditions_path

expect(page).to have_content('Please log in to accept our Code of Conduct.')
expect(page).to have_text('Please log in to accept our Code of Conduct.')
expect(page).to have_link('Log in with GitHub')
end

Expand Down
8 changes: 4 additions & 4 deletions spec/features/admin/accessing_portal_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
visit admin_root_path

chapter.groups.each do |group|
expect(page).to have_content(group.to_s)
expect(page).to have_text(group.to_s)
end

inactive_chapter.groups.each do |group|
expect(page).to_not have_content(group.to_s)
expect(page).to have_no_text(group.to_s)
end
end

scenario 'can access sponsor contacts' do
visit admin_root_path
click_on 'Sponsor contacts'

expect(page).to have_content('Contacts')
expect(page).to have_content('Sponsor Contact name Contact email Mailing list')
expect(page).to have_text('Contacts')
expect(page).to have_text('Sponsor Contact name Contact email Mailing list')
end
end
end
2 changes: 1 addition & 1 deletion spec/features/admin/add_user_to_workshop_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
click_on 'Search'
expect(page).to have_current_path('/admin/member-search/index', ignore_query: true)

expect(page).to have_content('Romeo Montague')
expect(page).to have_text('Romeo Montague')
expect(page).to have_unchecked_field('Romeo Montague')
check('Romeo Montague')
click_button 'Take me back'
Expand Down
Loading