mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-07 07:10:10 +09:00
Merge pull request #299 from rubys/fix-boost-soft-keyboard-action
Wire the inline boost link to the soft keyboard
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
<%= turbo_frame_tag message, :new_boost do %>
|
||||
<div class="flex-inline message__boost-inline" data-controller="soft-keyboard">
|
||||
<%= link_to new_message_boost_path(message), class: "boost__action txt-small btn", action: "soft-keyboard#open" do %>
|
||||
<%= link_to new_message_boost_path(message), class: "boost__action txt-small btn", data: { action: "soft-keyboard#open" } do %>
|
||||
<%= image_tag "boost.svg", size: 20, aria: { hidden: "true" } %>
|
||||
<span class="for-screen-reader">Add a boost</span>
|
||||
<% end %>
|
||||
|
||||
@@ -6,6 +6,13 @@ class Messages::BoostsControllerTest < ActionDispatch::IntegrationTest
|
||||
@message = messages(:first)
|
||||
end
|
||||
|
||||
test "index wires the new boost link to the soft keyboard" do
|
||||
get message_boosts_url(@message)
|
||||
|
||||
assert_response :success
|
||||
assert_select ".message__boost-inline a.boost__action[data-action='soft-keyboard#open']"
|
||||
end
|
||||
|
||||
test "create" do
|
||||
assert_turbo_stream_broadcasts [ @message.room, :messages ], count: 1 do
|
||||
assert_difference -> { @message.boosts.count }, 1 do
|
||||
|
||||
Reference in New Issue
Block a user