Merge pull request #3441 from openSUSE/depfu/update/rubocop-capybara-2.21.0

Update rubocop-capybara 2.20.0 → 2.21.0 (minor)
This commit is contained in:
Henne Vogelsang 2024-12-02 12:32:00 +01:00 committed by GitHub
commit 38c9247a4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 71 additions and 72 deletions

View file

@ -250,7 +250,7 @@ GEM
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
json (2.7.2)
json (2.8.2)
json-schema (4.3.0)
addressable (>= 2.8)
jsonapi-renderer (0.2.2)
@ -360,7 +360,7 @@ GEM
activerecord (>= 6.1)
request_store (~> 1.4)
parallel (1.26.3)
parser (3.3.5.0)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
pdf-core (0.10.0)
@ -438,7 +438,7 @@ GEM
rake (13.2.1)
recaptcha (5.17.0)
redcarpet (3.6.0)
regexp_parser (2.9.2)
regexp_parser (2.9.3)
request_store (1.7.0)
rack (>= 1.4)
responders (3.1.1)
@ -471,19 +471,19 @@ GEM
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
rubocop (1.66.1)
rubocop (1.69.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
rubocop-ast (>= 1.36.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
parser (>= 3.3.1.0)
rubocop-capybara (2.20.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
@ -575,7 +575,9 @@ GEM
concurrent-ruby (~> 1.0)
uglifier (4.2.1)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.6.0)
unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
unobtrusive_flash (3.3.1)
railties
uri (0.13.0)

View file

@ -156,7 +156,7 @@ class Conference < ApplicationRecord
def get_submissions_per_week
result = []
if program&.cfp && program&.events
if program&.cfp && program.events
submissions = program.events.select(:week).group(:week).order(:week).count
start_week = program.cfp.start_week
weeks = program.cfp.weeks
@ -172,7 +172,7 @@ class Conference < ApplicationRecord
# ====Returns
# * +Array+ -> e.g. 'Submitted' => [0, 3, 3, 5] -> first week 0 events, second week 3 events.
def get_submissions_data
return [] unless program&.cfp && program&.events
return [] unless program&.cfp && program.events
start_week = program.cfp.start_week
get_events_per_week_by_state.collect do |state, values|
@ -196,10 +196,7 @@ class Conference < ApplicationRecord
# ====Returns
# * +Array+ -> e.g. [0, 3, 3, 5] -> first week 0, second week 3 registrations
def get_registrations_per_week
return [] unless registrations &&
registration_period &&
registration_period.start_date &&
registration_period.end_date
return [] unless registrations && registration_period&.start_date && registration_period.end_date
reg = registrations.group(:week).order(:week).count
start_week = get_registration_start_week
@ -265,7 +262,7 @@ class Conference < ApplicationRecord
result = 0
weeks = 0
if registration_period&.start_date &&
registration_period&.end_date
registration_period.end_date
weeks = Date.new(registration_period.start_date.year, 12, 31)
.strftime('%W').to_i

View file

@ -82,13 +82,13 @@ class EventSchedule < ApplicationRecord
end
def start_after_end_hour
return unless event && start_time && event.program && event.program.conference && event.program.conference.end_hour
return unless event && start_time && event.program&.conference && event.program.conference.end_hour
errors.add(:start_time, "can't be after the conference end hour (#{event.program.conference.end_hour})") if start_time.hour >= event.program.conference.end_hour
end
def start_before_start_hour
return unless event && start_time && event.program && event.program.conference && event.program.conference.start_hour
return unless event && start_time && event.program&.conference && event.program.conference.start_hour
errors.add(:start_time, "can't be before the conference start hour (#{event.program.conference.start_hour})") if start_time.hour < event.program.conference.start_hour
end

View file

@ -18,11 +18,11 @@ feature 'Has correct abilities' do
expect(current_path).to eq(admin_conference_path(conference.short_title))
expect(page).to have_selector('li.nav-header.nav-header-bigger a', text: 'Dashboard')
expect(page).to_not have_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit")
expect(page).to have_no_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit")
expect(page).to have_text('Basics')
expect(page).to_not have_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit")
expect(page).to have_no_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit")
expect(page).to have_link('Commercials', href: "/admin/conferences/#{conference.short_title}/commercials")
expect(page).to_not have_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage")
expect(page).to have_no_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage")
expect(page).to have_link('Venue', href: "/admin/conferences/#{conference.short_title}/venue")
expect(page).to have_link('Rooms', href: "/admin/conferences/#{conference.short_title}/venue/rooms")
expect(page).to have_link('Program', href: "/admin/conferences/#{conference.short_title}/program")
@ -33,18 +33,18 @@ feature 'Has correct abilities' do
expect(page).to have_link('Difficulty Levels', href: "/admin/conferences/#{conference.short_title}/program/difficulty_levels")
expect(page).to have_link('Schedules', href: "/admin/conferences/#{conference.short_title}/schedules")
expect(page).to have_link('Reports', href: "/admin/conferences/#{conference.short_title}/program/reports")
expect(page).to_not have_link('Registrations', href: "/admin/conferences/#{conference.short_title}/registrations")
expect(page).to_not have_link('Questions', href: "/admin/conferences/#{conference.short_title}/questions")
expect(page).to have_no_link('Registrations', href: "/admin/conferences/#{conference.short_title}/registrations")
expect(page).to have_no_link('Questions', href: "/admin/conferences/#{conference.short_title}/questions")
expect(page).to have_link('E-Mails', href: "/admin/conferences/#{conference.short_title}/emails")
expect(page).to_not have_link('Lodgings', href: "/admin/conferences/#{conference.short_title}/lodgings")
expect(page).to_not have_link('Registration Period', href: "/admin/conferences/#{conference.short_title}/registration_period")
expect(page).to_not have_text('Donations')
expect(page).to_not have_link('Sponsorship Levels', href: "/admin/conferences/#{conference.short_title}/sponsorship_levels")
expect(page).to_not have_link('Sponsors', href: "/admin/conferences/#{conference.short_title}/sponsors")
expect(page).to_not have_link('Tickets', href: "/admin/conferences/#{conference.short_title}/tickets")
expect(page).to have_no_link('Lodgings', href: "/admin/conferences/#{conference.short_title}/lodgings")
expect(page).to have_no_link('Registration Period', href: "/admin/conferences/#{conference.short_title}/registration_period")
expect(page).to have_no_text('Donations')
expect(page).to have_no_link('Sponsorship Levels', href: "/admin/conferences/#{conference.short_title}/sponsorship_levels")
expect(page).to have_no_link('Sponsors', href: "/admin/conferences/#{conference.short_title}/sponsors")
expect(page).to have_no_link('Tickets', href: "/admin/conferences/#{conference.short_title}/tickets")
expect(page).to have_link('Roles', href: "/admin/conferences/#{conference.short_title}/roles")
expect(page).to have_link('Resources', href: "/admin/conferences/#{conference.short_title}/resources")
expect(page).to_not have_link('New Conference', href: '/admin/conferences/new')
expect(page).to have_no_link('New Conference', href: '/admin/conferences/new')
visit admin_conference_venue_rooms_path(conference.short_title)
expect(current_path).to eq(admin_conference_venue_rooms_path(conference.short_title))

View file

@ -17,34 +17,34 @@ feature 'Has correct abilities' do
visit admin_conference_path(conference.short_title)
expect(current_path).to eq(admin_conference_path(conference.short_title))
expect(page).to_not have_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit")
expect(page).to have_no_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit")
expect(page).to have_text('Basics')
expect(page).to_not have_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit")
expect(page).to have_no_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit")
expect(page).to have_link('Commercials', href: "/admin/conferences/#{conference.short_title}/commercials")
expect(page).to_not have_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage")
expect(page).to_not have_link('Lodgings', href: "/admin/conferences/#{conference.short_title}/lodgings")
expect(page).to_not have_link('Registration Period', href: "/admin/conferences/#{conference.short_title}/registration_period")
expect(page).to_not have_text('Donations')
expect(page).to_not have_link('Sponsorship Levels', href: "/admin/conferences/#{conference.short_title}/sponsorship_levels")
expect(page).to_not have_link('Sponsors', href: "/admin/conferences/#{conference.short_title}/sponsors")
expect(page).to_not have_link('Tickets', href: "/admin/conferences/#{conference.short_title}/tickets")
expect(page).to have_no_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage")
expect(page).to have_no_link('Lodgings', href: "/admin/conferences/#{conference.short_title}/lodgings")
expect(page).to have_no_link('Registration Period', href: "/admin/conferences/#{conference.short_title}/registration_period")
expect(page).to have_no_text('Donations')
expect(page).to have_no_link('Sponsorship Levels', href: "/admin/conferences/#{conference.short_title}/sponsorship_levels")
expect(page).to have_no_link('Sponsors', href: "/admin/conferences/#{conference.short_title}/sponsors")
expect(page).to have_no_link('Tickets', href: "/admin/conferences/#{conference.short_title}/tickets")
expect(page).to have_link('Roles', href: "/admin/conferences/#{conference.short_title}/roles")
expect(page).to have_link('Resources', href: "/admin/conferences/#{conference.short_title}/resources")
expect(page).to have_selector('li.nav-header.nav-header-bigger a', text: 'Dashboard')
expect(page).to_not have_link('Venue', href: "/admin/conferences/#{conference.short_title}/venue")
expect(page).to_not have_link('Rooms', href: "/admin/conferences/#{conference.short_title}/venue/rooms")
expect(page).to_not have_link('Program', href: "/admin/conferences/#{conference.short_title}/program")
expect(page).to_not have_link('Call for Papers', href: "/admin/conferences/#{conference.short_title}/program/cfps")
expect(page).to_not have_link('Events', href: "/admin/conferences/#{conference.short_title}/program/events")
expect(page).to_not have_link('Tracks', href: "/admin/conferences/#{conference.short_title}/program/tracks")
expect(page).to_not have_link('Event Types', href: "/admin/conferences/#{conference.short_title}/program/event_types")
expect(page).to_not have_link('Difficulty Levels', href: "/admin/conferences/#{conference.short_title}/program/difficulty_levels")
expect(page).to_not have_link('Schedules', href: "/admin/conferences/#{conference.short_title}/schedules")
expect(page).to_not have_link('Reports', href: "/admin/conferences/#{conference.short_title}/program/reports")
expect(page).to have_no_link('Venue', href: "/admin/conferences/#{conference.short_title}/venue")
expect(page).to have_no_link('Rooms', href: "/admin/conferences/#{conference.short_title}/venue/rooms")
expect(page).to have_no_link('Program', href: "/admin/conferences/#{conference.short_title}/program")
expect(page).to have_no_link('Call for Papers', href: "/admin/conferences/#{conference.short_title}/program/cfps")
expect(page).to have_no_link('Events', href: "/admin/conferences/#{conference.short_title}/program/events")
expect(page).to have_no_link('Tracks', href: "/admin/conferences/#{conference.short_title}/program/tracks")
expect(page).to have_no_link('Event Types', href: "/admin/conferences/#{conference.short_title}/program/event_types")
expect(page).to have_no_link('Difficulty Levels', href: "/admin/conferences/#{conference.short_title}/program/difficulty_levels")
expect(page).to have_no_link('Schedules', href: "/admin/conferences/#{conference.short_title}/schedules")
expect(page).to have_no_link('Reports', href: "/admin/conferences/#{conference.short_title}/program/reports")
expect(page).to have_link('Registrations', href: "/admin/conferences/#{conference.short_title}/registrations")
expect(page).to have_link('Questions', href: "/admin/conferences/#{conference.short_title}/questions")
expect(page).to_not have_link('E-Mails', href: "/admin/conferences/#{conference.short_title}/emails")
expect(page).to_not have_link('New Conference', href: '/admin/conferences/new')
expect(page).to have_no_link('E-Mails', href: "/admin/conferences/#{conference.short_title}/emails")
expect(page).to have_no_link('New Conference', href: '/admin/conferences/new')
visit edit_admin_conference_path(conference.short_title)
expect(current_path).to eq(root_path)

View file

@ -46,7 +46,7 @@ feature 'Has correct abilities' do
expect(page).to have_link('E-Mails', href: "/admin/conferences/#{conference.short_title}/emails")
expect(page).to have_link('Roles', href: "/admin/conferences/#{conference.short_title}/roles")
expect(page).to have_link('Resources', href: "/admin/conferences/#{conference.short_title}/resources")
expect(page).to_not have_link('New Conference', href: '/admin/conferences/new')
expect(page).to have_no_link('New Conference', href: '/admin/conferences/new')
visit admin_conference_path(other_conference.short_title)
expect(page).to have_link('Add venue', href: "/admin/conferences/#{other_conference.short_title}/venue/new")

View file

@ -47,7 +47,7 @@ feature Sponsor do
end
page.find('#flash')
expect(flash).to eq('Sponsor successfully deleted.')
expect(page).to_not have_selector('table#sponsors')
expect(page).to have_no_selector('table#sponsors')
end
end

View file

@ -19,33 +19,33 @@ feature 'Has correct abilities' do
expect(current_path).to eq(admin_conference_path(conference.short_title))
expect(page).to have_selector('li.nav-header.nav-header-bigger a', text: 'Dashboard')
expect(page).to_not have_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit")
expect(page).to have_no_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit")
expect(page).to have_text('Basics')
expect(page).to_not have_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit")
expect(page).to have_no_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit")
expect(page).to have_link('Commercials', href: "/admin/conferences/#{conference.short_title}/commercials")
expect(page).to_not have_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage")
expect(page).to_not have_link('Venue', href: "/admin/conferences/#{conference.short_title}/venue")
expect(page).to_not have_link('Rooms', href: "/admin/conferences/#{conference.short_title}/venue/rooms")
expect(page).to_not have_link('Lodgings', href: "/admin/conferences/#{conference.short_title}/lodgings")
expect(page).to have_no_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage")
expect(page).to have_no_link('Venue', href: "/admin/conferences/#{conference.short_title}/venue")
expect(page).to have_no_link('Rooms', href: "/admin/conferences/#{conference.short_title}/venue/rooms")
expect(page).to have_no_link('Lodgings', href: "/admin/conferences/#{conference.short_title}/lodgings")
expect(page).to have_link('Program', href: "/admin/conferences/#{conference.short_title}/program")
expect(page).to_not have_link('Call for Papers', href: "/admin/conferences/#{conference.short_title}/program/cfps")
expect(page).to have_no_link('Call for Papers', href: "/admin/conferences/#{conference.short_title}/program/cfps")
expect(page).to have_link('Events', href: "/admin/conferences/#{conference.short_title}/program/events")
expect(page).to have_link('Tracks', href: "/admin/conferences/#{conference.short_title}/program/tracks")
expect(page).to_not have_link('Event Types', href: "/admin/conferences/#{conference.short_title}/program/event_types")
expect(page).to_not have_link('Difficulty Levels', href: "/admin/conferences/#{conference.short_title}/program/difficulty_levels")
expect(page).to have_no_link('Event Types', href: "/admin/conferences/#{conference.short_title}/program/event_types")
expect(page).to have_no_link('Difficulty Levels', href: "/admin/conferences/#{conference.short_title}/program/difficulty_levels")
expect(page).to have_link('Schedules', href: "/admin/conferences/#{conference.short_title}/schedules")
expect(page).to have_link('Reports', href: "/admin/conferences/#{conference.short_title}/program/reports")
expect(page).to_not have_link('Registrations', href: "/admin/conferences/#{conference.short_title}/registrations")
expect(page).to_not have_link('Registration Period', href: "/admin/conferences/#{conference.short_title}/registration_period")
expect(page).to_not have_link('Questions', href: "/admin/conferences/#{conference.short_title}/questions")
expect(page).to_not have_text('Donations')
expect(page).to_not have_link('Sponsorship Levels', href: "/admin/conferences/#{conference.short_title}/sponsorship_levels")
expect(page).to_not have_link('Sponsors', href: "/admin/conferences/#{conference.short_title}/sponsors")
expect(page).to_not have_link('Tickets', href: "/admin/conferences/#{conference.short_title}/tickets")
expect(page).to_not have_link('E-Mails', href: "/admin/conferences/#{conference.short_title}/emails")
expect(page).to have_no_link('Registrations', href: "/admin/conferences/#{conference.short_title}/registrations")
expect(page).to have_no_link('Registration Period', href: "/admin/conferences/#{conference.short_title}/registration_period")
expect(page).to have_no_link('Questions', href: "/admin/conferences/#{conference.short_title}/questions")
expect(page).to have_no_text('Donations')
expect(page).to have_no_link('Sponsorship Levels', href: "/admin/conferences/#{conference.short_title}/sponsorship_levels")
expect(page).to have_no_link('Sponsors', href: "/admin/conferences/#{conference.short_title}/sponsors")
expect(page).to have_no_link('Tickets', href: "/admin/conferences/#{conference.short_title}/tickets")
expect(page).to have_no_link('E-Mails', href: "/admin/conferences/#{conference.short_title}/emails")
expect(page).to have_link('Roles', href: "/admin/conferences/#{conference.short_title}/roles")
expect(page).to_not have_link('Resources', href: "/admin/conferences/#{conference.short_title}/resources")
expect(page).to_not have_link('New Conference', href: '/admin/conferences/new')
expect(page).to have_no_link('Resources', href: "/admin/conferences/#{conference.short_title}/resources")
expect(page).to have_no_link('New Conference', href: '/admin/conferences/new')
visit edit_admin_conference_path(conference.short_title)
expect(current_path).to eq root_path