Skip to content

Commit

Permalink
Update integration test to use valid HTML5
Browse files Browse the repository at this point in the history
This change fixes a test in our suite broken by
rails/rails#48523.

Before the upstream change, invalid the invalid HTML5 in this test
case was parsed without issue. The upstream change switched the
Nokogiri parsing mode to HTML5, leading to parsing issues with
our test case.

I've converted all of the DOM nodes in this case into divs,
preserving the intention of the test case but making it valid HTML5.
  • Loading branch information
joelhawksley committed Jun 23, 2023
1 parent 70c88cf commit bef72f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
%span.bar
%div.bar
= render "haml_partial"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
%p.foo
%div.foo
= "Hello, world!"
= render(PartialHamlComponent.new)
2 changes: 1 addition & 1 deletion test/sandbox/test/integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ def test_renders_a_mix_of_haml_and_erb

get "/nested_haml"
assert_response :success
assert_select "p.foo > span.bar > div.baz > article.quux > div.haml-div"
assert_select ".foo > .bar > .baz > .quux > .haml-div"
end

def test_raises_an_error_if_the_template_is_not_present_and_the_render_with_template_method_is_used_in_the_example
Expand Down

0 comments on commit bef72f2

Please sign in to comment.