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
5 changes: 2 additions & 3 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# versions of RuboCop, may require this file to be generated again.

# Offense count: 3
Capybara/NegationMatcherAfterVisit:
Capybara/RSpec/NegationMatcherAfterVisit:
Exclude:
- 'spec/system/account_setup_spec.rb'
- 'spec/system/stories_index_spec.rb'
Expand Down Expand Up @@ -328,12 +328,11 @@ Style/IfUnlessModifier:
Exclude:
- 'db/migrate/20240314031223_create_index_good_job_jobs_for_candidate_lookup.rb'

# Offense count: 2
# Offense count: 1
# Configuration parameters: AllowedClasses.
Style/OneClassPerFile:
Exclude:
- 'config/application.rb'
- 'spec/support/factory_bot.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ GEM
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
ast (2.4.3)
axe-core-api (4.11.2)
axe-core-api (4.11.3)
dumb_delegator
ostruct
virtus
axe-core-rspec (4.11.2)
axe-core-api (= 4.11.2)
axe-core-rspec (4.11.3)
axe-core-api (= 4.11.3)
dumb_delegator
ostruct
virtus
Expand All @@ -95,7 +95,7 @@ GEM
bcrypt (3.1.22)
bigdecimal (4.1.2)
bindex (0.8.1)
bootsnap (1.24.0)
bootsnap (1.24.1)
msgpack (~> 1.2)
brakeman (8.0.4)
racc
Expand Down Expand Up @@ -193,7 +193,7 @@ GEM
reline (>= 0.4.2)
jsbundling-rails (1.3.1)
railties (>= 6.0.0)
json (2.19.4)
json (2.19.5)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
logger (1.7.0)
Expand All @@ -211,12 +211,12 @@ GEM
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.9)
minitest (6.0.5)
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
mize (0.6.1)
msgpack (1.8.0)
multi_xml (0.8.1)
multi_xml (0.9.0)
bigdecimal (>= 3.1, < 5)
net-imap (0.6.4)
date
Expand All @@ -228,7 +228,7 @@ GEM
net-smtp (0.5.1)
net-protocol
nio4r (2.7.5)
nokogiri (1.19.2)
nokogiri (1.19.3)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
ostruct (0.6.3)
Expand Down Expand Up @@ -352,9 +352,9 @@ GEM
rubocop-ast (1.49.1)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-capybara (2.22.1)
rubocop-capybara (2.23.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop (~> 1.81)
rubocop-factory_bot (2.28.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
Expand Down
2 changes: 1 addition & 1 deletion spec/system/account_setup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def fill_in_fields(username:, confirm: "my-password")

fill_in_fields(username: "my-username", confirm: "wrong-password")

expect(page).to have_content("doesn't match")
expect(page).to have_text("doesn't match")
end

it "allows a second user to sign up" do
Expand Down
6 changes: 3 additions & 3 deletions spec/system/add_feed_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def submit_feed(url)

submit_feed("http://example.com/feed.xml")

expect(page).to have_content("We've added your new feed")
expect(page).to have_text("We've added your new feed")
end

it "shows an error when the feed is not found" do
Expand All @@ -28,7 +28,7 @@ def submit_feed(url)

submit_feed("http://example.com/bad")

expect(page).to have_content("We couldn't find that feed")
expect(page).to have_text("We couldn't find that feed")
end

it "shows an error when already subscribed" do
Expand All @@ -39,6 +39,6 @@ def submit_feed(url)

submit_feed(url)

expect(page).to have_content("You are already subscribed")
expect(page).to have_text("You are already subscribed")
end
end
6 changes: 3 additions & 3 deletions spec/system/application_settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

within("form", text: "User signups are disabled") { click_on("Enable") }

expect(page).to have_content("User signups are enabled")
expect(page).to have_text("User signups are enabled")
end

it "allows disabling account creation" do
Expand All @@ -17,15 +17,15 @@

within("form", text: "User signups are enabled") { click_on("Disable") }

expect(page).to have_content("User signups are disabled")
expect(page).to have_text("User signups are disabled")
end

it "blocks non-admin users from settings" do
login_as(default_user)

visit(settings_path)

expect(page).to have_content("No route matches")
expect(page).to have_text("No route matches")
end

it "prevents signup when signups are disabled" do
Expand Down
6 changes: 3 additions & 3 deletions spec/system/archive_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ def create_read_stories(count)

visit(archive_path)

expect(page).to have_content("Old Story")
expect(page).to have_text("Old Story")
end

it "shows a message when no stories have been read" do
login_as(default_user)

visit(archive_path)

expect(page).to have_content("you haven't read any stories")
expect(page).to have_text("you haven't read any stories")
end

it "paginates read stories" do
Expand All @@ -38,7 +38,7 @@ def create_read_stories(count)

click_on("Next")

expect(page).to have_content("2 of 2")
expect(page).to have_text("2 of 2")
expect(page).to have_link("Previous")
end

Expand Down
8 changes: 4 additions & 4 deletions spec/system/debug_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@

visit("/admin/debug")

expect(page).to have_content(RUBY_VERSION)
expect(page).to have_text(RUBY_VERSION)
end

it "shows None when there are no pending migrations" do
login_as(create(:user, admin: true))

visit("/admin/debug")

expect(page).to have_content("None")
expect(page).to have_text("None")
end

it "shows the queued jobs count" do
login_as(create(:user, admin: true))

visit("/admin/debug")

expect(page).to have_content("Queued Jobs")
expect(page).to have_text("Queued Jobs")
end

it "blocks non-admin users" do
login_as(default_user)

visit("/admin/debug")

expect(page).to have_content("No route matches")
expect(page).to have_text("No route matches")
end
end
4 changes: 2 additions & 2 deletions spec/system/feed_edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def visit_edit_feed
fill_in("Feed Name", with: "New Name")
click_on("Save")

expect(page).to have_content("Updated the feed")
expect(page).to have_text("Updated the feed")
end

it "allows updating a feed URL" do
Expand All @@ -30,7 +30,7 @@ def visit_edit_feed
fill_in("Feed URL", with: "http://new.example.com")
click_on("Save")

expect(page).to have_content("Updated the feed")
expect(page).to have_text("Updated the feed")
end

it "pre-selects the feed's current group in the dropdown" do
Expand Down
16 changes: 8 additions & 8 deletions spec/system/feed_show_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ def create_and_visit_feed(story_title: nil)

feed = create_and_visit_feed

expect(page).to have_content(feed.name)
expect(page).to have_text(feed.name)
end

it "displays stories for the feed" do
login_as(default_user)

create_and_visit_feed(story_title: "My Story")

expect(page).to have_content("My Story")
expect(page).to have_text("My Story")
end

it "marks all stories as read" do
Expand All @@ -30,7 +30,7 @@ def create_and_visit_feed(story_title: nil)

find_by_id("mark-all").click

expect(page).to have_content("You've reached RSS Zero")
expect(page).to have_text("You've reached RSS Zero")
end

it "refreshes the feed" do
Expand All @@ -40,7 +40,7 @@ def create_and_visit_feed(story_title: nil)

find_by_id("refresh").click

expect(page).to have_content("New Story")
expect(page).to have_text("New Story")
end

it "marks all stories as read with A hotkey" do
Expand All @@ -49,7 +49,7 @@ def create_and_visit_feed(story_title: nil)

send_keys("A")

expect(page).to have_content("You've reached RSS Zero")
expect(page).to have_text("You've reached RSS Zero")
end

it "refreshes the feed with r hotkey" do
Expand All @@ -59,7 +59,7 @@ def create_and_visit_feed(story_title: nil)

send_keys("r")

expect(page).to have_content("New Story")
expect(page).to have_text("New Story")
end

it "navigates to add feed with a hotkey" do
Expand All @@ -78,7 +78,7 @@ def create_and_visit_feed(story_title: nil)

visit("/feed/#{feed.id}")

expect(page).to have_content("Read Story")
expect(page).to have_text("Read Story")
end

it "navigates home with the home button" do
Expand Down Expand Up @@ -106,6 +106,6 @@ def create_and_visit_feed(story_title: nil)
find_by_id("mark-all").click
visit(news_path)

expect(page).to have_content("Other Story")
expect(page).to have_text("Other Story")
end
end
10 changes: 5 additions & 5 deletions spec/system/feeds_index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

visit "/feeds"

expect(page).to have_content("Hey, you should add some feeds")
expect(page).to have_text("Hey, you should add some feeds")
end

it "allows the user to delete a feed" do
Expand All @@ -25,7 +25,7 @@
visit("/feeds")
click_on "Delete"

expect(page).to have_content("Feed deleted")
expect(page).to have_text("Feed deleted")
end

it "removes stories from news when a feed is deleted" do
Expand All @@ -37,7 +37,7 @@
click_on "Delete"
visit(news_path)

expect(page).to have_content("You've reached RSS Zero")
expect(page).to have_text("You've reached RSS Zero")
end

it "allows the user to edit a feed" do
Expand Down Expand Up @@ -66,7 +66,7 @@

visit "/feeds"

expect(page).to have_content("Never")
expect(page).to have_text("Never")
end

it "displays the last fetched timestamp" do
Expand All @@ -75,7 +75,7 @@

visit "/feeds"

expect(page).to have_content("Jun 15, 10:30")
expect(page).to have_text("Jun 15, 10:30")
end

it "links to the feed" do
Expand Down
2 changes: 1 addition & 1 deletion spec/system/good_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@

visit(good_job_path)

expect(page).to have_content("No route matches")
expect(page).to have_text("No route matches")
end
end
4 changes: 2 additions & 2 deletions spec/system/heroku_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
it "displays the heroku setup page without authentication" do
visit("/heroku")

expect(page).to have_content("One more thing")
expect(page).to have_text("One more thing")
end

it "displays the scheduler task instructions" do
visit("/heroku")

expect(page).to have_content("rake lazy_fetch")
expect(page).to have_text("rake lazy_fetch")
end

it "links to the home page" do
Expand Down
Loading
Loading