Skip to content

Commit

Permalink
add spec
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev committed Dec 15, 2024
1 parent c2d27bf commit 3c56f0c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/system/avo/avo_cmd_return_to_submits_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require 'rails_helper'

RSpec.describe "CmdReturnToSubmits", type: :system do
let(:admin) { create :user, roles: {admin: true} }
let(:project) { create :project }
before do
login_as admin
end # include TestHelpers::DisableAuthentication

it "submits form when cmd+enter is pressed" do
visit "/admin/resources/projects/#{project.id}/edit"
element = find("input[name='project[name]']")
element.send_keys [:control, :enter]
expect(page).to have_text "Project updated"
end
end

0 comments on commit 3c56f0c

Please sign in to comment.