Skip to content

Commit ef735d7

Browse files
authored
Add sign-in system test (#302)
Exercises the capybara-lockstep system-test harness end-to-end: sign in through the browser and land on the dashboard. Matches the example test now generated by inertia-rails/generator (#18).
1 parent c82445b commit ef735d7

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

spec/system/sessions_spec.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frozen_string_literal: true
2+
3+
require "rails_helper"
4+
5+
RSpec.describe "Sessions", type: :system do
6+
fixtures :users
7+
8+
it "signs in and shows the dashboard" do
9+
visit sign_in_path
10+
11+
fill_in "Email address", with: users(:one).email
12+
fill_in "Password", with: "Secret1*3*5*"
13+
click_on "Log in"
14+
15+
expect(page).to have_current_path(dashboard_path)
16+
expect(page).to have_text("Dashboard")
17+
end
18+
end

0 commit comments

Comments
 (0)