diff --git a/test/sandbox/app/components/turbo_stream_component.html.erb b/test/sandbox/app/components/turbo_stream_component.html.erb
index c1ffb202f..b0595be17 100644
--- a/test/sandbox/app/components/turbo_stream_component.html.erb
+++ b/test/sandbox/app/components/turbo_stream_component.html.erb
@@ -1 +1,3 @@
-<%= turbo_stream.update "area1" do %>
+<% end %>
diff --git a/test/sandbox/app/components/url_component.html.erb b/test/sandbox/app/components/url_component.html.erb
index 79baae44b..2077dcd21 100644
--- a/test/sandbox/app/components/url_component.html.erb
+++ b/test/sandbox/app/components/url_component.html.erb
@@ -1 +1 @@
- <%= root_url %>
+<%= root_url %>
diff --git a/test/sandbox/app/components/url_helper_component.html.erb b/test/sandbox/app/components/url_helper_component.html.erb
index 8395fca03..641a69747 100644
--- a/test/sandbox/app/components/url_helper_component.html.erb
+++ b/test/sandbox/app/components/url_helper_component.html.erb
@@ -1 +1 @@
-
+<%= link_to "root", @url, target: "_blank" %>
diff --git a/test/sandbox/app/lib/primer/state_component.html.erb b/test/sandbox/app/lib/primer/state_component.html.erb
index f7025dea2..ce479cbe7 100644
--- a/test/sandbox/app/lib/primer/state_component.html.erb
+++ b/test/sandbox/app/lib/primer/state_component.html.erb
@@ -1,3 +1,7 @@
-
+
<%= content %>
diff --git a/test/sandbox/app/views/forms/_label.html.erb b/test/sandbox/app/views/forms/_label.html.erb
index 01a139906..21e4d182f 100644
--- a/test/sandbox/app/views/forms/_label.html.erb
+++ b/test/sandbox/app/views/forms/_label.html.erb
@@ -1,3 +1,5 @@
+<%# locals: (form:) %>
+
<%= form.label :published do %>
<%= form.check_box :published %>
<% end %>
diff --git a/test/sandbox/app/views/integration_examples/_controller_inline.html.erb b/test/sandbox/app/views/integration_examples/_controller_inline.html.erb
index 2e8715543..eb416180a 100644
--- a/test/sandbox/app/views/integration_examples/_controller_inline.html.erb
+++ b/test/sandbox/app/views/integration_examples/_controller_inline.html.erb
@@ -1 +1,3 @@
+<%# locals: (message:) %>
+
<%= message %>
diff --git a/test/sandbox/app/views/integration_examples/_erb_partial.html.erb b/test/sandbox/app/views/integration_examples/_erb_partial.html.erb
index ec3737c1d..82566bb2b 100644
--- a/test/sandbox/app/views/integration_examples/_erb_partial.html.erb
+++ b/test/sandbox/app/views/integration_examples/_erb_partial.html.erb
@@ -1,4 +1,5 @@
+<%# locals: () %>
+
- What's up!
- <%= render HamlComponent.new(message: "It works!") %>
+ What's up! <%= render HamlComponent.new(message: "It works!") %>
diff --git a/test/sandbox/app/views/integration_examples/cached_partial.html.erb b/test/sandbox/app/views/integration_examples/cached_partial.html.erb
index a3336f706..874c2f1e5 100644
--- a/test/sandbox/app/views/integration_examples/cached_partial.html.erb
+++ b/test/sandbox/app/views/integration_examples/cached_partial.html.erb
@@ -1,3 +1,3 @@
<% cache ["true"] do %>
- <%= render "erb_partial" %>
+ <%= render "integration_examples/erb_partial" %>
<% end %>
diff --git a/test/sandbox/app/views/integration_examples/partial.html.erb b/test/sandbox/app/views/integration_examples/partial.html.erb
index 27d813395..d1444470e 100644
--- a/test/sandbox/app/views/integration_examples/partial.html.erb
+++ b/test/sandbox/app/views/integration_examples/partial.html.erb
@@ -1,2 +1,2 @@
-partial:<%= render partial: "test_partial" %>
+partial:<%= render partial: "integration_examples/test_partial" %>
component:<%= render PartialComponent.new %>
diff --git a/test/sandbox/app/views/integration_examples/products.html.erb b/test/sandbox/app/views/integration_examples/products.html.erb
index 512177efb..399a01fd1 100644
--- a/test/sandbox/app/views/integration_examples/products.html.erb
+++ b/test/sandbox/app/views/integration_examples/products.html.erb
@@ -1,4 +1,5 @@
Products for sale
+
<%= render(ProductComponent.with_collection(@products, notice: "Today only")) %>
diff --git a/test/sandbox/app/views/integration_examples/slots.html.erb b/test/sandbox/app/views/integration_examples/slots.html.erb
index 26aa31989..c388fbc28 100644
--- a/test/sandbox/app/views/integration_examples/slots.html.erb
+++ b/test/sandbox/app/views/integration_examples/slots.html.erb
@@ -2,6 +2,7 @@
<% component.with_title do %>
This is my title!
<% end %>
+
<% component.with_subtitle do %>
This is my subtitle!
<% end %>
@@ -9,6 +10,7 @@
<% component.with_tab do %>
Tab A
<% end %>
+
<% component.with_tab do %>
Tab B
<% end %>
@@ -16,9 +18,11 @@
<% component.with_item do %>
Item A
<% end %>
+
<% component.with_item(highlighted: true) do %>
Item B
<% end %>
+
<% component.with_item do %>
Item C
<% end %>
diff --git a/test/sandbox/app/views/integration_examples/translations_in_block.html.erb b/test/sandbox/app/views/integration_examples/translations_in_block.html.erb
index df1c089ab..83f092604 100644
--- a/test/sandbox/app/views/integration_examples/translations_in_block.html.erb
+++ b/test/sandbox/app/views/integration_examples/translations_in_block.html.erb
@@ -11,9 +11,11 @@
<% component.with_title do %>
<%= t(".local_relative_key") %>
<% end %>
+
<% component.with_item do %>
<%= t(".local_relative_key") %>
<% end %>
+
<% component.with_footer do %>
<%= t(".local_relative_key") %>
<% end %>
diff --git a/test/sandbox/app/views/internal/secret.html.erb b/test/sandbox/app/views/internal/secret.html.erb
index 50021b26e..b58168f76 100644
--- a/test/sandbox/app/views/internal/secret.html.erb
+++ b/test/sandbox/app/views/internal/secret.html.erb
@@ -1,3 +1,11 @@
-
VC_PREVIEW_POC_SECRET=<%= Rails.application.secret_key_base %>
-
VC_PREVIEW_POC_LOCAL=<%= local_assigns[:poc_local] || local_assigns["poc_local"] %>
-
VC_PREVIEW_POC_REQUEST=<%= params[:request_marker] %>
+
+ VC_PREVIEW_POC_SECRET=<%= Rails.application.secret_key_base %>
+
+
+
+ VC_PREVIEW_POC_LOCAL=<%= local_assigns[:poc_local] || local_assigns["poc_local"] %>
+
+
+
+ VC_PREVIEW_POC_REQUEST=<%= params[:request_marker] %>
+
diff --git a/test/sandbox/app/views/layouts/admin.html.erb b/test/sandbox/app/views/layouts/admin.html.erb
index 1892c1937..324f11668 100644
--- a/test/sandbox/app/views/layouts/admin.html.erb
+++ b/test/sandbox/app/views/layouts/admin.html.erb
@@ -1,10 +1,12 @@
+
-
-
ViewComponent - Admin - Test
- <%= stylesheet_link_tag "admin" %>
-
-
- <%= yield %>
-
+
+
ViewComponent - Admin - Test
+ <%= stylesheet_link_tag "admin" %>
+
+
+
+ <%= yield %>
+
diff --git a/test/sandbox/app/views/layouts/admin/application_Foobar.html.erb b/test/sandbox/app/views/layouts/admin/application_Foobar.html.erb
index 1892c1937..324f11668 100644
--- a/test/sandbox/app/views/layouts/admin/application_Foobar.html.erb
+++ b/test/sandbox/app/views/layouts/admin/application_Foobar.html.erb
@@ -1,10 +1,12 @@
+
-
-
ViewComponent - Admin - Test
- <%= stylesheet_link_tag "admin" %>
-
-
- <%= yield %>
-
+
+
ViewComponent - Admin - Test
+ <%= stylesheet_link_tag "admin" %>
+
+
+
+ <%= yield %>
+
diff --git a/test/sandbox/app/views/layouts/application.html.erb b/test/sandbox/app/views/layouts/application.html.erb
index 7695bb9d7..d48ec221e 100644
--- a/test/sandbox/app/views/layouts/application.html.erb
+++ b/test/sandbox/app/views/layouts/application.html.erb
@@ -1,20 +1,22 @@
+
-
-
ViewComponent - Test
- <%= stylesheet_link_tag "application" %>
-
-
- <%= yield %>
+
+
ViewComponent - Test
+ <%= stylesheet_link_tag "application" %>
+
+
+
+ <%= yield %>
-
-
+
+
diff --git a/test/sandbox/app/views/layouts/explicit_in_action.html.erb b/test/sandbox/app/views/layouts/explicit_in_action.html.erb
index 24b60902d..7eaee9ea4 100644
--- a/test/sandbox/app/views/layouts/explicit_in_action.html.erb
+++ b/test/sandbox/app/views/layouts/explicit_in_action.html.erb
@@ -1,10 +1,12 @@
+
-
-
ViewComponent - Test
- <%= stylesheet_link_tag "application" %>
-
-
- <%= yield %>
-
+
+
ViewComponent - Test
+ <%= stylesheet_link_tag "application" %>
+
+
+
+ <%= yield %>
+
diff --git a/test/sandbox/app/views/layouts/global_for_action.html.erb b/test/sandbox/app/views/layouts/global_for_action.html.erb
index e3f1b91c1..6f018ed04 100644
--- a/test/sandbox/app/views/layouts/global_for_action.html.erb
+++ b/test/sandbox/app/views/layouts/global_for_action.html.erb
@@ -1,10 +1,12 @@
+
-
-
ViewComponent - Test
- <%= stylesheet_link_tag "application" %>
-
-
- <%= yield %>
-
+
+
ViewComponent - Test
+ <%= stylesheet_link_tag "application" %>
+
+
+
+ <%= yield %>
+
diff --git a/test/sandbox/app/views/layouts/with_content_for.html.erb b/test/sandbox/app/views/layouts/with_content_for.html.erb
index 1fe14bc7e..7c058b993 100644
--- a/test/sandbox/app/views/layouts/with_content_for.html.erb
+++ b/test/sandbox/app/views/layouts/with_content_for.html.erb
@@ -1,11 +1,13 @@
+
-
-
ViewComponent - Global For Action - Test
- <%= stylesheet_link_tag "application" %>
-
-
- <%= yield %>
- Foo: <%= content_for(:foo) %>
-
+
+
ViewComponent - Global For Action - Test
+ <%= stylesheet_link_tag "application" %>
+
+
+
+ <%= yield %>
+ Foo: <%= content_for(:foo) %>
+
diff --git a/test/sandbox/app/views/partial_helper/_fragment.html.erb b/test/sandbox/app/views/partial_helper/_fragment.html.erb
index 25310b08f..9ebe9ab7c 100644
--- a/test/sandbox/app/views/partial_helper/_fragment.html.erb
+++ b/test/sandbox/app/views/partial_helper/_fragment.html.erb
@@ -1 +1,3 @@
+<%# locals: () %>
+
<%= expensive_message %>
diff --git a/test/sandbox/app/views/shared/_action_menu_panel.html.erb b/test/sandbox/app/views/shared/_action_menu_panel.html.erb
index 5e8d98862..f6f80592b 100644
--- a/test/sandbox/app/views/shared/_action_menu_panel.html.erb
+++ b/test/sandbox/app/views/shared/_action_menu_panel.html.erb
@@ -1,3 +1,5 @@
+<%# locals: () %>
+
<%= render ActionMenuComponent.new do |menu| %>
<% menu.with_list do |list| %>
<% list.with_item do %>
diff --git a/test/sandbox/app/views/shared/_deep_navigation.html.erb b/test/sandbox/app/views/shared/_deep_navigation.html.erb
index 690ad6820..b76bd174e 100644
--- a/test/sandbox/app/views/shared/_deep_navigation.html.erb
+++ b/test/sandbox/app/views/shared/_deep_navigation.html.erb
@@ -1,3 +1,5 @@
+<%# locals: () %>
+
<%= render SectionComponent.new do |section| %>
<% section.with_nav do |nav| %>
<% nav.with_action_menu do |menu| %>
diff --git a/test/sandbox/app/views/shared/_lambda_slot_translation.html.erb b/test/sandbox/app/views/shared/_lambda_slot_translation.html.erb
index 5a9c55446..ac62bec4a 100644
--- a/test/sandbox/app/views/shared/_lambda_slot_translation.html.erb
+++ b/test/sandbox/app/views/shared/_lambda_slot_translation.html.erb
@@ -1,3 +1,5 @@
+<%# locals: () %>
+
<%= render LambdaSlotOuterComponent.new do |outer| %>
<% outer.with_inner do |inner| %>
<% inner.with_aside do %>
diff --git a/test/sandbox/app/views/shared/_partial.html.erb b/test/sandbox/app/views/shared/_partial.html.erb
index 37f0bddbd..2d6eefee4 100644
--- a/test/sandbox/app/views/shared/_partial.html.erb
+++ b/test/sandbox/app/views/shared/_partial.html.erb
@@ -1 +1,3 @@
+<%# locals: () %>
+
<%= yield %>
diff --git a/test/sandbox/app/views/shared/_yielding_form_partial.html.erb b/test/sandbox/app/views/shared/_yielding_form_partial.html.erb
index d4f2ca982..d949ee534 100644
--- a/test/sandbox/app/views/shared/_yielding_form_partial.html.erb
+++ b/test/sandbox/app/views/shared/_yielding_form_partial.html.erb
@@ -1,3 +1,5 @@
+<%# locals: (form:) %>
+
<%= form.label :something do %>
<%= yield %>
<% end %>
diff --git a/test/sandbox/app/views/shared/_yielding_partial.html.erb b/test/sandbox/app/views/shared/_yielding_partial.html.erb
index 10503e2b3..f252b0e1f 100644
--- a/test/sandbox/app/views/shared/_yielding_partial.html.erb
+++ b/test/sandbox/app/views/shared/_yielding_partial.html.erb
@@ -1 +1,3 @@
-hello <%= yield %>
+<%# locals: () %>
+
+
hello <%= yield %>
diff --git a/test/sandbox/app/views/view_components/_inline.html.erb b/test/sandbox/app/views/view_components/_inline.html.erb
index 95ee82c14..3a223845e 100644
--- a/test/sandbox/app/views/view_components/_inline.html.erb
+++ b/test/sandbox/app/views/view_components/_inline.html.erb
@@ -1 +1,3 @@
+<%# locals: () %>
+
Hello, world!
diff --git a/test/sandbox/test/components/previews/lambda_slot_passthrough_component_preview/default.html.erb b/test/sandbox/test/components/previews/lambda_slot_passthrough_component_preview/default.html.erb
index 0aac5aed9..231dff939 100644
--- a/test/sandbox/test/components/previews/lambda_slot_passthrough_component_preview/default.html.erb
+++ b/test/sandbox/test/components/previews/lambda_slot_passthrough_component_preview/default.html.erb
@@ -1,3 +1,5 @@
<%= render LambdaSlotPassthroughComponent.new do |component| %>
- <% component.with_lambda_slot do %>hello,world!<% end %>
+ <% component.with_lambda_slot do %>
+ hello,world!
+ <% end %>
<% end %>
diff --git a/test/sandbox/test/integration_test.rb b/test/sandbox/test/integration_test.rb
index f555e1765..3a2a9975b 100644
--- a/test/sandbox/test/integration_test.rb
+++ b/test/sandbox/test/integration_test.rb
@@ -226,7 +226,7 @@ def test_rendering_component_with_content
get("/content")
assert_response(:success)
assert_select("div.State--green")
- assert_select("div[title='Status: Open']")
+ assert_select("[role='status'][aria-label='Status: Open']", text: "Open")
assert_includes(response.body, "Open")
end
@@ -553,11 +553,14 @@ def test_does_not_render_additional_newline_with_render_in
def test_render_component_in_turbo_stream
without_template_annotations do
get(turbo_stream_path, headers: {"HTTP_ACCEPT" => "text/vnd.turbo-stream.html"})
- expected_response_body = <<~TURBOSTREAM
-
Hello, world!
- TURBOSTREAM
-
- assert_equal(expected_response_body, response.body)
+ assert_response(:success)
+ assert_equal("text/vnd.turbo-stream.html", response.media_type)
+ assert_select("turbo-stream", count: 1)
+ assert_select("turbo-stream[action='update'][target='area1']", count: 1) do
+ assert_select("template", count: 1) do
+ assert_select("span", text: "Hello, world!", count: 1)
+ end
+ end
end
end
diff --git a/test/sandbox/test/rendering_allocations_test.rb b/test/sandbox/test/rendering_allocations_test.rb
index 617d70ac1..0513440e2 100644
--- a/test/sandbox/test/rendering_allocations_test.rb
+++ b/test/sandbox/test/rendering_allocations_test.rb
@@ -14,13 +14,13 @@ class RenderingAllocationsTest < ViewComponent::TestCase
}.freeze
COLLECTION_ALLOCATIONS = {
- ["7.1", "3.2"] => 76,
- ["7.2", "3.3"] => 79,
- ["8.0", "3.4"] => 67,
- ["8.1", "4.0"] => 53,
- ["8.1", "4.1"] => 53,
- ["8.2", "4.0"] => 53,
- ["8.2", "4.1"] => 53
+ ["7.1", "3.2"] => 74,
+ ["7.2", "3.3"] => 77,
+ ["8.0", "3.4"] => 65,
+ ["8.1", "4.0"] => 52,
+ ["8.1", "4.1"] => 52,
+ ["8.2", "4.0"] => 52,
+ ["8.2", "4.1"] => 52
}.freeze
class TestController < IntegrationExamplesController