Update card buttons dynamically
User flows when editing a card look like: - Click "Edit" → the closure buttons are replaced by "Save changes" - Submit card form → Saves and restores closure buttons - Press ESC while editing → Cancels and restores closure buttons Also, renamed for clarity: - _title.html.erb → _content.html.erb Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -46,13 +46,13 @@ class CardsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
test "update" do
|
||||
patch card_path(cards(:logo)), params: {
|
||||
patch card_path(cards(:logo)), as: :turbo_stream, params: {
|
||||
card: {
|
||||
title: "Logo needs to change",
|
||||
image: fixture_file_upload("moon.jpg", "image/jpeg"),
|
||||
description: "Something more in-depth",
|
||||
tag_ids: [ tags(:mobile).id ] } }
|
||||
assert_redirected_to card_path(cards(:logo))
|
||||
assert_response :success
|
||||
|
||||
card = cards(:logo).reload
|
||||
assert_equal "Logo needs to change", card.title
|
||||
|
||||
Reference in New Issue
Block a user