Autocorrect

- Lint/SafeNavigationConsistency
- Capybara/NegationMatcher
This commit is contained in:
Henne Vogelsang 2024-12-02 11:43:43 +01:00
parent 2c9e600e5c
commit 68e8203f27
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
6 changed files with 57 additions and 57 deletions

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