diff --git a/spec/support/request/ui_component_helper.rb b/spec/support/request/ui_component_helper.rb index bfaee94a40..b48cfe16e0 100644 --- a/spec/support/request/ui_component_helper.rb +++ b/spec/support/request/ui_component_helper.rb @@ -109,4 +109,10 @@ module UIComponentHelper expand_active_table_node(name) page.find(".active_table_node a", text: name.to_s).click end + + def fill_in_using_keyboard + page.find('#email').send_keys(user.email, :tab, user.password, :tab, :space) + expect(page.find('#remember_me')).to be_checked + page.find('#remember_me').send_keys(:tab, :enter) + end end diff --git a/spec/system/consumer/authentication_spec.rb b/spec/system/consumer/authentication_spec.rb index 3d06ef7855..a28af792c0 100644 --- a/spec/system/consumer/authentication_spec.rb +++ b/spec/system/consumer/authentication_spec.rb @@ -48,6 +48,13 @@ describe "Authentication", js: true do expect(page).to be_logged_in_as user end + context "using keyboard" do + it "logging in successfully" do + fill_in_using_keyboard + expect(page).to be_logged_in_as user + end + end + describe "signing up" do before do select_login_tab "Sign up"